# Solution to an initial value problem

## Homework Statement

dy/dx=5y(1-y)

y(0)=0.1

x belongs to [0; 2]

## The Attempt at a Solution

dy/5y(1-y)=dx

using partial fractions (1/(-y^2+y))=1/(y(1-y))= A/y+B/1-y

multiplying both sides by (y(1-y)) gives 1=A(1-y)+B(y)

when y=0 1=A so A=1

when y=1 1=B so B=1

so 1/(1-y) +1/y =1/(y(1-y))

1/5*(int 1/(1-y)+int 1/(y))=1/5*(-ln (1-y)+ln (y))

so x=1/5*(-ln (1-y)+ln (y))

5x=-ln (1-y)+ln (y)

e^5x=y/1-y

but that doesnt work when y(0)=0.1 does y(0)=0.1 mean when y=0 or when x=0? either way i dont get the right answer plz can someone explain where im going wrong

cheers

dooogle

## Answers and Replies

fzero
Science Advisor
Homework Helper
Gold Member
1/5*(int 1/(1-y)+int 1/(y))=1/5*(-ln (1-y)+ln (y))

so x=1/5*(-ln (1-y)+ln (y))

5x=-ln (1-y)+ln (y)

e^5x=y/1-y

but that doesnt work when y(0)=0.1 does y(0)=0.1 mean when y=0 or when x=0? either way i dont get the right answer plz can someone explain where im going wrong

You forgot about the integration constant. The initial value y(x=0)=0.1 will fix the value of the integration constant.

so e^5x +c =y/1-y where c=0.1

is a gd answer?

im just concerned due to the fact i have 2 y's thanks for the help

dooogle

fzero
Science Advisor
Homework Helper
Gold Member
No, the integration constant came in as

5x + C =-ln (1-y)+ln (y)

So you'd have

$$e^{5x + C} = \frac{y}{1-y} .$$

This is not the simplest form of the equation. We can still solve for y directly.

e^-(5x+c)=(1-y)/y

e^-(5x+c)=(1/y)-(y/y)

e^-(5x+c)=(1/y)-(1)

e^(5x+c)=y-1

e^(5x+c)+1=y?

fzero
Science Advisor
Homework Helper
Gold Member
e^-(5x+c)=(1/y)-(1)

e^(5x+c)=y-1

The 2nd line does not follow from the first.

$$\frac{1}{\frac{1}{y} -1} \neq y -1$$

Try writing 1/y by itself on one side of the equation:

$$\frac{1}{y} = ?$$

Then you can compute the reciprocal of both sides to determine y.

e^-(5x+c)=(1/y)-(1)

raise both sides to the power of minus 1 so 1/y=y^-1 becomes y and -1 becomes -1^-1 =1/-1 =-1 and e^-(5x+c)=1/e^(5x+c) becomes e^(5x+c)

e^(5x+c)=y-1

fzero
Science Advisor
Homework Helper
Gold Member
e^-(5x+c)=(1/y)-(1)

raise both sides to the power of minus 1 so 1/y=y^-1 becomes y and -1 becomes -1^-1 =1/-1 =-1 and e^-(5x+c)=1/e^(5x+c) becomes e^(5x+c)

e^(5x+c)=y-1

No, it doesn't work that way

$$\frac{1}{a+b} \neq \frac{1}{a} + \frac{1}{b}.$$

Use my suggestion by adding 1 to both sides of

e^-(5x+c)=(1/y)-(1)

Compare the answer you get with the wrong result.

ok i understand now thanks for your help

i did what u said

e^-(5x+c)=(1/y)-(1)

1/y=e^-(5x+c) +1

y=1/(e^-(5x+c) +1)

thanks very much for help

doogle

fzero
Science Advisor
Homework Helper
Gold Member
No problem. Don't forget to use the initial condition to eliminate the integration constant.