# Trigonometric integral with cosinus

I cannot solve the equation below: I know what I typed is wrong byt I can't understand where it went sour.

$$\int \frac{1}{\cos(5x)} dx$$ \left[ \begin{align*} 5x=s\\ x=\frac{s}{5}; \frac{dx}{ds}=\frac{1}5 \end{align*} \right] $$\frac{1}{5}\int \frac{1}{\cos (s)}\frac{\cos (s)}{\cos (s)}\,ds= \frac{1}{5}\int \frac{\cos (s)}{\cos^2(s)}\,ds=\frac{1}{5}\int \frac{\cos (s)}{1-\sin^2(s)}\,ds$$

\left[ \begin{align*} \sin(s)=y\\ \frac{dy}{ds}=-\cos(s) \end{align*} \right]

$$\frac{1}{5} \cdot -\frac{1}{2}\int -\frac{1}{1-y}-\frac{1}{1+y} dy$$ $$\left[ -(-\ln(1-y) - \ln(1+y)\right] = \left[ \ln\frac{(1-y)}{(1+y)}\right] = \left[ \ln\frac{(1-\sin(s))}{(1+\sin(s))}\right] = \left[ \ln\frac{(1-\sin(5x))}{(1+\sin(5x))}\right]$$

• The standard term in English is "cosine" rather than "cosinus". Jun 19, 2018 at 11:40
• The derivative of sine is cosine, not minus-cosine, hence for $y=\sin s$ you should get $dy/ds = \cos s$, not $-\cos s$. Jun 19, 2018 at 12:17

Hint. Note that taking the derivative of $$\ln\left(\frac{1-\sin(5x)}{1+\sin(5x)}\right)=\ln(\underbrace{1-\sin(5x)}_{>0})-\ln(\underbrace{1+\sin(5x)}_{>0})$$ we get $$\frac{-5\cos(5x)}{1-\sin(5x)}-\frac{5\cos(5x)}{1+\sin(5x)}= -\frac{10\cos(5x)}{1-\sin^2(5x)}=-\frac{10}{\cos(5x)}.$$ So you are not so far from the correct answer: you just forgot to consider the constant $\frac{1}{5} \cdot -\frac{1}{2}$ in the last line.

Have you met the $\sec$ function? That will make things a lot easier here. We have that $\sec y =\frac{1}{\cos y}$, therefore your integral becomes: $$\int{\sec (5x) dx}$$Standard integration, while remembering to divide by the $5$, gives us $$\frac15\ln|\sec(5x)+\tan(5x)|+C$$

I believe your mistake is that $$y=\sin(s)\to\frac{dy}{ds}=\cos(s) \text{ rather than } (-\cos(s))$$

• "Standard integration" is a little terse.
– user65203
Jun 19, 2018 at 8:31
• Nope, have not met them yet... Jun 19, 2018 at 8:42

Interestingly, you can work this out with the unintuitive subsitution $u=\sin 5x$ directly.

$$x=\frac15\arcsin u,dx=\frac15\dfrac{du}{\sqrt{1-u^2}},\\\int\frac{dx}{\cos 5x}=\frac15\int\frac{du}{\sqrt{1-u^2}\sqrt{1-u^2}}=\frac15\int\frac{du}{1-u^2}.$$

The last integral is elementary, giving

$$\frac15\int\frac{du}{1-u^2}=\frac15\text{artanh }u=\frac15\text{artanh}(\sin 5x).$$

If you never heard of the hyperbolic functions, notice the similarity with the ordinary arc tangent, and check the logarithm-based formula. Of course, you get the same result with fraction decomposition.

• I don't understand what's going on here, but thank you. I'll be back later when I understand better :) Jun 19, 2018 at 11:39
• @Dovendyr: an ordinary change of variable followed by a "table lookup".
– user65203
Jun 19, 2018 at 11:59

Collecting your result, we indeed have

$$I=\frac15\left(-\frac12\right)\left[ \ln\frac{1-\sin(5x)}{1+\sin(5x)}\right]+C$$ which is correct as can be checked by differentiation.

It is not even necessary to consider absolute values, as the numerator and denominator are non-negative.

Just a little reproach on you: you didn't clearly show the links between the partial results.

• Hi. I am sorry, where is this 5 coming from? Jun 19, 2018 at 8:46
• I don't understand what you mean by showing the link between partial results? Jun 19, 2018 at 8:47
• @Dovendyr: sorry for the typo.
– user65203
Jun 19, 2018 at 8:50
• @Yves_Daoust: noproblem! Jun 19, 2018 at 12:55