Skip to content

7.2 Integration by Parts

Product Rule \(\displaystyle\frac{d}{dx}(uv)=v\frac{du}{dx}+u\frac{du}{dx}\) \(\displaystyle\int\frac{d}{dx}(uv)dx=\int\left(v\frac{du}{dx}+u\frac{du}{dx}\right)dx\) \(uv=\int v\frac{du}{dx}dx+\int u\frac{du}{dx}dx\) \(uv=\int vdu+\int udv\) \(uv-\int vdu=\int udv\)

Integration by parts

\(\int udv=uv-\int vdu\) \(\int_a^vudv=uv\biggr|_a^b-\int_a^bvud\)

Ex:

Find \(\int xe^xdx\)

\(u=x\) \(du=dx\)

\(dv=e^xdx\) \(\int dv=\int e^xdx\) \(v=e^x\)

\(\int xe^xdx=xe^x-\int e^xdx\) \(x-e^x+C\)

\(u=x\) \(du=dx\)

\(dv=e^xdx\) \(v=e^x\)

Check: \((xe^x-e^x+C)'=(xe^x)'-(e^x)'+C'\) \(=x'e^x+(e^x)'-e^x+0\) \(=\cancel{e^x}+xe^x-\cancel{e^x}\) \(=xe^x\)

\(u=e^x\) \(du=e^xdx\)

\(dv=xdx\) \(\int dv=\int x^1dx\) \(v=\frac{x^2}{2}\)

\(\int xe^xdx=e^x(\frac{x^2}{2})-\int\frac{x^2}{2}e^xdx\)

Ex:

\(\int\theta\cos\theta d\theta\)

\(u=\theta\) \(du=d\theta\)

\(dv=cos\theta d\theta\) \(\int dv=\int\cos\theta d\theta\) \(v=\sin\theta\)

\(\int\theta\cos\theta d\theta=\theta\sin\theta-\int\sin\theta d\theta\) \(=\sin\theta-(-\cos\theta)+C\) \(=\theta\sin\theta+\cos\theta+C\)

How to choose \(u\) and \(dv\)?

  • Whatever you pick \(du\) to be, you should be able to find its antiderivative \(v\).
  • It helps if \(du\) is simpler than \(u\) (or at the very least, not more complicated).
  • It helps if \(v\) is simpler than \(dv\) (or at the very least, not more complicated).
Ex:

\(\int_2^3\ln xdx\)

\(u=\ln x\) \(du=\frac1xdx\)

\(dv=dx\) \(\int dv=\int dx\) \(v=x\)

\(\displaystyle\int_2^3\ln xdx=(\ln x)(x)\biggr|_2^3-\int_2^3x*\frac1xdx\) \(=x\ln x\biggr|_2^3-\int_2^31dx\) \(=x\ln x-x\biggr|_2^3\) \(=3\ln3-3-(2\ln2-2)\) \(=3\ln3-3-2\ln2+2\) \(=3\ln3-2\ln2-1\)

Ex:

\(\int x^6\ln xdx\)

\(u=\ln x\) \(du=\frac1xdx\)

\(dv=x^6dx\) \(\int dv=\int dx^6dx\) \(v=\frac {x^7}7\)

\(\ln x\left(\frac{x^7}7\right)-\int\frac{x^{\cancel7\fbox6}}7*\frac1{\cancel x}dx\) \(=\frac{x^7}7\ln x-\int\frac{x^6}7dx\) \(=\frac{x^7}7\ln x-\int\frac17x^6dx\) \(=\frac{x^7}7\ln x-\frac17\left(\frac{x^7}7\right)+C\) \(\frac{x^7}7\ln x-\frac{x^7}{49}+C\)

(shortcut noted here)

\(\int\sin(-3x+7)dx\) \(=\frac1{\cancel{-}+3}(\cancel{-}+\cos(-3x+7))+C\) \(=\frac13\cos(-3x+7)+C\)

\(f(x)\) \(f'(x)=\frac{df}{dx}\)

\(f'(x)*dx=\frac{df}{dx}*dx\) \(f'(x)dx=df\)

Ex:

\(\int x^2\sin4xdx\)

\(u=x^2\) \(du=2xdx\) (\(\frac{du}{dx}=2x\))

\(dv=\sin4xdx\) \(\int dv=\int\sin4xdx\) \(v=-\frac14\cos4x\)

\(=x^2\left(-\frac14\cos4x\right)-\int-\frac14\cos(4x)2xdx\) \(=x^2\left(-\frac14\cos4x\right)+\int+\frac14\cos(4x)2xdx\) \(=-\frac14x^2\cos4x+\frac12\int\cos(4x)xdx\)

\(u=x\) \(du=dx\)

\(dv=\cos(4x)dx\) \(\int dv=\int\cos(4x)dx\) \(v=\frac14\sin(4x)\)

\(\displaystyle=-\frac14x^2\cos4x+\frac12\left(x\left(\frac14\sin(4x)\right)-\int\frac14\sin(4x)dx\right)\) \(\displaystyle=-\frac14x^2\cos4x+\frac12\left(\frac14x\sin4x+\frac14\left(+\frac14\cos(4x)\right)\right)+C\) \(\displaystyle=-\frac14x^2\cos4x+\frac12\left(\frac14x\sin4x+\frac1{16}\cos4x\right)+C\) \(\text{final answer:}\displaystyle=-\frac14x^2\cos4x+\frac18x\sin4x+\frac1{32}\cos4x+C\)

Ex:

\(\int\cos^2\theta d\theta=\int(\cos\theta)^2d\theta\)

\(u=\cos\theta\) \(du=-\sin\theta d\theta\) u-sub doesn't work

\(\int\cos\theta\cos\theta d\theta\)

\(u=\cos\theta\) \(du=-\sin\theta d\theta\)

\(dv=\cos\theta d\theta\) \(\int dv=\int\cos\theta d\theta\) \(v=\sin\theta\)

\(=\cos\theta\sin\theta-\int\sin\theta(-\sin\theta d\theta)\) \(=\cos\theta\sin\theta+\int\sin\theta(+\sin\theta d\theta)\) \(=\cos\theta\sin\theta+\int\underbrace{\sin^2\theta}_{\text{read below}} d\theta\)

\(\sin^2\theta+\cos^2\theta=1\) \(\sin^2\theta=1-\cos^2\theta\)

\(=\cos\theta\sin\theta+\int1-\cos^2\theta d\theta=\cos\theta\sin\theta+\int1d\theta-\int\cos^2\theta d\theta\) \(=cos\theta\sin\theta+\theta-\int\cos^2\theta d\theta\) \(\underbrace{\int\cos^2\theta d\theta}_{+\int\cos^2\theta d\theta}=\cos\theta\sin\theta+\theta\underbrace{-\int\cos^2\theta d\theta}_{+\int\cos^2\theta d\theta}\) \(2\int\cos^2\theta d\theta=\cos\theta\sin\theta+\theta+C\) \(\frac12*2\int\cos^2\theta d\theta=\left(\cos\theta\sin\theta+\theta+C\right)\frac12\) \(\text{final answer:}\int\cos^2\theta d\theta=\frac12\cos\theta\sin\theta+\frac12\theta+C\)

Ex:

\(\int e^x\sin xdx\)

\(u=e^x\) \(du-e^xdx\)

\(dv=\sin xdx\) \(\int dv=\int\sin xdx\) \(v=-\cos x\)

\(=e^x(-\cos x)-\int-\cos xe^xdx\) \(=e^x(-\cos x)+\int+\cos xe^xdx\)

\(u=e^x\) \(du=e^xdx\)

\(dv=\cos xdx\) \(\int dv=\int\cos xdx\) \(v=\sin x\)

\(=-e^x\cos x+e^x\sin x-\int\sin xe^xdx\) \(\text{final answer:}=-e^x\cos x+e^x\sin-\int e^x\sin xdx\)