Problem: Evaluate the integral: $$\int x\tan(x)\mathrm{d}x$$
Source: One of my friends gave me this problem. He even made a bet that I couldn't solve it. I tried hard for an hour or so; then I gave up and went to Wolfram to figure out the answer. I was shocked to see it
I can't even understand the answer!
My try on it: At first it looked like a simple IBP(integration by parts) problem. But upon IBPing it I got even messy functions and finally it became impossible to handle. So just for the sake of getting rid of the question, I just solved it by using the Maclaurin series for tangent. $$ \tan(x) = x + \frac{1}{3}x^3 + \frac{2}{15}x^5 +....$$ $$ x\tan(x) = x^2 + \frac{1}{3}x^4 + \frac{2}{15}x^6 +....$$ Integrating with respect to $x$ $$ \int x\tan(x)\mathrm{d}x = \int (x^2 + \frac{1}{3}x^4 + \frac{2}{15}x^6 +....)\mathrm{d}x$$ $$ \int x\tan(x)\mathrm{d}x = \frac{x^3}{3} + \frac{1}{15}x^5 + \frac{2}{105}x^7 +....$$ Is this answer presentable? As it tells us nothing much about the nature of the curve. Or so, why it cannot be integrated simply? Or in other words, can we find an alternate solution by applying some known techniques of integral. Please keep in mind while answering that I'm a high school student with a little knowledge of uni level integral. Thanks!
Edit 1: WARNING! Not a high school level question. I got baited in it for the sake of a bet and now I feel really bad for asking something beyond my reach!(as of now)
$$\text{About }\quad \int x\tan(x)dx$$ $x\tan(x)\quad$is an example of elementary function which antiderivative cannot be written with a finite number of elementary functions. They are an infinity of other examples like that. In those cases, one can proceed on different manners, depending the level of knowledge and the context.
NOTE :
The fact that there is no elementary closed form for an indefinite integral doesn't mean that there is no elementary closed form for a definite integral. For example : $$\int_0^{\pi/4}x\tan(x)dx=\frac{C}{2}-\frac{\pi}{8}\ln(2)$$ $C$ is the Catalan's constant.