# How to make this integrand nonsingular?

$$T = 4\sqrt{\frac{l}{2g}} \int_0^x{\frac{dy}{\sqrt{\cos(y)-\cos(x)}}}$$

So do i just have to find a way so that the denominator does not result in 0? I am to later evaluate it with x = 51. Which leads me to trouble because I get a 0 in the denominator at x = 51.

EDIT:the problem is that I need to figure out how to evaluate this integral and get an answer without actually changing the integrand itself like i did the first time

Second Edit: had to fix question

Third edit: Potential Solution

x is a constant therefore, cos(x) is treated as a constant.

$cos(y) - cos(x) = t^2$

$-sin(y)dy = 2t dt$

$dy = -\frac{2t}{sin(y)}dt$

$\int_0^x{-\frac{2t}{sin(y)} * \frac{1}{t}}dt$ = $\int_0^x{-\frac{2}{sin(y)}dt}$ = $\frac{-2t}{sin(y)}$ = $\frac{-2\sqrt{(cos(y)-cos(x))}}{sin(y)}$ from y = 0 to x. X is later given as 51 so the solution would be just plug and solve from here?

• Why do you seem to think that $\;\cos y=\cos\left(y-\frac\pi{60}\right)\;$ ?? What is that thing $\;\pi/60\;$ ? Are you mixing something that should be taken with radians with someting ...in degrees? – DonAntonio Dec 14 '16 at 8:53
• You could just as well change the whole integral to 0, 1, or any other number; that would be about as appropriate. – Ivan Neretin Dec 14 '16 at 8:58
• The edit is uninformative. You should rather clarify what you are exactly trying to do and what issue you have with that integral. – user228113 Dec 14 '16 at 9:22
• the problem is that I need to figure out how to evaluate this integral and get an answer without actually changing the integrand itself like i did the first time – Jason B Dec 14 '16 at 9:23
• It might be helpful to write $\cos(y)-\cos(x)=2\sin\left(\frac{x+y}2\right)\sin\left(\frac{x-y}2\right)$ – robjohn Dec 14 '16 at 9:34

This can be written in terms of an elliptic integral of the first type using the identity $$2\sin^2{\alpha} =1-\cos{(2\alpha)}$$

$$T=4\sqrt{\frac{l}{2g}}\int_{0}^{x}\frac{dy}{\sqrt{\cos{y}-\cos{x}}}=2\sqrt{\frac{l}{g}}\int_{0}^{x}\frac{dy}{\sqrt{\sin^2{(x/2)}-\sin^2{(y/2)}}}$$ Now the substitution $\sin{\xi}=\sin{(y/2)}/\sin{(x/2)}$ yields to $$T = 4\sqrt{\frac{l}{g}}\int_{0}^{\pi/2}\frac{d\xi}{\sqrt{1-(\sin{(x/2))^2\sin^2{\xi}}}}$$ This integral does not have any primitive and must be solved numerically.

$\textbf{Adendum}$

In order to compute $dy(\xi)$ apply the chain rule to $dy(\xi)=\frac{dy}{d\xi}d\xi$. To obtain this derivative, derive the equation with the proposed change of variables with respect to $\xi$ as it follows: $$\sin{(x/2)}\cos{\xi}=\frac{1}{2}\cos{(y/2)}\frac{dy}{d\xi}=\frac{1}{2}\sqrt{1-\sin^2{(y/2)}}\frac{dy}{d\xi}=\frac{1}{2}\sqrt{1-(\sin{(x/2)}^2\sin^2{\xi}}\frac{dy}{d\xi}$$ and solve for $\frac{dy}{d\xi}$

• what do you mean by no primitive and solved numerically? Like a numerical approximation method? – Jason B Dec 14 '16 at 13:20
• Yes! this integral has no closed analytic expression. You will have to apply a numerical integration rule to solve it e.g. Simpson's rule works very good even only choosing 3 integration points: $0$, $\pi/4$ and $\pi/2$ – HBR Dec 14 '16 at 13:27
• Thanks! looking at your solution made me think of the adaptive simpson's method. – Jason B Dec 14 '16 at 13:29
• @HBR: The AGM (arithmo-geometric mean) is more suited for finding values of complete elliptic integrals of the first kind, since it has quadratic convergence, see Borwein, Pi and the AGM. – Jack D'Aurizio Dec 14 '16 at 13:59
• Thank you for the suggestion!! – HBR Dec 14 '16 at 14:09