# Thread: dont know how to start on thee 2 differential equations

1. ## 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

2. 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 $y'+f(x)y = g(x)$

your integrating factor is found as follows

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

multiplying this through the entire equation gives

$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

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

now integrate both sides

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

gives y to be

$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 $f(0) = 1$ to determine your constant of integration afterwards.

3. 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 $y'+f(x)y = g(x)$

your integrating factor is found as follows

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

multiplying this through the entire equation gives

$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

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

now integrate both sides

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

gives y to be

$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 $\int (x^2e^{\frac{x^2}{2}})(x dx)$ and let $u= x^2$. Then use integration by parts.

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

4. 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.

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

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

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

divide both sides by $e^{xy}$

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

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

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

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

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

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

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

now you can use the integrating factor method again as above

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

good luck!

5. 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 $y'+f(x)y = g(x)$

your integrating factor is found as follows

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

multiplying this through the entire equation gives

$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

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

now integrate both sides

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

gives y to be

$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 $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

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

How the the LHS transform like that?

6. In a sense, he is using the product rule "in reverse". The product rule states that (uv)'= u'v+ uv'.

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