What is $\int x\tan(x)dx$?

8.8k Views Asked by At

I have a problem when trying to solve this question

Question. What is the answer of the indefinite integral $$\int x\tan x \; dx?$$

Maple gives a complicated answer based on the series. Is there any explicit answer based on fundamental functions?

2

There are 2 best solutions below

0
On

Simple questions don't always return simple answers.

Integration by parts was suggested by John Pavlick giving : \begin{align} \int x\,\tan(x)\,dx&=-x\,\log(\cos(x))+\int \log(\cos(x))\,dx\\ &=-x\,\log(\cos(x))+\frac{\operatorname{Cl}_2(\pi-2\,x)}2-\log(2)\,x+C\\ \end{align}

Since the Clausen function is defined by : $$\;\displaystyle \operatorname{Cl}_2(x):=-\int_0^x\log(2\,\sin(t/2))\;dt$$ implying that : $$\;\displaystyle \frac d{dx}\frac{\operatorname{Cl}_2(\pi-2\,x)}2=-\frac{-2}2\log\left(2\,\sin\left(\frac{\pi-2x}2\right)\right)=\log(2)+\log(\cos(x))$$

An appropriate integral will thus be (since $C=0$ from the value at $0$) : $$\int_0^x t\;\tan(t)\;dt=\frac{\operatorname{Cl}_2(\pi-2\,x)}2-x\,\log(2\,\cos(x))$$

For links with polylogarithms see too MathWorld.

0
On

The antiderivative is not expressible in terms of elementary functions. See, e.g., this answer at MO: https://mathoverflow.net/a/108616/5000