My Math Forum Differential equation

 Differential Equations Ordinary and Partial Differential Equations Math Forum

 October 6th, 2012, 10:19 AM #1 Member   Joined: Jul 2010 Posts: 95 Thanks: 0 Differential equation Hello i need help with this equation: $y'=2xy+xy^2$ My attempt to solve: $y'=2xy+xy^2$ $y'=x(2y+y^2)$ $\int \frac{dy}{2y-y^2}=\int xdx$ $\int \frac{dy}{2y-y^2}=\int \frac{dy}{y(2-y)}=\int ( \frac{A}{y}+\frac{B}{(2+y)})dy= \int (\frac{1}{2}*\frac{1}{y}-\frac{1}{2}(\frac{1}{2+y}))dy = \frac{1}{2}ln|y|-\frac{1}{2}ln|2+y|+c_1$ AND $\int xdx= \frac{x^2}{2}+c_2$ SO $\frac{1}{2}ln|y|-\frac{1}{2}ln|2+y|+c_1= \frac{x^2}{2}+c_2$ FROM HERE I DON'T KNOW WHAT TO DO ELSE, SO I DID: $y(3)= 2$ AND I GOT THE FOLLOWING $\frac{1}{2}ln|2|-\frac{1}{2}ln|2+2|+c_1= \frac{3^2}{2}+c_2$; $\frac{1}{2}ln|2|-\frac{1}{2}ln|2+2|-\frac{3^2}{2}= c_2-c_1 \ where \ c_2 -c_1 = c$ $\frac{1}{2}ln|2|-\frac{1}{2}ln|2+2|-\frac{3^2}{2}= c$ SO I GOT c: $c=\frac{1}{2}ln\frac{1}{2}-\frac{9}{2} = -4.84657359$ MY QUESTION: how to solve this equation?
 October 6th, 2012, 10:36 AM #2 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,211 Thanks: 521 Math Focus: Calculus/ODEs Re: Differential equation You have correctly separated the variables to obtain: $\frac{1}{y(2-y)}\,dy=x\,dx$ Your partial fraction decomposition is incorrect, however. You should find: $\frac{1}{y(2-y)}=\frac{1}{2}$$\frac{1}{y}-\frac{1}{y-2}$$$ and so we have: $\int \frac{1}{y}-\frac{1}{y-2}\,dy=2\int x\,dx$ Can you finish?
 October 6th, 2012, 11:25 AM #3 Member   Joined: Jul 2010 Posts: 95 Thanks: 0 Re: Differential equation Thanks for your help. $\int (\frac{1}{y}-\frac{1}{y-2})dy= 2 \int xdx$ I GOT THE FOLLOWING: $ln|y|-ln|y-2|+c_1= 2\frac{x^2}{2}+c_2$ $ln|y|-ln|y-2|+c_1= x^2+c_2$ $ln(\frac{|y|}{|y-2|})+c_1= x^2+c_2$ $ln(\frac{|y|}{|y-2|})-x^2= c_1+c_2 \ where\ c_1+c_2=c$ $ln(\frac{|y|}{|y-2|})-x^2= c$ THEN I TAKE INITIAL CONDITIONS: $y=3 \; x=2$ AND $ln(\frac{|3|}{|3-2|})-2^2= c$ $ln(\frac{|3|}{|1|})-4= c$ $ln(3)-4= c$ $c= -2.901387711$ AND THEN: $ln(\frac{|y|}{|y-2|})-x^2= -2.901387711$ $ln(\frac{|y|}{|y-2|})= -2.901387711+x^2$ ${e}^{-2.901387711+x^2}= \frac{|y|}{|y-2|}$ WHAT SHOULD I DO NOW?
 October 6th, 2012, 11:48 AM #4 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,211 Thanks: 521 Math Focus: Calculus/ODEs Re: Differential equation I would write: $\ln\|\frac{y}{y-2}\|=x^2+C$ Convert from logarithmic to exponential form: $\frac{y}{y-2}=e^{x^2+C}=Ce^{x^2}$ Using the initial condition: $\frac{3}{3-2}=Ce^{2^2}$ $3=Ce^4$ $C=3e^{-4}$ And so we have: $\frac{y}{y-2}=3e^{x^2-4}$ $y=(y-2)3e^{x^2-4}=3ye^{x^2-4}-6e^{x^2-4}$ $y$$1-3e^{x^2-4}$$=-6e^{x^2-4}$ $y=\frac{6e^{x^2-4}}{3e^{x^2-4}-1}=\frac{6}{3-e^{4-x^2}}$
 October 6th, 2012, 12:04 PM #5 Member   Joined: Jul 2010 Posts: 95 Thanks: 0 Re: Differential equation Just one stupid question: why $e^{x^2+C}=Ce^{x^2}$ Thanks for your help.
October 6th, 2012, 12:29 PM   #6
Global Moderator

Joined: May 2007

Posts: 6,834
Thanks: 733

Re: Differential equation

Quote:
 Originally Posted by safyras Hello i need help with this equation: $y'=2xy+xy^2$ My attempt to solve: $y'=2xy+xy^2$ $y'=x(2y+y^2)$ $\int \frac{dy}{2y-y^2}=\int xdx$ $\int \frac{dy}{2y-y^2}=\int \frac{dy}{y(2-y)}=\int ( \frac{A}{y}+\frac{B}{(2+y)})dy= \int (\frac{1}{2}*\frac{1}{y}-\frac{1}{2}(\frac{1}{2+y}))dy = \frac{1}{2}ln|y|-\frac{1}{2}ln|2+y|+c_1$ AND $\int xdx= \frac{x^2}{2}+c_2$ SO $\frac{1}{2}ln|y|-\frac{1}{2}ln|2+y|+c_1= \frac{x^2}{2}+c_2$ FROM HERE I DON'T KNOW WHAT TO DO ELSE, SO I DID: $y(3)= 2$ AND I GOT THE FOLLOWING $\frac{1}{2}ln|2|-\frac{1}{2}ln|2+2|+c_1= \frac{3^2}{2}+c_2$; $\frac{1}{2}ln|2|-\frac{1}{2}ln|2+2|-\frac{3^2}{2}= c_2-c_1 \ where \ c_2 -c_1 = c$ $\frac{1}{2}ln|2|-\frac{1}{2}ln|2+2|-\frac{3^2}{2}= c$ SO I GOT c: $c=\frac{1}{2}ln\frac{1}{2}-\frac{9}{2} = -4.84657359$ MY QUESTION: how to solve this equation?
$y'=x(2y+y^2)$
$\int \frac{dy}{2y-y^2}=\int xdx$
It looks like you made a mistake. Should be:
$\int \frac{dy}{2y+y^2}=\int xdx$

 October 6th, 2012, 12:31 PM #7 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,211 Thanks: 521 Math Focus: Calculus/ODEs Re: Differential equation There are no stupid questions..."stupid" is not asking when something is not clear. $e^{x^2+C}=e^{x^2}\cdot e^{C}=e^C\cdot e^{x^2}$ Now, we should observe that $e^C$ is just an arbitrary (positive) constant, so we may write: $Ce^{x^2}$ I should have remarked before, that in the process of separating the variables, the trivial solution $y\equiv 0$ was lost.
October 6th, 2012, 12:33 PM   #8
Senior Member

Joined: Jul 2010
From: St. Augustine, FL., U.S.A.'s oldest city

Posts: 12,211
Thanks: 521

Math Focus: Calculus/ODEs
Re: Differential equation

Quote:
 Originally Posted by mathman ...It looks like you made a mistake...
Geez...you are right.

@OP: So, you need to begin again.

 October 6th, 2012, 03:16 PM #9 Member   Joined: Jul 2010 Posts: 95 Thanks: 0 Re: Differential equation Thanks for noticing mistakes and for a very big help. So the last solution i came up is: Given equation: $1. \ y'=2xy+xy^2$ MY ATTEMPT TO SOLVE: $2. \ y'=2xy+xy^2$ $3. \ y'=x(2y+y^2)$ $4. \ \int \frac{dy}{2y+y^2}=\int xdx$ $5. \ \int \frac{dy}{2y+y^2}=\int \frac{dy}{y(2+y)}=\int ( \frac{A}{y}+\frac{B}{(2+y)})dy= \int (\frac{1}{2}*\frac{1}{y}-\frac{1}{2}(\frac{1}{2+y}))dy = \frac{1}{2}ln|y|-\frac{1}{2}ln|2+y|+c_1.$ AND $6. \ \int xdx= \frac{x^2}{2}+c_2.$ SO $7. \ \frac{1}{2}ln|y|-\frac{1}{2}ln|2+y|+c_1= \frac{x^2}{2}+c_2$ $8. \ \frac{1}{2}(ln|y|- ln|2+y|+c_1)= \frac{x^2}{2}+c_2 /*2$ $9. \ ln|y|- ln|2+y|+c_1= x^2+c_2$ ( $c_1$ and $c_2$ stay the same because they are arbitrary (positive) constant (according to MarkFL)) $10. \ ln\left |\frac{y}{y+2} \right | + c_1= x^2 +c_2$ $11. \ ln\left |\frac{y}{y+2} \right |= x^2 +\underbrace{c_2-c_1}_{c}$ $12. \ ln\left |\frac{y}{y+2} \right |= x^2 +c$ $13.\ \frac{y}{y+2}= e^{x^2+c} = ce^{{x}^{2}}.$ CONTINUED ( INITIAL VALUES): $14. \ \frac{y}{y+2}= ce^{{x}^{2}} \ ; with \ y = 3 \ x = 2$ $15. \ \frac{3}{3+2}= ce^{{2}^{2}}$ $16. \ \frac{3}{5}= ce^{4}$ $17. \ c=\frac{3}{5e^{4}$ $18. \ \frac{y}{y+2}= \frac{3}{5e^{4}}*e^{x^{2}}$ $19. \ \frac{y}{y+2}= \frac{3e^{x^{2}}}{5e^{4}}$ $20. \ y= \frac{3e^{x^{2}}}{5e^{4}}*(y+2)$ $21. \ y= \frac{3e^{x^{2}}}{5e^{4}}*y+\frac{3e^{x^{2}}}{5e^{ 4}}*2$ $22. \ y= \frac{3e^{x^{2}}y}{5e^{4}}+\frac{6e^{x^{2}}}{5e^{4 }}$ $23. \ y - \frac{3e^{x^{2}}y}{5e^{4}}=\frac{6e^{x^{2}}}{5e^{4 }}$ $24. \ y(1 - \frac{3e^{x^{2}}}{5e^{4}})=\frac{6e^{x^{2}}}{5e^{4 }}$ $25. \ y=\frac{\frac{6e^{x^{2}}}{5e^{4}}}{(1 - \frac{3e^{x^{2}}}{5e^{4}})}.$ MY QUESTION: 1. Do I have recalculate c for every given x and y ?
October 6th, 2012, 10:06 PM   #10
Senior Member

Joined: Aug 2012
From: New Delhi, India

Posts: 157
Thanks: 0

Re: Differential equation

Quote:
 Originally Posted by MarkFL ..... I should have remarked before, that in the process of separating the variables, the trivial solution $y\equiv 0$ was lost.
What do you mean by this?
Regards,
Rejjy
07-Oct-2012
11:36 IST

 Tags differential, equation

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post PhizKid Differential Equations 0 February 24th, 2013 10:30 AM cheyb93 Differential Equations 3 February 7th, 2013 09:28 PM mathkid Differential Equations 0 October 9th, 2012 08:01 AM tomislav91 Differential Equations 1 May 30th, 2012 07:28 AM tsl182forever8 Differential Equations 2 March 14th, 2012 03:12 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top