Thread: [SOLVED] find integrating factor and solve the equation 3

1. [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)

2. 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:

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

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

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

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

Does this make sense?

3. Originally Posted by Chris L T521
Applying the initial condition gives us $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?

4. 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 $y=\tfrac{1}{2}e^x+Ce^{-x}$, you can apply the initial condition.

Since $y(0)=1$, we have $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.

5. got it!! Thanks Chris L T521

6. 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.