Hi,

Im having some trouble with an inhomogenous differential equation.

I have:

$\displaystyle y'' + 3y' + 2y = sin(x)$

$\displaystyle

\begin{cases}

y(0) = 1 \\

y'(0) = 1

\end{cases}

$

The solution to the homogenous equation $\displaystyle r^2 + 3r + 2=0$

are $\displaystyle \begin{aligned}r_{1} = -1 \\

r_{2} = -2\end{aligned}$

And the general solution would therefore be:$\displaystyle C_{1}e^{-2t} +C_{2}e^{-t}$

But since this whole equation is equal to $\displaystyle sin x$

The solution is on the form $\displaystyle A sin(x) + B cos(x)$

So let's try it:

$\displaystyle \begin{aligned}

y = A sin(x) + B cos(x)\\

y'= A cos(x) -B sin(x) \\

y''= -A sin(x) -B cos(x)\end{aligned}

$

Gives:

$\displaystyle -A sin(x) -B cos(x) + 3Acos(x) -3Bsin(x) +2Asin(x) +2Bcos(x)$ $\displaystyle = 4Acos(x) -2Bsin(x) = sin(x)$

a)

$\displaystyle \begin{aligned} 4A = 0\\

A = 0 \\

-2B = 1\\

B = -\frac{1}{2}\end{aligned}$

This is the point where im stuck.

The initial conditions give Both

b)

$\displaystyle \begin{aligned}y(0)=Asin(x)+Bcos(x)~~ B=1\\

y'(0) = Acos(x)-Bsin(x) ~~ A = 1 \end{aligned}$

This is where im stuck