Calculus II Home

Integration by Parts

    


Integration by parts: \[ \int fg' \,dx=fg-\int f'g \,dx. \] Equivalently, \[ \int u\,dv=uv-\int v \,du. \]

By the product rule, \( (fg)'=f'g+fg'\). Integrating both sides we get, \[ \int (fg)' \,dx=\int (f'g+fg')\,dx \implies fg=\int f'g \,dx+\int fg'\,dx. \] Subtracting \( \int f'g\,dx \) from both sides, we get \[ \int fg' \,dx=fg-\int f'g \,dx. \] The rest follows by the substitution \( u=f \) and \( dv=g'\,dx \) for which \( du=f'\,dx \) and \( v=\int dv=\int g'\,dx=g \).

Example. \[\begin{align*} \int xe^x \,dx &= \int u \,dv & (\text{let } u=x,\, dv=e^x \,dx)\\ &= uv-\int v \,du & \left( du=dx,\, v=\int e^x \,dx=e^x \right)\\ &= xe^x-\int e^x \,dx & \\ &= xe^x-e^x+C & \end{align*}\] Note that the choice of \( u \) and \( v \) is important. Integration by parts does not produce any simple answer if we chose \( u=e^x \) and \( dv=x\,dx \). Usually we choose \( u \) so that its derivative is "simpler" than \( u \) and \( dv \) is integrable. Some like the following decreasing order of preference for \( u \): LIATE (Logarithm, Inverse Trig, Algebraic (Polynomial), Trig, Exponential).

Example. \[\begin{align*} \int \ln x \,dx &= \int u \,dv & (\text{let } u=\ln x,\, dv=dx)\\ &= uv-\int v \,du & \left( du=\frac{1}{x} \,dx,\, v=\int dx=x \right)\\ &= (\ln x)x-\int x\frac{1}{x} \,dx & \\ &= (\ln x)x-\int dx & \\ &= x\ln x-x+C & \end{align*}\]

Circular integration by parts: Sometimes we need to do integration by parts more than once and get the same integral back.

Example. \[\begin{align*} \int e^x\sin x \,dx &= \int u \,dv & (\text{let } u=\sin x,\, dv=e^x\,dx)\\ &= uv-\int v \,du & \left( du=\cos x \,dx,\, v=\int e^x \,dx=e^x \right)\\ &= \sin x e^x-\int e^x\cos x \,dx. & (1) \end{align*}\] Now we apply integration by parts on \( \int e^x\cos x \,dx \). Let \( u=\cos x,\, dv=e^x\,dx \). Then \( du=-\sin x \,dx,\, v=\int e^x \,dx=e^x \). \[\begin{align*} \int e^x\cos x \,dx &= \int u \,dv & \\ &= uv-\int v \,du & \\ &= \cos x e^x-\int e^x(-\sin x) \,dx & \\ &= \cos x e^x+\int e^x\sin x \,dx. & \end{align*}\] Plugging this in (1), we get \[\begin{align*} \int e^x\sin x \,dx &= \sin x e^x-\int e^x\cos x \,dx & \\ &= \sin x e^x-\left( \cos x e^x+\int e^x\sin x \,dx \right) & \\ &= e^x(\sin x -\cos x) -\int e^x\sin x \,dx. & \\ \end{align*}\] Adding \( \int e^x\sin x \,dx \) to both sides, we get \[\begin{array}{rrcl} & 2\int e^x\sin x \,dx & = & e^x(\sin x -\cos x)+C\\ \implies & \int e^x\sin x \,dx & = & \frac{1}{2}e^x(\sin x -\cos x)+C. \end{array}\]

Reduction Formulas: Integrating by parts in a circular fashion we get the following reduction formulas: \[ \int \cos^n x \,dx=\frac{1}{n} \cos^{n-1}x \sin x+\frac{n-1}{n}\int \cos^{n-2}x \, dx,\, n\geq 2. \] \[ \int \sin^n x \,dx=-\frac{1}{n} \sin^{n-1}x \cos x+\frac{n-1}{n}\int \sin^{n-2}x \, dx,\, n\geq 2. \]

\[\begin{align*} \int \cos^n x \,dx &= \int u \,dv \,\, \left(\text{let } u=\cos^{n-1}x,\, dv=\cos x \,dx \right)\\ &= uv-\int v \,du \,\, \left( du=(n-1) \cos^{n-2} x(-\sin x)\,dx,\, v=\int \cos x \,dx=\sin x \right)\\ &= \cos^{n-1}x \sin x-\int \sin x (n-1) \cos^{n-2} x (-\sin x)\,dx \\ &= \cos^{n-1}x \sin x+(n-1) \int \sin^2 x \cos^{n-2} x \,dx \\ &= \cos^{n-1}x \sin x+(n-1) \int (1-\cos^2 x) \cos^{n-2} x \,dx \\ &= \cos^{n-1}x \sin x+(n-1) \int (\cos^{n-2} x- \cos^n x) \,dx \\ &= \cos^{n-1}x \sin x+(n-1) \int \cos^{n-2} x \,dx- (n-1) \int \cos^n x \,dx \end{align*}\] Adding \( (n-1) \int \cos^n x \,dx \) to both sides, we get \[\begin{align*} & n\int \cos^n x \,dx &&= \cos^{n-1}x \sin x+(n-1) \int \cos^{n-2} x \,dx\\ \implies & \int \cos^n x \,dx &&=\frac{1}{n} \cos^{n-1}x \sin x+\frac{n-1}{n}\int \cos^{n-2}x \, dx. \end{align*}\] The other formula has a similar proof.

Example. \[\begin{align*} \int \cos^4 x \,dx &= \frac{1}{4} \cos^{3}x \sin x+\frac{3}{4}\int \cos^{2}x \, dx &\\ \end{align*}\] We can also apply the reduction formula to \( \int \cos^2 x \,dx \). Alternatively we can use the trig identity \( \cos^2 x=\displaystyle\frac{1+\cos(2x)}{2} \). Then \[\begin{align*} \int \cos^4 x \,dx &= \frac{1}{4} \cos^{3}x \sin x+\frac{3}{4}\int \cos^{2}x \, dx &\\ &= \frac{1}{4} \cos^{3}x \sin x+\frac{3}{8}\int (1+\cos(2x)) \, dx &\\ &= \frac{1}{4} \cos^{3}x \sin x+\frac{3}{8} \left( x+\frac{\sin(2x)}{2} \right) +C &\\ \end{align*}\]


Last edited