# Pendulum motion differential equations

I have been attempting to construct vector valued functions that model the motion of a simple pendulum. Thus far, I obtained an equation to model acceleration and was attempting to find an equation to model the velocity. However, the differential equation that must be solved seems very difficult, if not impossible, to solve. Solving the x component of velocity requires solving this differential equation:

$$\frac{dy}{dx}+\frac{y^2}{r}sec(x)tan(x)+gsin(x)cos(x)=0$$

Is it possible to find a solution? I have tried a variety of substitutions and done research to attempt to determine an integration factor, but to no avail.

• What kind of pendulum is that? If you are using a single degree of freedom pendulum with the angle as the degree of freedom, then your ODE should look like this $$\ddot{\varphi}+\dfrac{g}{l}\sin \varphi=0$$. – MrYouMath Oct 30 '17 at 17:57

The solution is not trivial and can be obtained by using Maple (maybe also with Sympy or Mathematica; Wolfram alpha does not return a result). It will contain Bessel functions $K_0$ and $K_1$ and the hypergeometric function \mbox{$_0$F$_1$}.
$$y \left( x \right) =1/2\,{\frac {\sin \left( x \right) }{ \left( \cos \left( x \right) \right) ^{2}\sec \left( x \right) \tan \left( x \right) } \left( 2\,{{K}_{0}\left(2\,\sqrt {\cos \left( x \right) }\sqrt {-{\frac {g}{r}}}\right)} \left( \cos \left( x \right) \right) ^{3/2}\sqrt {-{\frac {g}{r}}}{\it c_1}\,r+ {\mbox{_0F_1}(\ ;\,3;\,-{\frac {\cos \left( x \right) g}{r}})}g \left( \cos \left( x \right) \right) ^{5/2}+2\,{{K}_{1}\left(2\, \sqrt {\cos \left( x \right) }\sqrt {-{\frac {g}{r}}}\right)}\cos \left( x \right){\it c_1}\,r \right) \left( {c_1}\,{{K}_{ 1}\left(2\,\sqrt {\cos \left( x \right) }\sqrt {-{\frac {g}{r}}} \right)}+ {\mbox{_0F_1}(\ ;\,2;\,-{\frac {\cos \left( x \right) g}{r}})} \sqrt {\cos \left( x \right) } \right) ^{-1}}$$
• @LutzL: Noticed that I missed the missing $y$ in the $g\sin x \cos x$ term. – MrYouMath Oct 30 '17 at 18:04