Solve $f''(x) = \cos (f(x))$

304 Views Asked by At

I wanted to solve the differential equation : $$\frac{d^2y}{dx^2} = \cos y$$

I know how to solve it if it was a first derivative ($y'=\cos y $), But I have no intuition on this one.

Either an explicit or an implicit relation is good for me, but I was more curious about the process than the answer, as I am generally stuck at second derivatives in differential equations.

3

There are 3 best solutions below

0
On BEST ANSWER

$$\frac{d^2y}{dx^2}=\cos(y)$$ $$2\frac{d^2y}{dx^2}\frac{dy}{dx}=2\cos(y)\frac{dy}{dx}$$ $$\left(\frac{dy}{dx}\right)^2=2\sin(y)+c_1$$ $$\frac{dy}{dx}=\pm\sqrt{2\sin(y)+c_1}$$ $$x=\pm\int \frac{dy}{\sqrt{2\sin(y)+c_1}}+c_2$$ This integral cannot be expressed with a finite number of elementary functions. A closed form involves a special function, the elliptic integral of first kind : $$x=\pm\frac{2}{c_1+2}F\left(\frac{\pi-2y}{4}\:\Bigg|\:\frac{4}{c_1+2} \right)+c_2$$ http://mathworld.wolfram.com/EllipticIntegraloftheFirstKind.html

The inverse function is the Jacobi amplitude function : $$y(x)=\frac{\pi}{2}\pm 2\:\text{am}\left(\frac12\sqrt{c_1+2}(x-c_2)\:\Bigg|\:\frac{4}{c_1+2} \right)$$ http://mathworld.wolfram.com/JacobiAmplitude.html

Do not expect simpler formula with elementary functions, except for particular values of the arbitrary parameter $c_1$. This depends on the boundary conditions (Not specified in the wording of the question).

If you are not familiar with the use of the so called "special functions" in calculus, see https://en.wikipedia.org/wiki/Special_functions , or this paper for general public : https://fr.scribd.com/doc/14623310/Safari-on-the-country-of-the-Special-Functions-Safari-au-pays-des-fonctions-speciales

2
On

Write

$$2f''(x)f'(x)=2\cos(f(x)) f'(x)$$

and integrate.

This gives $$f'^2(x)=2\sin(f(x))+C$$

or

$$\frac{f'(x)}{\sqrt{2\sin(f(x))+C}}=\pm1.$$

The story ends here because this integral requires an elliptic function.

0
On

Here's what you can do, more or less:

If

$y'' = \cos y, \tag 1$

we can multiply through by $y'$:

$y'y'' = y' \cos y; \tag 2$

observe that

$\dfrac{1}{2}((y')^2)' = y'y'', \tag 3$

and that

$(\sin y)' = y' \cos y; \tag 4$

then (2) becomes

$\dfrac{1}{2}((y')^2)' = (\sin y)', \tag 5$

or

$((y')^2)'= 2 (\sin y)', \tag 6$

which my be integrated to yield

$(y')^2 = 2 \sin y + K \tag 7$

for some constant $K$. Thus,

$y' = \pm \sqrt{2\sin y + K}, \tag 8$

which, as has been pointed out by JJacquelin and Yves Daoust in their answers, cannot be integrated further in elementary terms.

Another suggestion which does in fact yield some insight into the solutions to (1), was made by Jon in his comment on the question itself, and that is to utilize the so-called energy method to at least analyze, if not completely solve, (1). If we set

$z = y', \tag 9$

then (1) becomes the system comprised of (9) and

$z' = \cos y, \tag{10}$

and from what we have seen (7) becomes

$z^2 = 2 \sin y + K, \tag{11}$

and likewise (8) yields

$z = \pm \sqrt{2 \sin y + K}. \tag{12}$

Though we can't solve (1) in closed form analytically, (11) and (12) may be used to analyze and sketch the integral curves of (1), (9)-(10) in the $y$-$z$ plane; as we change the value of the parameter $K$, which is conserved along the trajectories of the system, we will obtain different orbits of the system. Since pursuing this direction here would involve a rather lengthly discussion, we leave it to the reader to explore this further on his or her own.

Finally, it is worth noting that general systems of the form

$y'' = f(y), \tag{13}$

which do not explicitly contain $y'$ on the right-hand side, may be subject to a similar method of analysis, in which we multiply (13) by $y'$ to obtain

$y'' y' = f(y) y', \tag{14}$

or

$\dfrac{1}{2}((y')^2)' = \displaystyle \left [ \int f(y)y' \; dx \right]'; \tag{15}$

taking the anti-derivative of (15) yields

$\dfrac{1}{2} (y')^2 = \displaystyle \int f(y)y' dy + K, \tag{16}$

a functional relationship 'twixt $y$ and $y'$($ = z)$ which is often useful to extract information about the integral curves or (13); and in some limited number of cases (16) may actually lead to a closed-form solution of (13).