Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am taking a beginner linear algebra class and would like a hint on a homework question. I don't need the answer, just a little guidance.

Consider the differential equation: $$\frac{d^2x}{dt^2} - \frac{dx}{dt} - x = \cos(t).$$

We are told that the differential equation has a solution of the form $$x(t) = a\sin(t) + b\cos(t).$$

Find $a$ and $b$, and graph the solution.

This question comes from the first section in chapter one of Linear Algebra with Applications Fourth Edition by Otto Bretscher.

I don't know how to set up the system to use elimination to solve.

share|cite|improve this question
Try to plug in the solution and see what happens. – user17762 Jan 29 '11 at 21:20
up vote 2 down vote accepted

I hope you won't try to solve the differential equation from scratch!${}^{1}$

If you just plug in the given $x(t)$ into the equation, what do we get? \begin{align*} x(t) & = a\sin(t) + b\cos (t)\\ x'(t) &= a\cos(t) - b\sin(t)\\ x''(t) &= -a\sin(t) -b\cos(t)\\ \frac{d^2 x}{dt^2} - \frac{dx}{dt} - x &= (-a\sin t-b\cos t) - (a\cos t - b\sin t) - (a\sin t + b\cos t)\\ &= (-2a+b)\sin t + (-2b-a)\cos t. \end{align*} Since you know that this is a solution, you should get $\cos t$. That tells you something about the coefficients of $\sin t$ and $\cos t$ that you got by plugging in. Does it look like a system of linear equations?

${}^1$: Happens every semester that I teach Calculus II; the book has early mention of Differential Equations as something integrals will be good for, but the students don't have the tools yet to solve even the most simple differential equations. A few problems ask the students to verify that a certain function is a solution, or to find conditions on certain parameters for a given function to be a solution, and invariably 99% of the students have a pavlovian response and try to solve the given equation and if successful compare the solution they find with the given solution, instead of simply plugging in the given answer to check if it works. This happens even though I tell them that to check something is a solution you don't need to solve, even though I do examples on the board before the homework is due, even though I give them quiz problems that specifically say things like "even though you cannot yet find the general solution to this equation"... Sigh.

share|cite|improve this answer
After being out of school for 13 years, it is hard sometimes to pick up even the basic solutions. I think I get more confused about the syntax. Thank you for the example, I was plugging in t's and wondering what to do with x(t), ugh. The way I think I should go forward is: since cos(t) = (-2a+b)sint + (-2b+a)cost then I need to set -2a+b = 0 and -2b+a = 1 and solve for both a and b. – garrett Jan 29 '11 at 22:05
@garrett: Exactly. – Arturo Magidin Jan 29 '11 at 22:10
Thank you very much for providing your time to help me learn. You are awesome. – garrett Jan 29 '11 at 22:19
@garrett: My pleasure. You should now be able to start voting questions and answers up, by the way. – Arturo Magidin Jan 29 '11 at 22:21
@Arturo Magidin: As I work out the problem, I notice that the help you provided has an small error: the coefficient for cos(t) should be (-2b - a). – garrett Jan 30 '11 at 16:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.