# Thread: dy/dx - y = sin x ( form differential equation)

1. ## dy/dx - y = sin x ( form differential equation)

i found that the integrating factor is (e^-x ) , so i gt y (e^-x ) = integral of sin x (e^-x ) , how to integrate sin x (e^-x ) ?

2. ## Re: dy/dx - y = sin x ( form differential equation)

Originally Posted by xl5899
i found that the integrating factor is (e^-x ) , so i gt y (e^-x ) = integral of sin x (e^-x ) , how to integrate sin x (e^-x ) ?
Here's a dandy little trick that you'll find useful every now-and-again. Do this by parts:
$\displaystyle I = \int e^{-x}~sin(x)~dx = -e^{-x}~sin(x) + \int e^{-x}~cos(x)~dx$

Do parts again on the second integral:
$\displaystyle I = \int e^{-x}~sin(x)~dx = -e^{-x}~sin(x) + \left [ -e^{-x}~cos(x) - \int e^{-x}~sin(x)~dx \right ]$

Notice that the last integral is just the same as the first integral. We can replace it with "I".
$\displaystyle I = \int e^{-x}~sin(x)~dx = -e^{-x}~sin(x) - e^{-x}~cos(x) - I$

Now finish by solving for I.

-Dan