# Solve the following differential equation X(dy/dx)+2y=(x^2)logx?

Jun 26, 2018

$y = {x}^{2} / 4 \left(\log x - \frac{1}{4}\right) + \frac{C}{x} ^ 2$

#### Explanation:

$x \left(\frac{\mathrm{dy}}{\mathrm{dx}}\right) + 2 y = \left({x}^{2}\right) \log x$

Set up for integrating factor:

$\frac{\mathrm{dy}}{\mathrm{dx}} + \boldsymbol{\frac{2}{x}} y = x \log x$

The integrating factor:

$\exp \left(\int \boldsymbol{\frac{2}{x}} \mathrm{dx}\right) = \exp \left(\log {x}^{2}\right) = {x}^{2}$

Multiply each side by integrating factor:

${x}^{2} \frac{\mathrm{dy}}{\mathrm{dx}} + 2 x y = {x}^{3} \log x$

So that:

${\left({x}^{2} \setminus y\right)}^{'} = {x}^{3} \log x$

Integrating the RHS:

$\int {x}^{3} \log x \setminus \mathrm{dx}$

$= \int \log x \setminus d \left({x}^{4} / 4\right)$

By IBP:

$= {x}^{4} / 4 \log x - \int d \left(\log x\right) {x}^{4} / 4$

$= {x}^{4} / 4 \log x - \int {x}^{3} / 4 \mathrm{dx}$

$= {x}^{4} / 4 \log x - {x}^{4} / 16 + C$

$\implies {x}^{2} \setminus y = {x}^{4} / 4 \log x - {x}^{4} / 16 + C$

$y = {x}^{2} / 4 \left(\log x - \frac{1}{4}\right) + \frac{C}{x} ^ 2$

$y = \setminus \frac{{x}^{2} \setminus \ln x}{4} - \setminus \frac{{x}^{2}}{16} + \setminus \frac{C}{{x}^{2}}$

#### Explanation:

Given that

$x \setminus \frac{\mathrm{dy}}{\mathrm{dx}} + 2 y = {x}^{2} \setminus \ln x$

\frac{dy}{dx}+ frac{2}{x}y=x\lnx

Comparing above equation with the standard form of linear D.E. $\setminus \frac{\mathrm{dy}}{\mathrm{dx}} + P \left(x\right) y = Q \left(x\right)$, we get

$P \left(x\right) = \frac{2}{x} , \setminus Q \left(x\right) = x \setminus \ln x$

Integration factor (I,F.)
$I = {e}^{\setminus \int P \left(x\right) \setminus \mathrm{dx}} = {e}^{\setminus \int \frac{2}{x} \setminus \mathrm{dx}} = {e}^{2 \setminus \ln x} = {e}^{\setminus \ln {x}^{2}} = {x}^{2}$

hence, the complete solution of linear D.E. is given as follows

$y \left(I . F .\right) = \setminus \int \left(I . F .\right) Q \left(x\right) \setminus \mathrm{dx} + C$

$y \left({x}^{2}\right) = \setminus \int \left({x}^{2}\right) x \setminus \ln x \setminus \mathrm{dx} + C$

${x}^{2} y = \setminus \int {x}^{3} \setminus \ln x \setminus \mathrm{dx} + C$

${x}^{2} y = \setminus \ln x \setminus \int {x}^{3} \setminus \mathrm{dx} - \setminus \int \left(\setminus \frac{d}{\mathrm{dx}} \setminus \ln x \setminus \cdot \setminus \int {x}^{3} \setminus \mathrm{dx}\right) \mathrm{dx} + C$

${x}^{2} y = \setminus \ln x \setminus \cdot \setminus \frac{{x}^{4}}{4} - \setminus \int \left(\setminus \frac{1}{x} \setminus \frac{{x}^{4}}{4}\right) \mathrm{dx} + C$

${x}^{2} y = \setminus \frac{{x}^{4} \setminus \ln x}{4} - \frac{1}{4} \setminus \int {x}^{3} \mathrm{dx} + C$
${x}^{2} y = \setminus \frac{{x}^{4} \setminus \ln x}{4} - \frac{1}{4} \setminus \frac{{x}^{4}}{4} + C$
${x}^{2} y = \setminus \frac{{x}^{4} \setminus \ln x}{4} - \setminus \frac{{x}^{4}}{16} + C$

$y = \setminus \frac{{x}^{2} \setminus \ln x}{4} - \setminus \frac{{x}^{2}}{16} + \setminus \frac{C}{{x}^{2}}$

Jun 26, 2018

$y = \frac{1}{4} {x}^{2} \ln x - \frac{1}{16} {x}^{2} + \frac{C}{x} ^ 2$

#### Explanation:

First, we are going to divide the entire equation by $x$ to put it into the form $\frac{\mathrm{dy}}{\mathrm{dx}} + \textcolor{red}{P \left(x\right)} y = \textcolor{b l u e}{Q \left(x\right)}$.

$\frac{\mathrm{dy}}{\mathrm{dx}} + \textcolor{red}{\frac{2}{x}} y = \textcolor{b l u e}{x \ln x}$

Now, we need to find the special integrating factor. For a differential equation in this form, the special integrating factor is given by

$\mu = {e}^{\int \textcolor{red}{P \left(x\right)} \mathrm{dx}}$

$\mu = {e}^{\int \textcolor{red}{\frac{2}{x}} \mathrm{dx}}$

$\mu = {e}^{2 \ln x}$

$\mu = {\left({e}^{\ln} x\right)}^{2}$

$\textcolor{g r e e n}{\mu = {x}^{2}}$

So we may now multiply the original equation by $\textcolor{g r e e n}{\mu}$.

$\textcolor{g r e e n}{{x}^{2}} \left(\frac{\mathrm{dy}}{\mathrm{dx}} + \frac{2}{x} y\right) = \textcolor{g r e e n}{{x}^{2}} \left(x \ln x\right)$

${x}^{2} \frac{\mathrm{dy}}{\mathrm{dx}} + 2 x y = {x}^{3} \ln x$

If this technique is new to you, the reason that we've multiplied by the special integrating factor is to form the result of a derivative of a product on the left-hand side.

$\frac{d}{\mathrm{dx}} \left({x}^{2} y\right) = {x}^{3} \ln x$

Now, we are almost done. To find $y$, we should first integrate both sides. Recall that integrating a derivative results in the original function.

$\int \left(\frac{d}{\mathrm{dx}} \left({x}^{2} y\right)\right) \mathrm{dx} = \textcolor{\mathmr{and} a n \ge}{\int \left({x}^{3} \ln x\right) \mathrm{dx}}$

I've just written an antiderivative for the orange integral below, but I'll show you the work for it at the very end.

${x}^{2} y = \frac{1}{4} {x}^{4} \ln x - \frac{1}{16} {x}^{4} + C$

And isolating $y$:

$y = \frac{1}{4} {x}^{2} \ln x - \frac{1}{16} {x}^{2} + \frac{C}{x} ^ 2$

$\textcolor{\mathmr{and} a n \ge}{\int \left({x}^{3} \ln x\right) \mathrm{dx}}$

Integrate by substitution. Let $\textcolor{red}{x = {e}^{t}} , \textcolor{red}{\ln x = t} , \textcolor{red}{\mathrm{dx} = {e}^{t} \mathrm{dt}}$.

$\int \left({\left(\textcolor{red}{{e}^{t}}\right)}^{3} \textcolor{red}{t}\right) \textcolor{red}{{e}^{t} \mathrm{dt}}$

$= \int \left(t \cdot {e}^{3 t} \cdot {e}^{t}\right) \mathrm{du}$

$= \int \left(t {e}^{4 t}\right) \mathrm{dt}$

Perform integration by parts.

$u = t$, $\mathrm{du} = \mathrm{dt}$
$\mathrm{dv} = {e}^{4 t} \mathrm{dt} , v = \frac{1}{4} {e}^{4 t}$

$u v - \int v \mathrm{du}$

$= \frac{1}{4} t {e}^{4 t} - \int \left(\frac{1}{4} {e}^{4 t}\right) \mathrm{dt}$

$= \frac{1}{4} t {e}^{4 t} - \frac{1}{16} {e}^{4 t} + C$

$= \frac{1}{4} t {\left({e}^{t}\right)}^{4} - \frac{1}{16} {\left({e}^{t}\right)}^{4} + C$

Undo substitution $\textcolor{red}{x = {e}^{t}} , \textcolor{red}{\ln x = t}$.

$= \frac{1}{4} \cdot \ln x \cdot {\left(x\right)}^{4} - \frac{1}{16} {\left(x\right)}^{4} + C$

$= \frac{1}{4} {x}^{4} \ln x - \frac{1}{16} {x}^{4} + C$