# Linear Algebra: Solving a system of equations for damped oscillation

1. Apr 10, 2013

### mahrap

So we are given two equations:

$$\ddot{x} - \dot{x} - x = cost (t)$$

and

$$x(t) = a sin(t) + b cos(t)$$

The question asks to find a and b.

How would one go about doing this? I thought maybe substituting the $$cos(t)$$ from equation 1 into equation 2 would work but then what system of equations would I have to solve? I am completely clueless on how to set up this problem. Any suggestions and hints are appreciated.

2. Apr 10, 2013

### dinospamoni

Try taking the first and second derivatives of x

3. Apr 10, 2013

### mahrap

There was not much additional information which would have helped me arrive at a solution. What would I do after taking the second derivative of x with respect to t? Plug it into equation 1? But then How would I solve my equations then?

4. Apr 10, 2013

### dinospamoni

Ok, just wondering.

Take the first and second derivatives of x, then plug those into the first equation. You should see from there