I'm trying to solve the system of differential equations that describes the movement of two bodies attached by springs, in the most generic way, where all the parameters involved are unknown. This would be the drawing of the scene (I'm really sorry for my paint skills):

enter image description here

Let's try to solve this. The force applyed by each spring in its extremes is its constant times the variation of its length. If we calculate the lengths from the positions of the bodies, we have that:

$$ \Delta L_1 = L_1-L_{10} = x_1 - x_{10} = \Delta x_1 $$ $$ \Delta L_2 = L_2-L_{20} = x_2-x_1 - (x_{20}-x_{10}) = \Delta x_2 - \Delta x_1 $$

Therefore, the resultant forces on the bodies are

$$ F_1 = -k_1 \Delta L_1 + k_2\Delta L_2 = -k_1 \Delta x_1 + k_2(\Delta x_2 - \Delta x_1) = -(k_1+k_2)\Delta x_1 + k_2 \Delta x_2 $$ $$ F_2 = -k_2(\Delta x_2 - \Delta x_1) = k_2\Delta x_1 - k_2\Delta x_2 $$

and we could write this differential equation system:

$$ \begin{cases} \dfrac{d^2 \Delta x_1}{dt^2} = -\dfrac{k_1+k_2}{m_1}\Delta x_1 + \dfrac{k_2}{m_2}\Delta x_2 \\ \dfrac{d^2 \Delta x_2}{dt^2} = \dfrac{k_2}{m_2}\Delta x_1 - \dfrac{k_2}{m_2}\Delta x_2 \end{cases} $$

The way I think I could solve it is by adding two more functions such that

$$ u = \dfrac{d \Delta x_1}{dt} \quad \text{and} \quad v = \dfrac{d \Delta x_2}{dt} $$

making the system of four equations but of first order:

$$ \begin{cases} \dfrac{d\Delta x_1}{dt} &= u\\ \dfrac{d\Delta x_2}{dt} &= v\\ \dfrac{du}{dt} &= -\dfrac{k_1+k_2}{m_1}\Delta x_1 + \dfrac{k_2}{m_2}\Delta x_2 \\ \dfrac{dv}{dt} &= \dfrac{k_2}{m_2}\Delta x_1 - \dfrac{k_2}{m_2}\Delta x_2 \end{cases} $$

However, this is really painfull to solve by hand, so I took the Maxima software to do it for me. I wrote the system's matrix and calculate its eigenvalues and eigenvectors:

enter image description here

And then we can write the solution like this (where $x_i$ represents $\Delta x_i$):

enter image description here

But I want to study what happens if the movement starts when I release the second body from an initial displacement $\Delta x_{20}$, wich implies that the first body should be initialy at

$$ F_1 = 0 \Rightarrow \Delta x_{10} = \dfrac{k_2}{k_1+k_2}\Delta x_{20} $$

and initial velocities are both equal to $0$. Then I can solve the system

$$ \begin{cases} \Delta x_1(0) = \dfrac{k_2}{k_1+k_2} \Delta x_{20}\\ \Delta x_2(0) = \Delta x_{20}\\ u(0) = 0\\ v(0) = 0 \end{cases} $$

and get the value for the constants $c_i$. However, when doing this on Maxima I get the following error (remember that in my code $x_i$ is actually $\Delta x_i$):

enter image description here

I don't know what this error means, but maybe any of you can guess where the problem is.

Thank you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.