# Solving system of 2nd order coupled ODEs

I have to derive equations of motion from Lagrangian and stumbled upon the following system of equations (constants are simplified, that information is unneeded)

$\begin{cases} \ddot{x}-A\dot{y}+Bx=0 \\ \ddot{y}+A\dot{x}+Dy=0 \end{cases}$

This is an extension of a simpler problem where B=D. There I just multiplied the second equation by i, added equations together, substituted z=x+iy and solved for z.

But doing the same with current system doesn't help much (can't substitute z=x+iy, b/c $B\ne{D}$).

When choosing E=(B+D)/2 and F=E-B then

$\begin{cases} \ddot{x}-A\dot{y}+Ex=Fx\\ \ddot{y}+A\dot{x}+Ey=-Fy \end{cases}$

isn't much help either.

I know there are some techniques for solving coupled differential equations like writing a reciprocal matrix for the system but it seems that it applies only to 1st order ODEs.

Is there any analytic solutions to this?
When punching it into Maple, it throws a huge block of square roots, although simpler problem gave me a combination of exponentials (for z). I know this problem must give similar answer with little modifications, but don't know how to tackle it.

Help and pointers much appreciated

worryingchem

arildno
Homework Helper
Gold Member
Dearly Missed
Differentiate the first equation, and get an equation for doubledotted y in terms of the x-terms.
Insert this into your second equation, to get y expressed in terms of x-terms.
Differentiate THIS for an expression for singledotted y, and insert this into your first equation.
That is a fourth-order differential equation for x(t)

Thanks, worked.
But it's strange that equations for x and y have both the same solution (although it shouldn't). I dropped fourth order derivative and solved second order ODE.
Case closed for now.

arildno
Homework Helper
Gold Member
Dearly Missed
You can't drop the fourth order derivative.
You have no reason to assume it is sufficiently small, relative to the other terms

Well, depends on the problem (I am using small angle approximation as my problem inherently allows me to do that)

arildno
Homework Helper
Gold Member
Dearly Missed
Well, depends on the problem (I am using small angle approximation as my problem inherently allows me to do that)
Not really. The angle might be small, even though the higher rates of changes aren't.

If you have positive B, for example, you will have two vibrational modes, not a single harmonic motion.

Only if (1+A^2+B)^2-4B is negligible, relative to (1+A^2+B) can you make that simplification.

Context: problem I need to solve is about pendulum in a rotating frame
Well, I already dropped all components that are Big O(angle ^3) and beyond in Lagrangian, for the sake of finding analytic solution (otherwise I'd have system of three coupled 2nd order diff equation with variable coefficient, no good). I believe that including further analytic accuracy won't weigh up real life effects, although interesting effects may occour.
I already included centrifugal, Coriolis and Eötvös effects (the reason I was surprised that equations of motion are the same for x and y; will redo my math tomorrow). Two vibrational modes are kind of things that are beyond me. Is it something like oscillating around its trajectory or..? Eager to know.

arildno
Homework Helper
Gold Member
Dearly Missed
IGNORE THIS POST!!!
It means you have two distinct angular frequencies.
(Your four solutions is therefore a linear combination of the sines and cosines of those two frequencies)

Assuming B>0, those frequencies will be:
$$\omega_{1}=\sqrt{\frac{(1+A^{2}+B)+\sqrt{(1+A^{2}+B)^{2}-4B}}{2}}$$
$$\omega_{2}=\sqrt{\frac{(1+A^{2}+B)-\sqrt{(1+A^{2}+B)^{2}-4B}}{2}}$$

OOPS!
I just see that in my mental calulation here, I managed to treat A=D
That makes my solution all awry, but my point about the two frequencies is still valid.
Now, it is night time here in Oslo, so I'll get back to this tomorrow.

Last edited:
arildno
Homework Helper
Gold Member
Dearly Missed
Couldn't sleep yet, so here we go:
The first equation yields us:
$$A\ddot{y}=\dddot{x}+B\dot{x}$$
Thus, the second equation yields:
$$ADy=-\dddot{x}-(B+A^{2})\dot{x}$$
so that:
$$-A\dot{y}=\frac{1}{D}(\ddddot{x}+(B+A^{2})\ddot{x})$$
Thus, the first equation can be rewritten as:
$$\ddddot{x}+(B+D+A^{2})\ddot{x}+BDx=0$$

An exponential trial solution $x(t)=Ke^{rt}$ yields the characteristic equation:
$$r^{4}+(B+D+A^{2})r^{2}+BD=0$$
Or, solving for r squared:
$$r^{2}=\frac{-(B+D+A^{2})\pm\sqrt{(B+D+A^{2})^{2}-4BD}}{2}$$
(my error was D=1, not D=A).
Now, note that for non-negative B and D, r^2 is necessarily negative (and the innermost radicand can be shown to be positive).
the plus/minus solutions yield the two angular frequencies, when finding imaginary solutions r:
$$\omega_{1}=\sqrt{\frac{(B+D+A^{2})+\sqrt{(B+D+A^{2})^{2}-4BD}}{2}}$$
$$\omega_{2}=\sqrt{\frac{(B+D+A^{2})-\sqrt{(B+D+A^{2})^{2}-4BD}}{2}}$$

You may also rewrite these two frequencies as:
$$\omega_{1}=\frac{\hat{\omega}}{\sqrt{2}}\sqrt{1+{\sqrt{1-\epsilon}}}, \hat{\omega}=\sqrt{(B+D+A^{2})}, \epsilon=\frac{4BD}{(B+D+A^{2})^{2}}$$
$$\omega_{2}=\frac{\hat{\omega}}{\sqrt{2}}\sqrt{1-\sqrt{1-\epsilon}}$$

----------------------
Your general solution for x(t) is, therefore, up to 4 constants determined by initial conditions:
$$x(t)=C_{1}\cos(\omega_{1}t)+C_{2}\sin(\omega_{1}t)+C_{3}\cos(\omega_{2}t)+C_{4}\sin(\omega_{2}t)$$
----------------------------------
Note that in the limit, $\epsilon\to{1}$, we get a single frequency,
$$\omega=\frac{\hat{\omega}}{\sqrt{2}}$$, whereas
in the limit $\epsilon\to{0}$, we get TWO frequencies,
$$\omega_{1}=\hat{\omega}$$
$$\omega_{2}=\sqrt{\frac{BD}{B+D+A^{2}}}$$
By omitting the fourth order derivative, you lose the high frequency, $\omega_{1}$
-----
That your problem should have TWO fundamental frequencies, rather than just one, ought to be obvious, because you have two independent sources of "periodic" motion: The pendulum's own frequency of oscillation, and the rotating frame's rotation rate.

Last edited:
arildno
Homework Helper
Gold Member
Dearly Missed
Having nothing better to do today, I'll derive the full solution for x(t)
1. Setting:
$$x(0)=x^{(0)}$$
$$\dot{x}(0)=x^{(1)}$$
$$\ddot{x}(0)=x^{(2)}$$
$$\dddot{x}(0)=x^{(3)}$$
2. We gain, by differentiating thrice the general solution, evaluating at t=0:
$$x^{(0)}=C_{1}+C_{3}$$
$$x^{(2)}=-\omega_{1}^{2}C_{1}-\omega_{2}^{2}C_{3}$$
$$x^{(1)}=\omega_{1}C_{2}+\omega_{2}C_{4}$$
$$x^{(3)}=-\omega_{1}^{3}C_{2}-\omega_{2}^{3}C_{4}$$
3. Therefore:
$$C_{1}=\frac{\omega_{2}^{2}x^{(0)}+x^{(2)}}{\omega_{2}^{2}-\omega_{1}^{2}}$$
$$C_{3}=\frac{\omega_{1}^{2}x^{(0)}+x^{(2)}}{\omega_{1}^{2}-\omega_{2}^{2}}$$
$$C_{2}=\frac{\omega_{2}^{2}x^{(1)}+x^{(3)}}{\omega_{1}(\omega_{2}^{2}-\omega_{1}^{2})}$$
$$C_{4}=\frac{\omega_{1}^{2}x^{(1)}+x^{(3)}}{\omega_{2}(\omega_{1}^{2}-\omega_{2}^{2})}$$
4. Simplifications:
We have:
a) $$\omega_{1}^{2}-\omega_{2}^{2}=\hat{\omega}^{2}\sqrt{1-\epsilon}$$
b)
$$x^{(2)}=Ay^{(1)}-Bx^{(0)}$$
c)
$$x^{(3)}=-(A^{2}+B)x^{(1)}-ADy^{(0)}$$
5. That is:
$$C_{1}=-\frac{(\omega_{2}^{2}-B)x^{(0)}+Ay^{(1)}}{\hat{\omega}^{2}\sqrt{1-\epsilon}}$$
$$C_{3}=\frac{(\omega_{1}^{2}-B)x^{(0)}+Ay^{(1)}}{\hat{\omega}^{2}\sqrt{1-\epsilon}}$$
$$C_{2}=\frac{(\omega_{2}^{2}-A^{2}-B)x^{(1)}+ADy^{(0)}}{\omega_{1}\hat{\omega}^{2}{\sqrt{1-\epsilon}}}$$
$$C_{4}=-\frac{(\omega_{1}^{2}-A^{2}-B)x^{(1)}+ADy^{(0)}}{\omega_{2}\hat{\omega}^{2}{\sqrt{1-\epsilon}}}$$
Collected together, this is the solution for x(t), relative to the 7 arbitrary constants the problem includes.

Last edited:
Thank you!

I did my math by myself and verify your solution, although I searched solution in the form $x(t)=x_0e^{i\omega{t}}$, so it's just a matter of adding an imaginary unit here and there. It's now clear to me, why one cannot drop fourth derivative - when dealing with rotating reference frames, the solution must include two different frequencies.

For now, I must find conditions for coefficients in equation of motion that satisfy small angle approximation, but that's a whole different topic. Some questions have arisen tho, but I will formulate them after deadline in another topic.

arildno
I did my math by myself and verify your solution, although I searched solution in the form $x(t)=x_0e^{i\omega{t}}$, so it's just a matter of adding an imaginary unit here and there. It's now clear to me, why one cannot drop fourth derivative - when dealing with rotating reference frames, the solution must include two different frequencies.