# How to solve $y^{\prime \prime}(x)= a \cos (y)$?

I was solving a physics questions and was stuck on this differential equation: $$y^{\prime \prime}(x)= a \cos (y)$$, where $$a$$ is some constant.

I have no idea how to start. Please give a hint.

• From Wolfram Alpha this is not looking very pretty – gt6989b Apr 24 at 4:11
• This is a very nonlinear equation. Only certain classes are exactly solvable. This is not one of them. Best you can do is a numerical solution. – Cameron Williams Apr 24 at 4:14
• @mnc8765, the method I present is a pretty standard one for solving such differential equations in physics. The integration gives an implicit relationship between $x$ and $y$ which can be inverted using numerical calculations. If you have initial values for $y'(0)$ and $y(0)$ then my approach can be adapted to accomodate them. – Spencer Apr 24 at 4:19
• change variable to $\theta = \frac{\pi}{2} - y$, your equation becomes $\theta'' + a \sin\theta = 0$, the equation for a simple pendulum. The solution of $\theta$ can be expressed in terms of Jacobi amplitude (as pointed out in David G. Stork's answer) – achille hui Apr 24 at 5:32
• You now have two answers to your question, and some very good advice in the comments. Is there something you still need clarified at this point? If not then it would be appropriate to accept one of the answers. – Spencer Apr 24 at 15:21

Let $$z=\frac{dy}{dx},$$ then $$\frac{d^2y}{dx^2} = \frac{dz}{dx} = \frac{dz}{dy} \frac{dy}{dx} = \frac{dz}{dy} z$$

Now we will apply this to your differential equation,

$$\frac{d^2y}{dx^2} = a \cos(y)$$

$$z \frac{dz}{dy} = a \cos(y)$$

$$\int z \ dz= \int a \cos(y)\ dy$$

$$\frac12 z^2 = a \sin(y) + C$$

Solve for $$z$$ and then integrate

$$z = \sqrt{2}\sqrt{ a \sin(y) + C}$$

$$\frac{dy}{dx} = \sqrt{2}\sqrt{ a \sin(y) + C}$$

$$\int \frac{dy}{\sqrt{2}\sqrt{ a \sin(y) + C} } = \int dx$$

$$\boxed{ \int \frac{dy}{\sqrt{2}\sqrt{ a \sin(y) + C} } = x + D }$$

As a physicist, I have a sneaking suspicion that you've mis-copied your equation (which is very close to one of the most important physics equations).

$$\left\{\left\{y(x)\to \frac{1}{2} \left(\pi -4 \text{am}\left(\frac{1}{2} \sqrt{\left(2 a+c_1\right) \left(x+c_2\right){}^2}|\frac{4 a}{2 a+c_1}\right)\right)\right\},\left\{y(x)\to \frac{1}{2} \left(4 \text{am}\left(\frac{1}{2} \sqrt{\left(2 a+c_1\right) \left(x+c_2\right){}^2}|\frac{4 a}{2 a+c_1}\right)+\pi \right)\right\}\right\}$$