# [SOLVED] find integrating factor and solve the equation 3

• Mar 27th 2010, 10:44 PM
nameck
[SOLVED] find integrating factor and solve the equation 3
y' + y = e^x ; y(0) = 1

1st, i calculate the integrating factor...
u(x) = e^x

times the integrating factor with DE...

y'e^x + ye^x = e^2x

dy/dx e^x + ye^x = e^2x

d/dx ye^x = e^2x

ye^x = ∫ e^2x dx
.........= 1/2 e^2x + C

y = 1/2 e^x + C

the problem here, i didn't get the answer given which is..
y = 1/2 (e^x + e^-x)
• Mar 27th 2010, 10:58 PM
Chris L T521
Quote:

Originally Posted by nameck
y' + y = e^x ; y(0) = 1

1st, i calculate the integrating factor...
u(x) = e^x

times the integrating factor with DE...

y'e^x + ye^x = e^2x

dy/dx e^x + ye^x = e^2x

d/dx ye^x = e^2x

ye^x = ∫ e^2x dx
.........= 1/2 e^2x + C

y = 1/2 e^x + C

the problem here, i didn't get the answer given which is..
y = 1/2 (e^x + e^-x)

Everything is fine up to here:

$\displaystyle e^xy=\tfrac{1}{2}e^{2x}+C$.

When you multiply both sides by $\displaystyle e^{-x}$, you get $\displaystyle y=\tfrac{1}{2}e^x+Ce^{-x}$.

Applying the initial condition gives us $\displaystyle C=\tfrac{1}{2}$.

As a result, the solution is $\displaystyle y=\tfrac{1}{2}\left(e^x+e^{-x}\right)$.

Does this make sense?
• Mar 27th 2010, 11:01 PM
nameck
Quote:

Originally Posted by Chris L T521
Applying the initial condition gives us $\displaystyle C=\tfrac{1}{2}$.

yup2!! thanks chris..
however.. i still dont know at which step i should use the initial value given to solve C?
• Mar 27th 2010, 11:13 PM
Chris L T521
Quote:

Originally Posted by nameck
yup2!! thanks chris..
however.. i still dont know at which step i should use the initial value given to solve C?

when you get $\displaystyle y=\tfrac{1}{2}e^x+Ce^{-x}$, you can apply the initial condition.

Since $\displaystyle y(0)=1$, we have $\displaystyle 1=\tfrac{1}{2}e^0+Ce^{-0}=\tfrac{1}{2}+C\implies C=\tfrac{1}{2}$.

In general, though, initial conditions can be applied once all the derivative terms in the differential equation disappear in your solution.
• Mar 27th 2010, 11:14 PM
nameck
got it!! Thanks Chris L T521
• Mar 27th 2010, 11:17 PM
Chris L T521
Quote:

Originally Posted by nameck
got it!! Thanks Chris L T521

Also, feel free to reference my DE tutorial. I talk about differential equations of this form. The link can be found in my signature.