# Thread: How to complete this first order linear diff eq.

1. ## How to complete this first order linear diff eq.

Hi, I have to solve the this differential equation:

y' - y = cos x

i've found the integrating factor and gotten to the part:
int: d[ye^-x] = int: [(e^-x) * (cosx) dx]

and I'm not sure how to integrate [(e^-x) * (cosx) dx].

can someone help me? Thanks.

2. $\int e^{-x} \cos(x) ~dx= \frac{1}{2}e^{-x}(\sin(x)-\cos(x))+c$

3. Originally Posted by PandaNomium
Hi, I have to solve the this differential equation:

y' - y = cos x

i've found the integrating factor and gotten to the part:
int: d[ye^-x] = int: [(e^-x) * (cosx) dx]

and I'm not sure how to integrate [(e^-x) * (cosx) dx].

can someone help me? Thanks.
$\begin{gathered}
y' - y = \cos x \hfill \\
y'{e^{ - x}} - y{e^{ - x}} = \cos x{e^{ - x}} \hfill \\
y'{e^{ - x}} + y{\left( {{e^{ - x}}} \right)^\prime } = \cos x{e^{ - x}} \hfill \\
\end{gathered}$

$\begin{gathered}
{\left( {y{e^{ - x}}} \right)^\prime } = \cos x{e^{ - x}} \hfill \\
y{e^{ - x}} = \int {\cos x\,{e^{ - x}}\,dx} \hfill \\
\end{gathered}$

4. thanks, i guess i should rephrase my question. I got that answer using the online integrator, but i'm not sure why it is the answer.

What properties of integration are being used?

5. Originally Posted by DeMath
Try to multiply both sides of the equation by $e^{-x}$, ie
The poster has already done this.

6. Originally Posted by PandaNomium
thanks, i guess i should rephrase my question. I got that answer using the online integrator, but i'm not sure why it is the answer.

What properties of integration are being used?
By parts (two times)

$I = \int {\cos x{e^{ - x}}dx} = - {e^{ - x}}\cos x - \int {{e^{ - x}}\sin xdx} =$

$= - {e^{ - x}}\cos x + {e^{ - x}}\sin x - \underbrace {\int {{e^{ - x}}} \cos xdx}_I \Leftrightarrow$

$\Leftrightarrow 2I = {e^{ - x}}\left( {\sin x - \cos x} \right) + C \Leftrightarrow I = \frac{{{e^{ - x}}}}
{2}\left( {\sin x - \cos x} \right) + C.$

7. i appreciate what you've done, thanks. I've never learned integration by parts, so please bear with me.

I understand every point until the equation is multiplied by 1/2.
Where does the 2I come in?

8. Originally Posted by PandaNomium
i appreciate what you've done, thanks. I've never learned integration by parts, so please bear with me.

I understand every point until the equation is multiplied by 1/2.
Where does the 2I come in?
Look at the last term of the second last line. I is the unknown (integral) that you're trying to find by making it the subject.