TITLE: Evaluation of $\int^{\pi/2}_{0} \frac{x \tan(x)}{\sec(x)+\tan(x)}dx$
QUESTION [6 upvotes]: Evaluate the given integral:
$$\int^{\pi/2}_0 \frac{x \tan(x)}{\sec(x)+\tan(x)}dx$$
I multiplied and divided by $\sec(x)+\tan(x)$ to get denominator as $1$ but  In calculation of integral, $x$ is creating problem. Is there any way to eliminate $x$ here, like it would have been eliminated if upper limit was $\pi$?

REPLY [2 votes]: In the absence of any tricks, it looks feasible to do this integral through integration by parts to eliminate the $x$.  I'm guessing there's a typo in the question.  Assuming the integral portion is correct, we multiply and divide by $\sec x-\tan x$.
$$\int_0^{\frac\pi2}x(\sec x\tan x-\tan^2x)dx=\int_0^\frac{\pi}2x(\sec x\tan x-\sec^2x+1)dx=$$
$$x(\sec x-\tan x+x)]_0^\frac\pi2-\int_0^\frac\pi2(\sec x-\tan x+x)dx=$$
$$x^2+\frac x{\sec x+\tan x}-(\ln|\sec x+\tan x|+\ln|\cos x|+\frac12x^2)]_0^\frac\pi2=$$
$$\frac12x^2+\frac{x\cos x}{1+\sin x}-\ln|1+\sin x|]_0^\frac\pi2=\frac{\pi^2}8-\ln2$$