Finding the solution to a differential equation

jonnburton

Junior Member
Joined
Dec 16, 2012
Messages
155
I've been working on this differential equation but haven't been able to find the correct solution and wondered whether anyone could point out where I'm going wrong.

\(\displaystyle x\frac{dy}{dx} = y - y^2\)

When y = 1/2, x =2

\(\displaystyle \frac{1}{y -y^2}\frac{dy}{dx} = \frac{1}{x}\)



\(\displaystyle \frac{1}{y -y^2}\) needs to be split up into partial fractions before integration

\(\displaystyle \frac{1}{y -y^2} = \frac{1}{y(1-y)}\)

\(\displaystyle \frac{A}{y} + \frac{B}{1-y}\) This comes out as \(\displaystyle \frac{1}{y} + \frac{1}{1-y}\)



Now it's possible to continue with the original question:

\(\displaystyle \int \frac{1}{y}dy + \int \frac{1}{1-y}dy = \int \frac{1}{x}dx\)

\(\displaystyle ln|y| - ln|1-y| = ln|x| +A\)


\(\displaystyle e^{ln|y| - ln|1-y|} = e[{ln|x| +A}\)

\(\displaystyle \frac{y}{1-y} = Ae^{ln|x|} = Ax\)

But the solution I came to when substituting in the values for x and y was \(\displaystyle \frac{y}{1-y} = -\frac{1}{4}x\), whereas the correct solution is \(\displaystyle y = \frac{x}{x+2}\)
 
I've been working on this differential equation but haven't been able to find the correct solution and wondered whether anyone could point out where I'm going wrong.

\(\displaystyle x\frac{dy}{dx} = y - y^2\)

When y = 1/2, x =2

\(\displaystyle \frac{1}{y -y^2}\frac{dy}{dx} = \frac{1}{x}\)



\(\displaystyle \frac{1}{y -y^2}\) needs to be split up into partial fractions before integration

\(\displaystyle \frac{1}{y -y^2} = \frac{1}{y(1-y)}\)

\(\displaystyle \frac{A}{y} + \frac{B}{1-y}\) This comes out as \(\displaystyle \frac{1}{y} + \frac{1}{1-y}\)



Now it's possible to continue with the original question:

\(\displaystyle \int \frac{1}{y}dy + \int \frac{1}{1-y}dy = \int \frac{1}{x}dx\)

\(\displaystyle ln|y| - ln|1-y| = ln|x| +A\)


\(\displaystyle e^{ln|y| - ln|1-y|} = e[{ln|x| +A}\)

\(\displaystyle \frac{y}{1-y} = Ae^{ln|x|} = Ax\)

But the solution I came to when substituting in the values for x and y was \(\displaystyle \frac{y}{1-y} = -\frac{1}{4}x\), whereas the correct solution is \(\displaystyle y = \frac{x}{x+2}\)

You are messing up in algebra during substitution of initial values.

Ax = y/(1-y)

A*2 = 1

A = 1/2

y = Ax (1-y) = Ax - yAx

y (1+Ax) = Ax

y = Ax/(1+Ax)

y = 1/2 *x/(1+1/2*x)

y = (x/2)/[(2+x)/2] = x/(x + 2)
 
Thanks a lot for pointing that out, Subhotosh. I will go through it a few more times to make sure I get it.
 
Top