# Integration of $\int \tan^2 x \ dx$ without the use of trig identities

I am trying to integrate $\int \tan^2 x \ dx$ without the use of trig identities, although I know that using $1 + \tan^2 x \equiv \sec^2 x$ makes the question trivial.

Using the exponential form of tan(x) I arrived at

$$-\int \dfrac{(e^{2ix}-1)^2}{(e^{2ix}+1)^2} \ dx$$

I have not studied complex integration, so I am wary of using substitutions of such as $u = e^{2ix} + 1$ because I do not know if they are valid.

• There is nothing wrong with using a $u$-substitution like that, however realize that $du = 2ie^{2ix} dx$. You don't actually remove the presence of $x$ from the integral with that choice of $u$. Treat $i$ as an constant just like you normally would a value $c$. – Axoren Feb 28 '15 at 0:24

Taking a look here would be great.

Note that $$\tan^2 x=\sum_{n=1}^{\infty}\frac{t_{n+1}}{(2n)!}x^{2n},$$ with $t_n$ being tangent numbers and defined as $\displaystyle t_n=\frac{2^{2n}(2^{2n}-1)|B_{2n}|}{2n}, n=1,2,...$. Therefore \begin{align} \int \tan^2x dx&=\sum_{n=1}^{\infty}\frac{t_{n+1}}{(2n)!}\int x^{2n}dx\\ &=\sum_{n=1}^{\infty}\frac{t_{n+1}}{(2n)!}\frac{x^{2n+1}}{2n+1}dx\\ &=\sum_{n=1}^{\infty}\frac{t_{n}}{(2n-1)!}x^{2n-1}dx-t_1 x\\ &=\sum_{n=1}^{\infty}\frac{t_{n}}{(2n-1)!}x^{2n-1}dx- x\\ &=\tan x -x \end{align}

$$\int\tan^2xdx=\int\frac{\sin^2{x}}{\cos^2{x}}dx=\int\frac{1-\cos{2x}}{2\cos^2{x}}dx=*$$ here we used trigonometric formula $\sin^2{x}=1-\cos{2x},$ $$*= \int\frac{1-\cos{2x}}{2\cos^2{x}}dx=\frac{1}{2}\int\frac{1}{\cos{2x}}dx - \frac{1}{2} \int \frac{\cos{2x}}{\cos^2{x}}dx=*$$ now we will use this one $\cos{2x}=2\cos^2{x}-1,$ $$*= \frac{1}{2} \tan{x} - \frac{1}{2}×2\int\frac{\cos^2{x}}{cos^2{x}}dx + \frac{1}{2}\int\frac{1}{\cos^2{x}}dx= \frac{1}{2}\tan{x} -x + \frac{1}{2}\tan{x} +C=\tan{x} -x +C$$ Thats it. Just trigonometry.

• The title says without trig identities. – dustin Feb 28 '15 at 18:05
• @dustin dooh! Sorry guys( – dimaastronom Feb 28 '15 at 19:32

$$\int\tan^2(x)\,dx$$ With IBP $$\int \tan^2(x)\,dx=x \tan^2(x)-\int 2x \sec^2 x \tan x\,dx\tag{1}$$ $u=\tan(x)$ $$\int 2x \sec^2 x \tan x\,dx=\int 2 u \tan^{-1} u\,du\tag{2}$$ With IBP again $$\int 2 u \tan^{-1} u\,du=\frac{u^2 \tan^{-1} u}{2}-\frac 12 \int \frac{u^2}{1+u^2}\,du\tag{3}$$ With PFD $$\int \frac{u^2}{1+u^2}\,du=\int 1- \frac{1}{1+u^2}\,du=u-\tan^{-1}u\tag{4}$$ Plugging into $(3)$ $$\int 2 u \tan^{-1} u\,du={u^2 \tan^{-1} u}- {u+\tan^{-1} u} \tag{5}$$ Back substituting from $(2)$ $$\int 2x \sec^2 x \,dx\tan x={x\tan^2 x}-{\tan(x)+x}$$ Plugging into $(1)$ $$\int \tan^2(x)\,dx=x \tan^2(x)-{x\tan^2 x}+{\tan(x)+x}$$ Plugging into the original integral: $$\int \tan^2(x)\,dx= \tan(x) + x$$

• Where are the $dx$? – Bernard Massé Feb 28 '15 at 0:34
• @BernardMassé I believe that, because we are only doing single variable calc, they are not needed and therefore ommited. Furtheremore, if this bothers you, you can help add in the dx's by clicking the edit button right under my answer instead of downvoting. After it is approved by 2 members, this edit will automatically process. – Teoc Feb 28 '15 at 2:22
• "instead of downvoting". Sorry to deceive you, but it is not I who downvoted. And I'd like to know how many teachers of calculus agree with you: " because we are only doing single variable calc, they are not needed and therefore ommited" – Bernard Massé Feb 28 '15 at 3:28
• The problem is that $\int \tan^2(x)\, dx= \tan(x) - x$. I don't know any place where would be accepted the omission of $dx$ under the integral sign. – Claude Leibovici Feb 28 '15 at 7:12