# Solving ODE with IVP

• Sep 7th 2009, 09:21 PM
latavee
Solving ODE with IVP
Ok, I'm stuck! I've tried everything and can't seem to solve this problem!

dy/dt+2y=1 y(0)=5/2; and find the value of the function t=3seconds

I first tried: dy=1-2y dt
then dy/1-2y=dt
next integrate both sides: u=1-2y u'=-2 dx=-1/2du=t
so after integrating: -1/2ln(1-2y)=t+C
When I plug in the IVP, I'm getting a negative log, So now I'm stuck!
• Sep 7th 2009, 09:27 PM
Chris L T521
Quote:

Originally Posted by latavee
Ok, I'm stuck! I've tried everything and can't seem to solve this problem!

dy/dt+2y=1 y(0)=5/2; and find the value of the function t=3seconds

I first tried: dy=1-2y dt
then dy/1-2y=dt
next integrate both sides: u=1-2y u'=-2 dx=-1/2du=t
so after integrating: -1/2ln(1-2y)=t+C
When I plug in the IVP, I'm getting a negative log, So now I'm stuck!

$\int\frac{\,du}{u}=\ln{\color{red}\left|\right.}u{ \color{red}\left.\right|}+C$.
• Sep 7th 2009, 10:10 PM
latavee
so the -1/2 ln(u) +C isn't correct? Thanks! I found your tutorials very helpful!
• Sep 7th 2009, 10:54 PM
mr fantastic
Quote:

Originally Posted by latavee
Ok, I'm stuck! I've tried everything and can't seem to solve this problem!

dy/dt+2y=1 y(0)=5/2; and find the value of the function t=3seconds

I first tried: dy=1-2y dt
then dy/1-2y=dt
next integrate both sides: u=1-2y u'=-2 dx=-1/2du=t
so after integrating: -1/2ln(1-2y)=t+C
When I plug in the IVP, I'm getting a negative log, So now I'm stuck!

$dt = \frac{dy}{1 - 2y}$.

There are two approaches that will give you a greater chance of success:

1. Since the boundary condition will cause 1 - 2y to be negative, re-write the DE as $dt = - \frac{dy}{2y - 1}$, integrate in the usual way and then include the boundary condition in the usal way, or

2. Make y the subject before using the boundary condition.
• Sep 8th 2009, 05:16 PM
luobo
Quote:

Originally Posted by latavee
so the -1/2 ln(u) +C isn't correct? Thanks! I found your tutorials very helpful!

My understanding is it IS correct, but in complex domain. Now you have obtained
$-\tfrac{1}{2} \ln(1-2y) = t + C$ (1)

Put in $y(0)=\tfrac{5}{2}$, you get
$C=-\tfrac{1}{2}\ln(-4)$ (2)

Put (2) into (1), you should get
$-\tfrac{1}{2} \ln(1-2y) = t -\tfrac{1}{2}\ln(-4)$ (3)

- After some simplification, you will obtain
$-\tfrac{1}{2} \ln \frac{1-2y}{-4} = -\tfrac{1}{2} \ln \frac{2y-1}{4}= t$ (4)
which comes back to real domain.