# Evaluate the integral: integral x tan x dx.

## Question:

Evaluate the integral:

{eq}\displaystyle \int x \tan x\ dx {/eq}.

## Indefinite Integrals:

Indefinite integrals or anti derivatives of a function {eq}fn {/eq} is a function {eq}F{/eq}; whose derivative is equal to {eq}fn {/eq}. We can display an indefinite integral like the given problem statement with an integral symbol, a function and then a differential at the end.

Given: $$\displaystyle \int x \tan x\ dx$$

The given expression can be solved using a non-elementary integral:

$$\int x \tan x\ dx =i\dfrac{1}{2}Li_{2}\left(-e^{2ix}\right)+i\dfrac{1}{2}x^{2}-x\ln\left(1+e^{2ix}\right)$$

$$\displaystyle =i\dfrac{1}{2}Li_{2}\left(-e^{2ix}\right)+i\dfrac{1}{2}x^{2}-x\ln\left(1+e^{2ix} \right) + C$$

Finally, we get integral as:

$$= \boxed{i\dfrac{1}{2}Li_{2} \left(-e^{2ix}\right)+i\dfrac{1}{2}x^{2}-x\ln\left(1+e^{2ix} \right) + C}$$