Discrepancy in evaluating an integral $\int(\sqrt{\tan x} + \sqrt{\cot x})dx$.

definite integralsintegrationtrigonometric-integralstrigonometry

Consider

$$I = \int(\sqrt{\tan x} + \sqrt{\cot x}) dx$$

If we convert everything to $\sin x$ and $\cos x$, and try the substitution $t = \sin x – \cos x$ , we get

$$I= \sqrt2 \int \frac{dt}{\sqrt{1-t^2}} = \sqrt{2} \arcsin(\sin x-\cos x) + C$$

However, if we originally substitute $ \tan x = t^2$, and proceed as how ron gordon did here: Calculate $\int\left( \sqrt{\tan x}+\sqrt{\cot x}\right)dx$, we get a seemingly different answer, which my textbook happens to offer:

$$I=\sqrt{2} \arctan\left(\frac{\tan x-1}{\sqrt{2 \tan x}}\right)+C$$

Wolfram confirms that these two functions are indeed different.

  1. What went wrong?

    If we draw a right triangle with an angle $\theta$,with the opposite side as $\tan x-1$ and the adjacent side as $\sqrt{2 \tan x}$, then the hypotenuse becomes $\sec x$.Thus, $\theta=\arctan\left(\frac{\tan x-1}{\sqrt{2 \tan x}}\right) = \arcsin(\sin x – \cos x)$, which should mean the functions are equivalent.

Does it have something to do with the domain of the inverse trig functions?

Best Answer

The domain of the integrand $\sqrt{\tan x}+\sqrt{\cot x}$ is the first and third quadrants, while $\sqrt2\arcsin(\sin x- \cos x)$ is only valid for the first quadrant. The anti-derivative for both quadrants is instead

$$\sqrt2\arcsin(|\sin x|- |\cos x|)$$

which ensures the equivalency, i.e.

$$ \arctan\frac{\tan x-1}{\sqrt{2 \tan x}}=\arcsin(|\sin x|- |\cos x|) $$