## gerryliyana 2 years ago Differential Equations again!

1. gerryliyana

SOLVE $\frac{ dy }{ dx } + y = xy^{3}$

2. UnkleRhaukus

you have a Bernoulli equation $y'+p(x)y=q(x)y^n$, subsitute $$z=y^{1-n}$$

3. gerryliyana

Ok..., thank u @UnkleRhaukus So.., $\frac{ dy }{ dx } + y = xy^{3}$ $$y^{-3} \frac{ dy }{ dx } +y^{-2} = x$$ ........(1) $$z = y^{1-n}$$ where n = 3, then $$z = y^{-2}$$ $\frac{ dz }{dx } = \frac{ dz }{ dy }\frac{ dy }{ dx } = \frac{ d }{ dy }(y^{-2}) \frac{ dy }{ dx } = -2 y^{-3} \frac{ dy }{ dx }$ $\frac{ dy }{ dx } = \frac{ 1 }{ -2y } y^{3} \frac{ dz }{ dx }$ substitute dy/dx into the (1) equations, becoms $y^{-3} (\frac{ 1 }{ -2 }) y^{3} \frac{ dz }{ dx } + y^{-2} = x$ $$\frac{ dz }{ dx } -2y^{-2} = -2x$$ where $$z = y^{-2}$$ $$\frac{ dz }{ dx } -2z = -2x$$ ....(2) i got p(x) = -2 and g(x) = -2x Then for integration factor: $\mu(x) = \exp(\int\limits_{0}^{x} -2 dx) = \exp(-2x) = e^{-2x}$ multiply all (2) terms by $$\mu (x)$$ , becomes $e^{-2x} \frac{ dz }{ dx } -2e^{-2x}z = -2e^{-2x} x$ $d(e^{-2x} z) = -2 e^{-2x} x$ $e^{-2x} z = -2 \int\limits_{0}^{x} e^{-2x} x dx$ that is right??

4. gerryliyana

$e^{-2x} z = \frac{ 1 }{ 2 }e^{-2x} (2x+1) + C$ where z = y^{-2} $e^{-2x} y^{-2} = \frac{ 1 }{ 2 } e^{-2x}(2x+1) + C$

5. UnkleRhaukus

thats right

6. UnkleRhaukus

now just rearrange and solve for y(x)

7. gerryliyana

wow..., very nice.., ok., $e^{-2x}y^{-2} = \frac{ 1 }{ 2 } e^{-2x} (2x+1) + C$ $e^{-2x}y^{-2} - \frac{ 1 }{ 2 } e^{-2x}(2x+1) = 0$ $y^{-2} - \frac{ 1 }{ 2 } (2x+1) = 0$ $y^{2} = \frac{ 2 }{ (2x+1) } + C$ $y = \sqrt{\frac{ 2 }{ (2x+1)}+ C}$ am i right????

8. UnkleRhaukus

almost , the term withe the constant is not quite right though , something strange happend on your second line just now ^

9. gerryliyana

I'm a little bit confused about C

10. UnkleRhaukus

$e^{-2x}y^{-2} - \frac{ 1 }{ 2 } e^{-2x}(2x+1) - C=0$ $y^{-2} - \frac{ 1 }{ 2 } (2x+1) - Ce^{2x}=0$

11. UnkleRhaukus

$y^{-2}= \frac{ 1 }{ 2 }( (2x+1) + 2Ce^{2x})$ $y^{2}= \frac{ 2 }{ (2x+1) + 2Ce^{2x}}$ $y^{2}(x)= \frac{ 2 }{ (2x+1) + ke^{2x}}$ $y(x)= \pm\sqrt{\frac{ 2 }{ (2x+1) + ke^{2x}}}$

12. UnkleRhaukus

maybe just leave the solution as $y^{2}(x)$

13. UnkleRhaukus

$\qquad2C=k$

14. gerryliyana

ok..., thank u so much :)