2
$\begingroup$

I want to solve the following differential equation:

$y[t]$ : vertical position (height) of the object at time t
$y_c$ : height of the ceiling
$y_e$ : equilibrium point, the height at which the mass will stop at the end of its movement.
$a[t]$ : acceleration at time t
$t$ : time
$k$ : spring coefficient
$m$ : mass of the object
$G$ : gravity

$\begin{align} &F = -ky[t] - mG \\ \Leftrightarrow &ma[t] = -ky[t] -mG \\ \Leftrightarrow&my''[t] = -ky[t] -mG\\ \Leftrightarrow&y''[t] = -\dfrac{k}{m}y[t] -G \end{align}$ subject to:
$y[0] = y_c\\y'[0] = 0$

I'm not really sure how to do so. The equation is for modeling the movement of a falling object that is attached to a spring that is attached to the ceiling, thus gravity ($G$) is involved. appreciate your help:

Appreciate your help :)

  • 0
    Hi, I'm not sure, I'm a programmer, not a mathematician, I just want a formula that would produce the y of the object for a given time.2012-08-23

2 Answers 2

3

Let $\omega = \sqrt{k/m}$ so that the differential equation we wish to solve is $ y'' + \omega^2 y = -G $ Given any two solutions $y_1, y_2$, their difference satisfies $y'' + \omega^2 y = 0$, and the general solution of this is given by $y(t) = A cos(\omega t) + B \sin(\omega t)$. Hence the general solution of the original equation is $ y(t) = A \cos(\omega t) + B \sin (\omega t) + y_p(t)$ where $y_p(t)$ is any particular solution to the original equation. However, the equation is easy enough that we can guess a solution using the method of undetermined coefficients. In this case we can guess $y_p(t) = c$ where $c$ is a constant. Plugging it into the differential equation yields: $ \omega^2 c = - G$ hence $c = -G / \omega^2$. So the general solution to the original equation is $ y(t) = A \cos(\omega t) + B \sin(\omega t) - \frac{G}{\omega^2}$

Setting $t=0$, we find $ y_0 = A - \frac{G}{\omega^2} $ and $ y'_0 = B \omega $ so that $ y(t) = \left(y_0 + \frac{G}{\omega^2} \right) \cos(\omega t) + \frac{y'_0}{\omega} \sin(\omega t) - \frac{G}{\omega^2} $

  • 0
    Thanks! What a wonderful explanation! :)2012-08-24
2

I have not checked your derivation of the final differential equation, but assuming we start from

$y''=-\frac k m y - G$ Where $k,m,G$ are constants, we can use the annihilator method, considering the linear differential operator $L=D(D^2+\frac k m)$. This has the general solution $y(t)=-\frac k m G+c_1\cos{\sqrt \frac k m t}+c_2\sin{\sqrt\frac k m t}$, and the coefficients $c_1,c_2$ can easily be found by plugging in your initial conditions.