Evaluation of $\int^{\pi/2}_{0} \frac{x \tan(x)}{\sec(x)+\tan(x)}dx$ 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$?

Hint: Try the sub $x \mapsto \frac{\pi}{2} - x$ to get $$\int_0^{\pi/2} \frac{(\pi/2 - x) \cot x}{\csc x + \cot x} \, \mathrm{d}x = \int_0^{\pi/2} \frac{\pi/2 - x}{1 + \sec x} \, \mathrm{d}x$$
Then the rest is do-able using $$\frac{1}{\sec x + 1} = \frac{\cos x}{\cos x + 1} = \frac{\cos^2 \frac{x}{2} - \sin^2 \frac{x}{2}}{2\cos^2 \frac{x}{2}} = \frac{1}{2} - \frac{\tan^2 \frac{x}{2}}{2}$$
And so $$ \int \frac{\mathrm{d}x}{1 + \sec x} = \frac{1}{2} \int 1 - \left(-1+\sec^2 \frac{x}{2}\right) \, \mathrm{d}x = x - \tan \frac{x}{2} + \mathrm{C}$$
