# dont know how to start on thee 2 differential equations

• May 26th 2009, 10:17 AM
zen-x
dont know how to start on thee 2 differential equations

dy/dx + xy = x^3 , f(0)=1

AND

(e^(xy))(1+xy)dx + (x^2)(e^(xy))dy = 0

I cannot seem to separate the variables in the first one and can't find a homogeneous solution and the second one I just had a mental blank...
please show me how to solve step by step?
thanks
• May 26th 2009, 01:59 PM
pickslides
Quote:

Originally Posted by zen-x

dy/dx + xy = x^3 , f(0)=1

You need to use the integrating factor method on this equation as it is not separable.

for an equation in the from $\displaystyle y'+f(x)y = g(x)$

your integrating factor is found as follows

$\displaystyle I = e^{\int f(x) dx} = e^{\int x dx} =e^{ \frac{x^2}{2}}$

multiplying this through the entire equation gives

$\displaystyle e^{ \frac{x^2}{2}}y' + xe^{ \frac{x^2}{2}}y = x^3 e^{ \frac{x^2}{2}}$

then using the product rule, LHS changes to be

$\displaystyle (e^{ \frac{x^2}{2}}y)' = x^3 e^{ \frac{x^2}{2}}$

now integrate both sides

$\displaystyle e^{ \frac{x^2}{2}}y = \int x^3 e^{ \frac{x^2}{2}}dx$

gives y to be

$\displaystyle y = \frac{\int x^3 e^{ \frac{x^2}{2}}dx}{e^{ \frac{x^2}{2}}}$

you will have to finish the problem by using integration by parts on the numerator of the RHS.

use $\displaystyle f(0) = 1$ to determine your constant of integration afterwards.
• May 26th 2009, 02:24 PM
HallsofIvy
Quote:

Originally Posted by pickslides
You need to use the integrating factor method on this equation as it is not separable.

for an equation in the from $\displaystyle y'+f(x)y = g(x)$

your integrating factor is found as follows

$\displaystyle I = e^{\int f(x) dx} = e^{\int x dx} =e^{ \frac{x^2}{2}}$

multiplying this through the entire equation gives

$\displaystyle e^{ \frac{x^2}{2}}y' + xe^{ \frac{x^2}{2}}y = x^3 e^{ \frac{x^2}{2}}$

then using the product rule, LHS changes to be

$\displaystyle (e^{ \frac{x^2}{2}}y)' = x^3 e^{ \frac{x^2}{2}}$

now integrate both sides

$\displaystyle e^{ \frac{x^2}{2}}y = \int x^3 e^{ \frac{x^2}{2}}dx$

gives y to be

$\displaystyle y = \frac{\int x^3 e^{ \frac{x^2}{2}}dx}{e^{ \frac{x^2}{2}}}$

you will have to finish the problem by using integration by parts on the numerator of the RHS.

First write that as $\displaystyle \int (x^2e^{\frac{x^2}{2}})(x dx)$ and let $\displaystyle u= x^2$. Then use integration by parts.

Quote:

use $\displaystyle f(0) = 1$ to determine your constant of integration afterwards.
• May 26th 2009, 03:19 PM
pickslides
Quote:

Originally Posted by zen-x
(e^(xy))(1+xy)dx + (x^2)(e^(xy))dy = 0

you need to do a little algebra on this one to put it in the correct form.

$\displaystyle e^{xy}(1+xy)dx + x^2e^{xy}dy = 0$

$\displaystyle e^{xy}(1+xy)dx = -x^2e^{xy}dy$

$\displaystyle e^{xy}(1+xy)dx = -x^2e^{xy}dy$

divide both sides by $\displaystyle e^{xy}$

$\displaystyle (1+xy)dx = -x^2dy$

$\displaystyle \frac{(1+xy)}{-x^2} = \frac{dy}{dx}$

$\displaystyle \frac{dy}{dx} = \frac{(1+xy)}{-x^2}$

$\displaystyle \frac{dy}{dx} = \frac{1}{-x^2}+\frac{xy}{-x^2}$

$\displaystyle \frac{dy}{dx} = \frac{1}{-x^2}+\frac{y}{-x}$

$\displaystyle \frac{dy}{dx} +\frac{y}{x} = \frac{1}{-x^2}$

$\displaystyle \frac{dy}{dx} +\frac{1}{x}y = \frac{1}{-x^2}$

now you can use the integrating factor method again as above

where $\displaystyle I = e^{\int\frac{1}{x}dx}$

good luck!
• Jun 11th 2009, 07:55 AM
zen-x
Quote:

Originally Posted by pickslides
You need to use the integrating factor method on this equation as it is not separable.

for an equation in the from $\displaystyle y'+f(x)y = g(x)$

your integrating factor is found as follows

$\displaystyle I = e^{\int f(x) dx} = e^{\int x dx} =e^{ \frac{x^2}{2}}$

multiplying this through the entire equation gives

$\displaystyle e^{ \frac{x^2}{2}}y' + xe^{ \frac{x^2}{2}}y = x^3 e^{ \frac{x^2}{2}}$

then using the product rule, LHS changes to be

$\displaystyle (e^{ \frac{x^2}{2}}y)' = x^3 e^{ \frac{x^2}{2}}$

now integrate both sides

$\displaystyle e^{ \frac{x^2}{2}}y = \int x^3 e^{ \frac{x^2}{2}}dx$

gives y to be

$\displaystyle y = \frac{\int x^3 e^{ \frac{x^2}{2}}dx}{e^{ \frac{x^2}{2}}}$

you will have to finish the problem by using integration by parts on the numerator of the RHS.

use $\displaystyle f(0) = 1$ to determine your constant of integration afterwards.

Thanks so much for the help, however, just one thing that i could not understand in the algebra here:

then using the product rule, LHS changes to be

$\displaystyle (e^{ \frac{x^2}{2}}y)' = x^3 e^{ \frac{x^2}{2}}$

How the the LHS transform like that?
• Jun 11th 2009, 11:45 AM
HallsofIvy
In a sense, he is using the product rule "in reverse". The product rule states that (uv)'= u'v+ uv'.

Here, you have $\displaystyle e^{ \frac{x^2}{2}}y' + xe^{ \frac{x^2}{2}}y$
Further, it is easy to see that $\displaystyle \left(e^{\frac{x^2}{2}}\right)'= xe^{\frac{x^2}{2}}$ so take $\displaystyle u= e^{\frac{x^2}{2}}$ and v= y.