Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.


I would appreciate any help solving the following equation:

$$\begin{align} y''[t] + \dfrac{d}{m}y'[t] + \dfrac{k}{m}y[t] = G \\ \end{align}$$ subject to: $$t[0] = t0$$ $$t'[0] = 0$$

This is not HW, this is for a website where I try to simulate object attached to a spring falling, as I presented in this question; I just forgot to add damping (d) force so that the object will stop its movement after a while.

Thank you!

share|improve this question
You can ask wolfram alpha for such questions –  userNaN Aug 25 '12 at 22:38
This is a damped harmonic oscillator (cont'd.). –  Rahul Aug 25 '12 at 22:39

1 Answer 1

up vote 3 down vote accepted

Multiply through by $m$ to give $my'' + dy' + ky = Gm.$ First, find the complementary function by solving the homogeneous equation $my'' + dy' + ky = 0.$ Use the trial function $y(t) = e^{\lambda t}$. We get $(m\lambda^2 + d\lambda +k)e^{\lambda t} = 0.$ Since $e^{\lambda t} > 0$ we need to solve $m\lambda^2 + d\lambda +k = 0$ for $\lambda.$ Whence:

$\lambda_{\pm} = \frac{1}{2m}(-d \pm \sqrt{d^2 - 4mk}) \, .$

The complimentary function is then $y(t) = ae^{\lambda_-} + be^{\lambda_+}$ for any $a$ and $b$. Next, we need to find the particular integral. Since the right hand side of $my'' + dy' + ky = Gm$ is constant, we try $y(t) = \alpha$ where $\alpha$ is a constant. Putting that into $my'' + dy' + ky = Gm$ gives $k\alpha = Gm$ and so $\alpha = Gm/k.$ The general solution is then:

$y(t) = ae^{\lambda_-} + be^{\lambda_+} + \frac{Gm}{k} \, .$

Finally, we impose the initial conditions that $y(0) = t_0$ and $y'(0) = 0.$ You will get two simultaneous equations in $a$ and $b$. Solve them gives:

$a = \frac{m\lambda_+(Gm-kt_0)}{k\sqrt{d^2-4mk}} \, , $

$b = \frac{m\lambda_-(Gm-kt_0)}{k(d^2-4mk)} \, . $

Provided I've not made a silly mistake, I get:

$y(t) = \frac{m}{k}\left[ G + \frac{(Gm-kt_0)}{\sqrt{d^2-4mk}}\left(\lambda_+e^{\lambda_-t} + \lambda_-e^{\lambda_+t}\right) \right] \, . $

share|improve this answer
And if $d^2-4mk\lt0$, you might find it more convenient to express the answer in terms of sines and cosines, instead of complex exponentials. –  Gerry Myerson Aug 25 '12 at 23:29
In reality the solution will be a product of a phase shifted cosine and a real exponential. But we need to know the numbers first. –  Fly by Night Aug 25 '12 at 23:45
Wow thank you so much! I'll try it and I really got to take again that math course... thanks again :) –  Israel Aug 25 '12 at 23:56

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.