Home » Blog » Use integration by parts to prove a given integral formula

Use integration by parts to prove a given integral formula

Using integration by parts, prove the following formula:

    \[ \int \frac{\sin^{n+1} x}{\cos^{m+1} x} \, dx = \frac{1}{m} \frac{\sin^n x}{\cos^m x} - \frac{n}{m} \int \frac{\sin^{n-1} x}{\cos^{m-1} x} \, dx. \]

Use this solution to evaluate

    \[ \int \tan^2 x \, dx \qquad \text{and} \qquad \int \tan^4 x \, dx. \]


Proof. To apply integration by parts, first define

    \begin{align*}  u &= \sin^n x & \implies && du &= n \sin^{n-1} x \cos x \, dx \\  dv &= \frac{\sin x}{\cos^{m+1} x} \, dx & \implies && v &= \frac{1}{m} \cdot \frac{1}{\cos^m x}. \end{align*}

Where the formula for v follows since we can evaluate \int dv by making the substitution t = \cos x which implies dt = -\sin x \, dx; therefore, we have

    \begin{align*}  \int \frac{\sin x}{\cos^{m+1} x} \, dx &= -\int \frac{1}{t^{m+1}} \, dt \\  &= \frac{1}{m} t^{-m} \\  &= \frac{1}{m} \cdot \frac{1}{\cos m}. \end{align*}

Then, using integration by parts, we have the following:

    \begin{align*}  \int \frac{\sin^{n+1} x}{\cos^{m+1} x} \, dx &= \int u \, dv \\  &= uv - \int v \, du \\  &= \frac{1}{m} \frac{\sin^n x}{\cos^m x} - \frac{n}{m} \int \frac{\sin^{n-1} x \cos x}{\cos^m x} \, dx \\  &= \frac{1}{m} \frac{\sin^n x}{\cos^m x} - \frac{n}{m} \int \frac{\sin^{n-1} x}{\cos^{m-1} x} \, dx. \qquad \blacksquare  \end{align*}

Now, applying the formula to \int \tan^2 x, we first note that since \tan^2 x = \frac{\sin^2 x}{\cos^2 x} this is the case of the above formula with n+1 = m+1 = 2. Therefore,

    \begin{align*}  \int \tan^2 x \, dx &= \int \frac{\sin^2 x}{\cos^2 x} \, dx \\  &= \frac{\sin x}{\cos x} - \int dx \\  &= \tan x - x + C. \end{align*}

Then, for \int \tan^4 x \, dx we have

    \begin{align*}  \int \tan^4 x \, dx &= \int \frac{\sin^4 x}{\cos^4 x} \, dx \\  &= \frac{1}{3} \frac{\sin^3 x}{\cos^3 x} - \int \frac{\sin^2 x}{\cos^2 x} \, dx \\  &= \frac{1}{3} \tan^3 x - \int \tan^2 x \, dx \\  &= \frac{1}{3} \tan^3 x - \tan x + x + C. \end{align*}

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