Integral of $$$\tan{\left(u \right)}$$$

The calculator will find the integral/antiderivative of $$$\tan{\left(u \right)}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \tan{\left(u \right)}\, du$$$.

Solution

Rewrite the tangent as $$$\tan\left(u\right)=\frac{\sin\left(u\right)}{\cos\left(u\right)}$$$:

$${\color{red}{\int{\tan{\left(u \right)} d u}}} = {\color{red}{\int{\frac{\sin{\left(u \right)}}{\cos{\left(u \right)}} d u}}}$$

Let $$$v=\cos{\left(u \right)}$$$.

Then $$$dv=\left(\cos{\left(u \right)}\right)^{\prime }du = - \sin{\left(u \right)} du$$$ (steps can be seen »), and we have that $$$\sin{\left(u \right)} du = - dv$$$.

So,

$${\color{red}{\int{\frac{\sin{\left(u \right)}}{\cos{\left(u \right)}} d u}}} = {\color{red}{\int{\left(- \frac{1}{v}\right)d v}}}$$

Apply the constant multiple rule $$$\int c f{\left(v \right)}\, dv = c \int f{\left(v \right)}\, dv$$$ with $$$c=-1$$$ and $$$f{\left(v \right)} = \frac{1}{v}$$$:

$${\color{red}{\int{\left(- \frac{1}{v}\right)d v}}} = {\color{red}{\left(- \int{\frac{1}{v} d v}\right)}}$$

The integral of $$$\frac{1}{v}$$$ is $$$\int{\frac{1}{v} d v} = \ln{\left(\left|{v}\right| \right)}$$$:

$$- {\color{red}{\int{\frac{1}{v} d v}}} = - {\color{red}{\ln{\left(\left|{v}\right| \right)}}}$$

Recall that $$$v=\cos{\left(u \right)}$$$:

$$- \ln{\left(\left|{{\color{red}{v}}}\right| \right)} = - \ln{\left(\left|{{\color{red}{\cos{\left(u \right)}}}}\right| \right)}$$

Therefore,

$$\int{\tan{\left(u \right)} d u} = - \ln{\left(\left|{\cos{\left(u \right)}}\right| \right)}$$

Add the constant of integration:

$$\int{\tan{\left(u \right)} d u} = - \ln{\left(\left|{\cos{\left(u \right)}}\right| \right)}+C$$

Answer

$$$\int \tan{\left(u \right)}\, du = - \ln\left(\left|{\cos{\left(u \right)}}\right|\right) + C$$$A