# trigonometric integral with tangent

$$\int\biggl( \sqrt{\frac{\sin x+1}{\cos x}}+\sqrt\frac{\sin x-1}{\cos x}\biggr)\frac{1}{\cos^2x}\,dx ,\;x\in\Bigl(-\frac{\pi}{2},\frac{\pi}{2}\Bigr)$$ Can somebody give some tips about how can I evaluate this integral,please? I observed that $$\frac{1}{\cos^2x}$$ is the derivative of tangent, but I don't know how to do it using the substitution $$t=\tan x$$ because there will be $$\frac{1}{\cos x}$$ inside and I think there is another method.

• Are you trying to evaluate the integral with the limits $\int_{-\pi/2}^{\pi/2}$, or the indefinite integral? – John Doe Jan 12 at 20:09
• Maybe it should be $\frac{1+\sin{x}}{\cos^2x}$ instead $\frac{1}{\cos^2x}$? – Michael Rozenberg Jan 12 at 20:11
• Notice, that, when you substitute $x + \pi$ for $x$ in the integrand, you get the same function, so according to wikipedia, a sensible change of variable will be $\tan$. – Viktor Glombik Jan 12 at 20:17

I will use integration by parts twice. First we write \begin{align} I &= \int \left (\sqrt{\frac{\sin x + 1}{\cos x}} + \sqrt{\frac{\sin x - 1}{\cos x}} \right ) \sec^2 x \, dx\\ &= \int \big{(}\sqrt{\tan x + \sec x} + \sqrt{\tan x - \sec x} \big{)} \sec^2 x \, dx. \end{align}

If we let $$f(x) = \sqrt{\tan x + \sec x} + \sqrt{\tan x - \sec x}$$ and $$g(x) = \sqrt{\tan x + \sec x} - \sqrt{\tan x - \sec x},$$ then obsereve that $$f'(x) = \frac{1}{3} \sec x \cdot g(x) \quad \text{and} \quad g'(x) = \frac{1}{3} \sec x \cdot f(x).$$ So for the integral we have \begin{align} I &= \int \sec^2 x \cdot f(x) \, dx\\ &= f(x) \cdot \tan x - \int \tan x \cdot f'(x) \, dx \qquad \text{(by parts)}\\ &= f(x) \cdot \tan x - \frac{1}{3} \int \sec x \tan x \cdot g(x) \, dx \\ &= f(x) \cdot \tan x - \frac{1}{3} \sec x \cdot g(x) + \frac{1}{3} \int \sec x \cdot g'(x) \, dx \quad \text{(by parts)}\\ &= f(x) \cdot \tan x - \frac{1}{3} \sec x \cdot g(x) + \frac{1}{9} \int \sec^2 x \cdot f(x) \, dx\\ &= f(x) \cdot \tan x - \frac{1}{3} \sec x \cdot g(x) + \frac{1}{9} I, \end{align} giving $$I = \frac{9}{8} \tan x \cdot f(x) - \frac{3}{8} \sec x \cdot g(x) + C$$ or \begin{align} I &= \frac{9}{8} \tan x \big{(} \sqrt{\tan x + \sec x} + \sqrt{\tan x - \sec x} \big{)}\\ & \qquad - \frac{3}{8} \sec x \big{(} \sqrt{\tan x + \sec x} - \sqrt{\tan x - \sec x} \big{)} + C. \end{align}

First note that if $$f$$ is a function with antiderivative $$F$$, then the antiderivative of its inverse function $$f^{-1}(x)$$ is $$F( f^{-1}(x))-xf^{-1}(x)$$, which can be easily shown by differentiating.

Now let's consider your integral.

Making a trigonometric substitution allows us to consider instead the following integrand: $$s(x)=\sqrt{x+\sqrt{x^2+1}}+\sqrt{x-\sqrt{x^2+1}}$$ Notice that $$s$$ satisfies the property $$s=\sqrt{2x-3s}$$ or $$s^3+3s=2x$$ If $$t$$ is the inverse function of $$s$$ so that $$s(t(x))=x$$ and $$t(s(x))=x$$, we have from the above equation that $$2t=x^3+3x$$ Thus, we may use the formula mentioned at the beginning of the post to solve your integral. The antiderivative of $$t$$ with respect to $$x$$ is $$T(x)=\frac{x^4+6x^2}{8}$$ and so the antiderivative of $$s$$ is given by $$S(x)=T(s(x))-xs(x)$$ where $$T$$ and $$s$$ are defined above. This yields the desired result, and now all you have to do is undo the trig substitution at the beginning, and the value of your integral is $$T(s(\tan(x)))-\tan(x)s(\tan(x))$$

• Is the approach taken here a known method to approach a certain family(ies) of integrals? (similar to say the Half Tangent substitution method for rational trigonometric functions) – user150203 Jan 13 at 0:00
• @DavidG Not that I know of. I just worked it out from scratch. – Franklin Pezzuti Dyer Jan 13 at 0:36
• How did you get that expresion of s(x) ? – Gaboru Jan 13 at 1:36

Hint: Substitute $$\sin(x)=\frac{2t}{1+t^2}$$ $$\cos(x)=\frac{1-t^2}{1+t^2}$$ $$dx=\frac{2dt}{1+t^2}$$

• NONONONONO it makes things wayyyyy worse – clathratus Jan 12 at 20:49
• This gives $$\int\left(\sqrt\frac{1+t}{1-t}+\sqrt\frac{t-1}{t+1}\right)\frac{2(1+t^2)}{(1-t^2)^2}\,dt$$...what then? – John Doe Jan 12 at 21:27
• Now i would substitute the roots. – Dr. Sonnhard Graubner Jan 12 at 21:35