Home » Blog » Prove another identity of the integral of some trig functions

Prove another identity of the integral of some trig functions

  1. Prove the following identity:

        \[ \int_0^{\pi} x f(\sin x) \, dx = \frac{\pi}{2} \int_0^{\pi} f(\sin x) \, dx. \]

  2. Using part (a) deduce the formula

        \[ \int_0^{\pi} \frac{x \sin x}{1 + \cos^2 x} \, dx = \pi \int_0^1 \frac{dx}{1+x^2}. \]


  1. Proof. Following the hint, we make the substitution

        \[ u = \pi - x \qquad du = -dx. \]

    So we then have

        \begin{align*}  \int_0^{\pi} x f(\sin x) \, dx &= - \int_{u(0)}^{u(\pi)} (\pi - u) f(\sin (\pi - u)) \, du \\  &= -\int_{\pi}^0 (\pi - u) f(\sin u) \, du \\  &= \int_0^{\pi} (\pi - u) f(\sin u) \, du \\  &= \int_0^{\pi} \pi f(\sin u) \, du - \int_0^{\pi} u f (\sin u) \, du  \end{align*}

    Here, we change the the name of the variable of integration from u to x. (We can always rename the variable of integration since integrating f(t) \, dt is the same as integrating f(x) \, dx, for example.) So this means we have

        \begin{align*}  &&\int_0^{\pi} x f(\sin x) \, dx &= \int_0^{\pi} \pi f(\sin x) \, dx - \int_0^{\pi} x f (\sin x) \, dx \\  \implies && \int_0^{\pi} x f(\sin x) \, dx &= \frac{\pi}{2} \int_0^{\pi} f(\sin x) \, dx. \qquad \blacksquare \end{align*}

  2. Now to deduce the requested formula, first we use the trig identity \cos^2 x + \sin^2x = 1, which implies 1 + \cos^2 x = 2 - \sin^2 x, to rewrite the integral

        \begin{align*}  \int_0^{\pi} \frac{x \sin x}{1 + \cos^2 x} \, dx &= \int_0^{\pi} \frac{x \sin x}{2 - \sin^2 x} \, dx \\  &= \int_0^{\pi} x f( \sin x) \, dx \qquad \text{where} \qquad f(x) = \frac{x}{2-x^2}. \end{align*}

    Then, using the formula we established in part (a) we have

        \begin{align*}  \int_0^{\pi} x f(\sin x) \, dx &= \frac{\pi}{2} \int_0^{\pi} f(\sin x) \, dx \\  &= \frac{\pi}{2} \int_0^{\pi} \frac{\sin x}{2-\sin^2 x} \, dx \\  &= \frac{\pi}{2} \int_0^{\pi} \frac{\sin x}{1+\cos^2 x} \, dx. \end{align*}

    Now, we use the substitution method, letting

        \[ u = \cos x \qquad du = -\sin x \, dx. \]

    So we obtain,

        \begin{align*}  \frac{\pi}{2} \int_0^{\pi} \frac{\sin x}{1 + \cos^2 x} \,dx &= -\frac{\pi}{2} \int_1^{-1} \frac{1}{1+u^2} \, du \\  &= \frac{\pi}{2} \int_{-1}^1 \frac{1}{1+x^2} \, dx &(\text{renaming variable of integration}) \\  &= \pi \int_0^1 \frac{1}{1+x^2} \, dx. \end{align*}

    The last equality follows since \frac{1}{1+(-x)^2} = \frac{1}{1+x^2} so that this is an even function. Hence (by a previous exercise) the integral from -1 to 1 is twice the integral from 0 to 1. \qquad \blacksquare

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):