Solution to an initial value problem

  • Thread starter dooogle
  • Start date
  • #1
21
0

Homework Statement



dy/dx=5y(1-y)

y(0)=0.1

x belongs to [0; 2]

Homework Equations



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

  • #2
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
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.
 
  • #3
21
0
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
 
  • #4
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
No, the integration constant came in as

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

So you'd have

[tex] e^{5x + C} = \frac{y}{1-y} . [/tex]

This is not the simplest form of the equation. We can still solve for y directly.
 
  • #5
21
0
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?
 
  • #6
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
e^-(5x+c)=(1/y)-(1)

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

The 2nd line does not follow from the first.

[tex]\frac{1}{\frac{1}{y} -1} \neq y -1[/tex]

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

[tex]\frac{1}{y} = ?[/tex]

Then you can compute the reciprocal of both sides to determine y.
 
  • #7
21
0
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
 
  • #8
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
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

[tex] \frac{1}{a+b} \neq \frac{1}{a} + \frac{1}{b}.[/tex]

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.
 
  • #9
21
0
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
 
  • #10
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
No problem. Don't forget to use the initial condition to eliminate the integration constant.
 

Related Threads on Solution to an initial value problem

  • Last Post
Replies
2
Views
1K
Replies
1
Views
2K
Replies
1
Views
3K
Replies
6
Views
9K
Replies
2
Views
1K
Replies
6
Views
1K
Replies
1
Views
7K
Top