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.
 A: Hint this is a Riccati differential equation. That is solvable by the method of canonical coordinates as is has underlying symmetries.
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{$_0$F$_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{$_0$F$_1$}(\ ;\,2;\,-{\frac {\cos \left( x \right) g}{r}})}
\sqrt {\cos \left( x \right) } \right) ^{-1}}
$$
