Evaluating $\int_{0}^{\frac{\pi}{4}}\frac{x\sin(x)}{\cos^{3}(x)}\,dx$ $$\int_{0}^{\frac{\pi}{4}}\frac{x\sin(x)}{\cos^{3}(x)}\,dx$$
I started like this: 
$$\int_{0}^{\frac{\pi}{4}}\dfrac{x\sin(x)}{\cos^{3}(x)}\,dx=\int_{0}^{\frac{\pi}{4}}\dfrac{1}{\cos^{2}(x)}\cdot \dfrac{\sin(x)}{\cos(x)}\cdot (x)\,dx=\int_{0}^{\frac{\pi}{4}}(x\cdot \tan(x))\cdot (\tan'(x)) \,dx$$
How to continue ?
 A: We could try integration by parts, giving $$I:=\int_0^{\pi/4}x\tan x\sec^2 xdx=[x\tan^2 x]_0^{\pi/4}-\int_0^{\pi/4}(\tan x+x\sec^2 x)\tan xdx\\=\frac{\pi}{4}-I-\int_0^{\pi/4}\tan^2 xdx.$$Hence$$I=\frac{\pi}{8}-\frac12[\tan x-x]_0^{\pi/4}=\frac{\pi}{8}-\frac{1-\pi/4}{2}=\frac{\pi-2}{4}.$$
A: $$\frac{x\sin x}{\cos^3x}=x\tan x\sec^2x$$
then use the integration by part
A: Hint:
Integration by parts, setting
$$u=x,\quad\mathrm d v=\tan x\,\mathrm d(\tan x).$$
You'll have to remember that the other form of the derivative of $\tan x$ is $\;1+\tan^2x$:
\begin{align}
\int_{0}^{\pi/4}\frac{x\sin x}{\cos^{3}x }\,\mathrm dx &=\tfrac12x\tan^2x\biggm\vert_0^{\pi/4}-\frac12\int_{0}^{\pi/4}\tan^2 x\,\mathrm dx \\[-1ex]
\\&=\frac\pi8-\frac12\int_{0}^{\pi/4}(1+\tan^2 x)\,\mathrm dx+\frac12\int_{0}^{\pi/4}\mathrm d x = \frac\pi4 -\frac12\int_{0}^{\pi/4}(1+\tan^2 x)\,\mathrm dx
\end{align}
A: You're definitely headed in the right direction, with realizing that $\sec^2(x)$ is the derivative of $\tan(x)$. Your next step is going to be to use integration by parts with $u = x$ and $dv = \tan(x)\sec^2(x)\,dx$, so we get $du = 1$ and $v = \frac{1}{2}\tan^2(x)$.
A: Nothing new compared to other answers, just the mechanics I find useful. Notice that $$\tan'(x) \,dx = \,d \tan(x)$$ and $$\tan(x) \tan'(x) \,dx = \tan(x)\,d\tan(x) = \frac{1}{2} \,d \tan^2{x}$$ That is your integral is in fact
$$\frac{1}{2}\int_{0}^{\frac{\pi}{4}}x\,d \tan^2{x}$$
Now continue integrating by parts.
A: An alternative solution.
Observe that:
\begin{align}\dfrac{\partial}{\partial x}\left(\frac{1}{2\cos^2 x}\right)=\frac{\sin x}{\cos^3 x}\end{align}
Therefore,
\begin{align}\int_{0}^{\frac{\pi}{4}}\frac{x\sin(x)}{\cos^{3}(x)}\,dx&=\left[\frac{x}{2\cos^2 x}\right]_{0}^{\frac{\pi}{4}}-\frac{1}{2}\int_{0}^{\frac{\pi}{4}} \frac{1}{\cos^2 x}\,dx\\
&=\frac{\pi}{4}-\frac{1}{2}\Big[\tan x\Big]_{0}^{\frac{\pi}{4}}\\
&=\boxed{\frac{\pi-2}{4}}
\end{align}
A: Just for the fun of rewriting it:
\begin{align}
\int_0^{\pi/4}x\frac{\sin x}{\cos^3 x}dx&=\int_0^{\pi/4}\int_0^x\frac{\sin x}{\cos^3 x}dtdx\\
&=\int_0^{\pi/4}\int_t^{\pi/4}\frac{\sin x}{\cos^3x}dxdt\\
&=\int_0^{\pi/4}\left(1-\frac12\sec^2 t\right)dt
\end{align}
