Question Number 152276 by peter frank last updated on 27/Aug/21
$$\mathrm{Prove}\:\mathrm{that} \\ $$$$\int_{\mathrm{0}} ^{\pi} \frac{\mathrm{xtan}\:\mathrm{x}}{\mathrm{sec}\:\mathrm{x}+\mathrm{tan}\:\mathrm{x}}\mathrm{dx}=\frac{\pi^{\mathrm{2}} }{\mathrm{2}}−\pi \\ $$
Answered by Olaf_Thorendsen last updated on 27/Aug/21
$$\mathrm{F}\left({x}\right)\:=\:\int_{\mathrm{0}} ^{\pi} \frac{{x}\mathrm{tan}{x}}{\mathrm{sec}{x}+\mathrm{tan}{x}}\:{dx} \\ $$$$\mathrm{F}\left({x}\right)\:=\:\int_{\mathrm{0}} ^{\pi} {x}\mathrm{tan}{x}\left(\mathrm{sec}{x}−\mathrm{tan}{x}\right)\:{dx} \\ $$$$\mathrm{F}\left({x}\right)\:=\:\int_{\mathrm{0}} ^{\pi} {x}\left(\frac{\mathrm{sin}{x}}{\mathrm{cos}^{\mathrm{2}} {x}}−\left(\mathrm{1}+\mathrm{tan}^{\mathrm{2}} {x}\right)+\mathrm{1}\right)\:{dx} \\ $$$$\mathrm{F}\left({x}\right)\:=\:\left[{x}\left(\mathrm{sec}{x}−\mathrm{tan}{x}+{x}\right)\right]_{\mathrm{0}} ^{\pi} \\ $$$$−\int_{\mathrm{0}} ^{\pi} \left(\mathrm{sec}{x}−\mathrm{tan}{x}+{x}\right)\:{dx} \\ $$$$\mathrm{F}\left({x}\right)\:=\:\pi\left(\pi−\mathrm{1}\right) \\ $$$$−\left[\mathrm{ln}\mid\mathrm{sec}{x}+\mathrm{tan}{x}\mid+\mathrm{ln}\mid\mathrm{cos}{x}\mid+\frac{{x}^{\mathrm{2}} }{\mathrm{2}}\right]_{\mathrm{0}} ^{\pi} \\ $$$$\mathrm{F}\left({x}\right)\:=\:\pi\left(\pi−\mathrm{1}\right)−\frac{\pi^{\mathrm{2}} }{\mathrm{2}}\:=\:\frac{\pi^{\mathrm{2}} }{\mathrm{2}}−\pi \\ $$