How to solve this second-order nonlinear ordinary differential equation? $y''(x)=a-b \cdot \tan\left(y(x) \cdot c\right)$ How to solve this second-order nonlinear ordinary differential equation?
$y''(x)=a-b \cdot \tan\left(y(x) \cdot c\right)$
$ a, b, c, x \in \Bbb R; \text { and constant}; x > 0$
 A: There is a standard method to reduce these types of equations to quadratures. People with physics background will recognize this equation as a special case of the equation of motion of a particle in one-dimension under the influence of a conservative force, with $x=$ time and $y$ the coordinate of the particle. The trick is to realize that this equation has a conserved quantity (the energy in the physics setting), and then use it to find the inverse function $x(y)$ instead of $y(x)$. First write the differential equation as:
$$ \frac{dy'}{dx}=a-b\tan(cy)=-\frac{d}{dy}\left(-ay-\frac{b}{c}\ln|\cos(cy)|\right)\,.$$
Multiplying the equation by $y'$ we get:
$$\begin{aligned}
y'\frac{dy'}{dx}=\frac{d}{dx}\left(\frac{1}{2}y'^2\right)&=
-y'\frac{d}{dy}\left(-ay-\frac{b}{c}\ln|\cos(cy)|\right)\\
&=-\frac{d}{dx}\left(-ay-\frac{b}{c}\ln|\cos(cy)|\right)\,,
\end{aligned}$$
or
$$\frac{d}{dx}\left(\frac{1}{2}y'^2-ay-\frac{b}{c}\ln|\cos(cy)|\right)=0\,.$$
This implies that the following quantity $E$ is conserved, i.e. is a constant that can be identified once the initial conditions are known: 
$$ E = \frac{1}{2}y'^2-ay-\frac{b}{c}\ln|\cos(cy)|\,.$$
This reduces the equation to a first order equation with separated variables (the initial $\pm$ can be determined from the initial conditions):
$$\frac{dy}{dx} = \pm\sqrt{2E+2ay+\frac{2b}{c}\ln|\cos(cy)|}\,.$$
From here we get $x(y)$:
$$x(y) = \pm\int\frac{dy}{\sqrt{2E+2ay+\frac{2b}{c}\ln|\cos(cy)|}}+D\,,$$
where $D$ is a constant of integration to be found by the initial conditions. In this case it does not look to me that the integral can be done in terms of simple functions, which is the case most of the time anyway. But it is the formal solution to the ODE in terms of quadratures. It allows to analyze lots of properties of the solution, like turning points, when it has periodic solutions (and to get an equation for the period in the form of an integral), etc..
