1. ## Differential Equations

Would someone be able to point me in the right direction with this problem?

Find the general solution of the differential equation.

x^2*y'+x(x+2)y=e^x

This is what I have so far:

x^2(dy/dx)+x(x+2)y=e^x

x^2(dy/dx)+x^2y+2xy=e^x

dy/dx+y+(2y)/x=e^2/x^2

e^(ln(x^2))=x^2

d/dx(x^2y+(2yx^2)/x))=e^x

1/3*x^3y+2yx^2=e^x

I'm not sure where to go from here or if I am even doing this correctly. Any help with the steps of this problem would be great. Thanks!

2. $\begin{gathered}
y' + \left( {1 + \frac{2}
{x}} \right)y = \frac{{e^x }}
{{x^2 }} \hfill \\
\mu = e^{\int {1 + \frac{2}
{x}} dx} = e^{x + 2\ln x} = x^2 e^x \hfill \\
\end{gathered}$

$
\begin{gathered}
x^2 e^x y' + x(x + 2)e^x y = e^{2x} \hfill \\
x^2 e^x y = \int {e^{2x} dx} \hfill \\
\end{gathered}
$

...

3. Originally Posted by yellowrose
Would someone be able to point me in the right direction with this problem?

Find the general solution of the differential equation.

x^2*y'+x(x+2)y=e^x

This is what I have so far:

x^2(dy/dx)+x(x+2)y=e^x

x^2(dy/dx)+x^2y+2xy=e^x

dy/dx+y+(2y)/x=e^2/x^2

e^(ln(x^2))=x^2

d/dx(x^2y+(2yx^2)/x))=e^x

1/3*x^3y+2yx^2=e^x

I'm not sure where to go from here or if I am even doing this correctly. Any help with the steps of this problem would be great. Thanks!
I'd divide through by x^2 and re-wrte it in the form

$\frac{d}{dx} = \left( 1 + \frac{2}{x} \right) y = \frac{e^x}{x^2}$.

Then I'd use the integrating factor method.

Note that the integrating factor here is $e^{\int 1 + \frac{2}{x} \, dx} = e^{x + 2 \ln x} = e^x e^{2 \ln x} = e^x e^{\ln x^2} = x^2 e^x$.

It should be all blue sky from here .....

4. Originally Posted by Peritus
$\begin{gathered}
y' + \left( {1 + \frac{2}
{x}} \right)y = \frac{{e^x }}
{{x^2 }} \hfill \\
\mu = e^{\int {1 + \frac{2}
{x}} dx} = e^{x + 2\ln x} = x^2 e^x \hfill \\
\end{gathered}$

$
\begin{gathered}
x^2 e^x y' + x(x + 2)e^x y = e^{2x} \hfill \\
x^2 e^x y = \int {e^{2x} dx} \hfill \\
\end{gathered}
$

...

This is where I solve for y right?

Doing this I get: y=((1/2)e^2x)/(x^2*e^x))
Which equals: y=1/(2x^2)*e^x
Where do I get the second part from? I should have:
y=1/(2x^2)*e^x[B]+(c/x^2)*e^-x

5. Originally Posted by yellowrose
Following your answer I get: x^2*e^x*y=(1/2)e^2x + C Mr F adds the + C. The arbitrary constant of integration - so often overlooked - is essential to the solution!

This is where I solve for y right? Mr F says: Yep, but you'll only get half the answer without the + C.

Doing this I get: y=((1/2)e^2x)/(x^2*e^x))
Which equals: y=1/(2x^2)*e^x
Where do I get the second part from? I should have:

y=1/(2x^2)*e^x[B]+(c/x^2)*e^-x Mr F says: Hate to say I told you so . You only got half the answer because you forgot the arbitrary constant of integration.
So you should have $x^2 e^x y = \frac{1}{2} e^{2x} + C$.

Now solve for y and you'll get the second part!

Indefinite integrals ALWAYS have an arbitrary constant attached! Do you C? (ha ha)