The Relation Between Integration and Differentiation - Part 2
In Part 1 we saw that integration and differentiation undo each other: the definite integral of a continuous function is computed with any of its primitives, ${\int_a^bf(x)\,dx}={P(b)-P(a)}.$ So the main practical task of integral calculus is to find primitives. This page introduces the notation for primitives and the two most important techniques for finding them: substitution, which comes from the chain rule, and integration by parts, which comes from the product rule.
On this page: Leibniz notation · Substitution · Definite integrals · Integration by parts · Reduction formulas · Second mean value theorem · Exercises
The Leibniz Notation for Primitives
Leibniz wrote the general primitive of a function $f$ with the integral sign without limits:
$$\int f(x)\,dx=P(x)+C.$$This equation says exactly that ${P'(x)=f(x)}$ on the interval in question, and $C$ stands for an arbitrary constant. So it describes a whole family of functions. The symbol ${\int f(x)\,dx}$ is called the indefinite integral of $f,$ and $f(x)$ is the integrand. Every derivative formula gives an indefinite integral, for example
${\int\cos x\,dx=\sin x+C},$ ${\int e^x\,dx=e^x+C},$ ${\int x^n\,dx=\frac{x^{n+1}}{n+1}+C}$ (${n\ne-1},$ on an interval where $x^n$ is defined, as in Part 1).
An answer is easy to check: differentiate it. For example, ${\int(3x^2+2x)\,dx}={x^3+x^2+C},$ because ${(x^3+x^2)'=3x^2+2x}.$
Because the derivative of a sum is the sum of the derivatives, the indefinite integral can be taken term by term, and constant factors can be taken out: for constants $\alpha$ and $\beta,$ not both $0,$
${\int\big(\alpha f(x)+\beta g(x)\big)\,dx}={\alpha\int f(x)\,dx}+{{\beta\int g(x)\,dx}.}$
Example. On the interval ${x\gt0}$
${\int\left(6x^2-\frac{4}{x}+3\cos x\right)dx}={{2x^3-4\ln x+3\sin x+C}.}$
On an interval that does not contain $0,$ ${\int\frac{dx}{x}=\ln\lvert x\rvert+C}.$ On the whole set ${x\ne0},$ which consists of two intervals, the constant can be different on the two sides (see the zero-derivative theorem in Part 1).
Indefinite and Definite Integrals
The two symbols look alike but mean different things: ${\int f(x)\,dx}$ is a family of functions, while ${\int_a^bf(x)\,dx}$ is a number. The fundamental theorems connect them. If $f$ is continuous on an interval and $c$ is a point of it, the first theorem says that the integral with a variable upper limit is one of the primitives:
$$\int f(x)\,dx=\int_c^xf(t)\,dt+C,$$and the second theorem says that a definite integral is the change of any primitive (the constant cancels):
$$\int_a^bf(x)\,dx=\Bigl[\int f(x)\,dx\Bigr]_a^b.$$Because of this, to integrate a function usually means to find its primitives, and a "table of integrals" is in fact a table of primitives. The methods for finding primitives are called techniques of integration. The three main ones are substitution and integration by parts, explained below, and partial fractions for rational functions.
Not every elementary function has an elementary primitive. For example, ${\int e^{-x^2}dx}$ and ${\int\frac{\sin x}{x}\,dx}$ (on ${x\gt0}$) exist, because the integrands are continuous, but they cannot be written with elementary functions.
Integration by Substitution
Let $P$ be a primitive of a continuous function $f$ on an interval $J,$ and let $g$ have a continuous derivative on an interval $I$ and take its values in $J.$ By the chain rule
${\big(P(g(x))\big)'}={P'(g(x))\,g'(x)}={{f(g(x))\,g'(x)},}$
so ${P(g(x))}$ is a primitive of ${f(g(x))\,g'(x)}\text{:}$
If ${\int f(u)\,du=P(u)+C}$ on $J$ and $g$ takes its values in $J,$ then
$$\int f(g(x))\,g'(x)\,dx=P(g(x))+C.$$In practice the formula is used mechanically. Put ${u=g(x)}$ and write ${du=g'(x)\,dx}$ (this is just the Leibniz notation ${\frac{du}{dx}=g'(x)}$). The integral turns into ${\int f(u)\,du}.$ Find a primitive $P(u),$ and then return to $x$ by putting ${u=g(x)}.$ The symbols $du$ and $dx$ serve only as bookkeeping here: what justifies the result is the chain rule above, and the answer can always be checked by differentiation.
The skill is to see which part of the integrand to call $u.$ A good choice is an "inner function" whose derivative, up to a constant factor, also stands in the integrand.
Examples
Example 1 (a linear substitution). Find ${\int(2x+1)^5\,dx}.$ Let ${u=2x+1}.$ Then ${du=2\,dx},$ so ${dx=\frac{1}{2}\,du},$ and
${\int(2x+1)^5\,dx}={\frac{1}{2}\int u^5\,du}={\frac{u^6}{12}+C}={{\frac{(2x+1)^6}{12}+C}.}$
In the same way, if ${\int f(u)\,du=P(u)+C},$ then ${\int f(ax+b)\,dx}={\frac{1}{a}P(ax+b)+C}$ for any constants ${a\ne0}$ and $b.$ For example, ${\int e^{3x}\,dx=\frac{1}{3}e^{3x}+C}$ and ${\int\cos(5x-1)\,dx}={\frac{1}{5}\sin(5x-1)+C}.$
Example 2. Find ${\int2x\cos(x^2)\,dx}.$ Let ${u=x^2}.$ Then ${du=2x\,dx},$ and
${\int2x\cos(x^2)\,dx}={\int\cos u\,du}={\sin u+C}={{\sin(x^2)+C}.}$
Example 3 (a missing constant factor). Find ${\int x^3\cos(x^4)\,dx}.$ Let ${u=x^4}.$ Then ${du=4x^3\,dx},$ so ${x^3\,dx=\frac{1}{4}\,du}\text{:}$
${\int x^3\cos(x^4)\,dx}={\frac{1}{4}\int\cos u\,du}={{\frac{1}{4}\sin(x^4)+C}.}$
A missing constant factor is no obstacle. A missing factor $x^3$ would be: ${\int\cos(x^4)\,dx}$ cannot be found this way.
Example 4. Find ${\int\cos^2x\,\sin x\,dx}.$ Let ${u=\cos x}.$ Then ${du=-\sin x\,dx},$ and
${\int\cos^2x\,\sin x\,dx}={-\int u^2\,du}={-\frac{u^3}{3}+C}={{-\frac{\cos^3x}{3}+C}.}$
Example 5. Find ${\int\frac{x}{x^2+1}\,dx}.$ Let ${u=x^2+1}.$ Then ${du=2x\,dx},$ and since ${u\gt0},$
${\int\frac{x}{x^2+1}\,dx}={\frac{1}{2}\int\frac{du}{u}}={\frac{1}{2}\ln u+C}={{\frac{1}{2}\ln(x^2+1)+C}.}$
Example 6. On an interval where ${\cos x\ne0},$ write ${\tan x=\frac{\sin x}{\cos x}}$ and let ${u=\cos x},$ ${du=-\sin x\,dx}\text{:}$
${\int\tan x\,dx}={-\int\frac{du}{u}}={-\ln\lvert u\rvert+C}={{-\ln\lvert\cos x\rvert+C}.}$
Substitution in Definite Integrals
Substitution theorem. Let $g$ have a continuous derivative on ${[a,b]},$ and let $f$ be continuous on an interval that contains all values of $g$ on ${[a,b]}.$ Then
$$\int_a^bf(g(x))\,g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,du.$$When the variable changes, the limits change with it: ${x=a}$ becomes ${u=g(a)}$ and ${x=b}$ becomes ${u=g(b)},$ so there is no need to return to $x.$ (The intervals here may be closed: in Example 9 below, ${\sqrt{1-x^2}}$ is continuous only on ${[-1,1]}.$ At an end point of a closed interval the derivative is one-sided, and the fundamental theorems of Part 1 hold on closed intervals with the same proofs.)
Proof. Let $J$ be the interval on which $f$ is continuous, fix a point $c$ of $J$ and let ${P(u)=\int_c^uf(s)\,ds}.$ By the first fundamental theorem, $P$ is a primitive of $f$ on $J,$ and by the chain rule ${R(x)=P(g(x))}$ is a primitive of the continuous function ${f(g(x))\,g'(x)}$ on ${[a,b]}.$ The second fundamental theorem, used for $R$ and then for $P,$ gives
${\int_a^bf(g(x))\,g'(x)\,dx}={R(b)-R(a)}={P(g(b))-P(g(a))}={{\int_{g(a)}^{g(b)}f(u)\,du}.}$
Example 7. Find ${\int_0^1x\sqrt{1+x^2}\,dx}.$ Let ${u=1+x^2},$ ${du=2x\,dx}.$ When ${x=0},$ ${u=1},$ and when ${x=1},$ ${u=2}\text{:}$
${\int_0^1x\sqrt{1+x^2}\,dx}={\frac{1}{2}\int_1^2\sqrt{u}\,du}={\frac{1}{3}\Bigl[u^{3/2}\Bigr]_1^2}={{\frac{2\sqrt{2}-1}{3}}.}$
Example 8. With ${u=\sin x},$ ${du=\cos x\,dx},$ the limits $0$ and $\frac{\pi}{2}$ become $0$ and $1\text{:}$
${\int_0^{\pi/2}\sin^3x\cos x\,dx}={\int_0^1u^3\,du}={{\frac{1}{4}}.}$
Example 9 (substitution in the other direction). Find ${\int_0^1\sqrt{1-x^2}\,dx}.$ Here no factor $g'(x)$ is visible. Instead, we put ${x=\sin t}$ and read the theorem from right to left: ${dx=\cos t\,dt},$ the limits $0$ and $1$ for $x$ correspond to $0$ and $\frac{\pi}{2}$ for $t,$ and ${\sqrt{1-\sin^2t}=\cos t}$ because ${\cos t\ge0}$ on ${\left[0,\frac{\pi}{2}\right]}.$ With ${\cos^2t=\frac{1+\cos2t}{2}},$
${\int_0^1\sqrt{1-x^2}\,dx}={\int_0^{\pi/2}\cos^2t\,dt}={\Bigl[\frac{t}{2}+\frac{\sin2t}{4}\Bigr]_0^{\pi/2}}={{\frac{\pi}{4}}.}$
This is the area of a quarter of the unit disc, as it should be.
Integration by Parts
The product rule ${(fg)'=f'g+fg'}$ says that ${f(x)\,g(x)}$ is a primitive of ${f'(x)\,g(x)}+{f(x)\,g'(x)}.$ Written with indefinite integrals and rearranged, it becomes the formula for integration by parts. If $f$ and $g$ have continuous derivatives on an interval, then
${\int f(x)\,g'(x)\,dx}={f(x)\,g(x)}-{{\int f'(x)\,g(x)\,dx}.}$
(The arbitrary constant is contained in the indefinite integral on the right.) With ${u=f(x)},$ ${v=g(x)},$ ${du=f'(x)\,dx}$ and ${dv=g'(x)\,dx},$ the formula takes the short form
$$\int u\,dv=uv-\int v\,du.$$For definite integrals, the second fundamental theorem applied to the primitive $fg$ of ${f'g+fg'}$ gives
${\int_a^bf(x)\,g'(x)\,dx}={{\Bigl[f(x)\,g(x)\Bigr]_a^b-\int_a^bf'(x)\,g(x)\,dx}.}$
The formula moves the derivative from one factor to the other. It helps when the new integral ${\int v\,du}$ is simpler than the original one. Usually $u$ is a factor that becomes simpler when differentiated (a power of $x,$ $\ln x,$ $\arctan x$), and $dv$ is a factor that is easy to integrate ($e^x\,dx,$ $\sin x\,dx,$ $\cos x\,dx,$ or just $dx$).
The picture shows the meaning of the formula when $u$ and $v$ are positive and increase together. The region under the curve has the area ${\int_{u_1}^{u_2}v\,du},$ and the region to the left of it has the area ${\int_{v_1}^{v_2}u\,dv}.$ Together they fill the big rectangle without the small one: ${\int_{u_1}^{u_2}v\,du+\int_{v_1}^{v_2}u\,dv}={u_2v_2-u_1v_1}.$ This is the definite form of the formula: with ${u_1=f(a)}$ and ${u_2=f(b)},$ the substitution theorem gives ${\int_{u_1}^{u_2}v\,du}={\int_a^bf'(x)\,g(x)\,dx},$ and in the same way ${\int_{v_1}^{v_2}u\,dv}={\int_a^bf(x)\,g'(x)\,dx}.$
Examples
Example 1. Find ${\int x\cos x\,dx}.$ Take ${u=x}$ and ${dv=\cos x\,dx}.$ Then ${du=dx},$ ${v=\sin x},$ and
${\int x\cos x\,dx}={x\sin x-\int\sin x\,dx}={{x\sin x+\cos x+C}.}$
Check: ${(x\sin x+\cos x)'}={\sin x+x\cos x-\sin x}={x\cos x}.$ The other choice, ${u=\cos x}$ and ${dv=x\,dx},$ gives ${\int x\cos x\,dx}={\frac{x^2}{2}\cos x+\int\frac{x^2}{2}\sin x\,dx},$ an integral that is harder than the one we started with.
Example 2. Find ${\int xe^x\,dx}.$ Take ${u=x},$ ${dv=e^x\,dx},$ so ${du=dx},$ ${v=e^x}\text{:}$
${\int xe^x\,dx}={xe^x-\int e^x\,dx}={{(x-1)e^x+C}.}$
Example 3 ($dv=dx$). Find ${\int\ln x\,dx}$ for ${x\gt0}.$ Take ${u=\ln x}$ and ${dv=dx},$ so ${du=\frac{dx}{x}},$ ${v=x}\text{:}$
${\int\ln x\,dx}={x\ln x-\int x\cdot\frac{1}{x}\,dx}={{x\ln x-x+C}.}$
Example 4 (a definite integral). With ${u=x},$ ${dv=\sin x\,dx}\text{:}$
${\int_0^\pi x\sin x\,dx}={\Bigl[-x\cos x\Bigr]_0^\pi+\int_0^\pi\cos x\,dx}={\pi+\Bigl[\sin x\Bigr]_0^\pi}={{\pi}.}$
Example 5 (twice). Find ${\int x^2\sin x\,dx}.$ Take ${u=x^2},$ ${dv=\sin x\,dx},$ so ${du=2x\,dx},$ ${v=-\cos x}.$ The new integral is the one from Example 1:
${\int x^2\sin x\,dx}={-x^2\cos x+2\int x\cos x\,dx}={-x^2\cos x+2x\sin x}+{{2\cos x+C}.}$
Example 6 (the integral comes back). Let ${I=\int e^x\sin x\,dx}.$ Integrate by parts twice, each time with $dv$ the exponential factor:
${I}={e^x\sin x-\int e^x\cos x\,dx}={e^x\sin x}-{\Bigl(e^x\cos x+\int e^x\sin x\,dx\Bigr)}={{e^x(\sin x-\cos x)-I}.}$
The unknown integral appears on both sides. Solving for it (and adding the constant at the end):
${\int e^x\sin x\,dx}={{\frac{e^x(\sin x-\cos x)}{2}+C}.}$
Example 7 (by parts, then substitution). Find ${\int\arctan x\,dx}.$ Take ${u=\arctan x},$ ${dv=dx},$ so ${du=\frac{dx}{1+x^2}},$ ${v=x}.$ The new integral is Example 5 of the substitution section:
${\int\arctan x\,dx}={x\arctan x-\int\frac{x}{1+x^2}\,dx}={{x\arctan x-\frac{1}{2}\ln(1+x^2)+C}.}$
Reduction Formulas
Integration by parts can lower the power in an integrand step by step. For ${n\ge2},$ write ${\sin^nx=\sin^{n-1}x\cdot\sin x}$ and take ${u=\sin^{n-1}x},$ ${dv=\sin x\,dx}.$ Then ${du=(n-1)\sin^{n-2}x\cos x\,dx},$ ${v=-\cos x},$ and
${\int\sin^nx\,dx}={-\sin^{n-1}x\cos x}+{{(n-1)\int\sin^{n-2}x\cos^2x\,dx}.}$
Replace ${\cos^2x}$ by ${1-\sin^2x}.$ The integral ${\int\sin^nx\,dx}$ then appears on both sides with the factors $1$ and ${-(n-1)},$ and solving for it gives the reduction formula
${\int\sin^nx\,dx}={-\frac{1}{n}\sin^{n-1}x\cos x}+{\frac{n-1}{n}\int\sin^{n-2}x\,dx}$ (${n\ge2}$).
For ${n=2}\text{:}$ ${\int\sin^2x\,dx}={-\frac{1}{2}\sin x\cos x+\frac{x}{2}+C}={\frac{x}{2}-\frac{\sin2x}{4}+C}.$
On ${\left[0,\frac{\pi}{2}\right]}$ the first term is $0$ at both ends, so ${\int_0^{\pi/2}\sin^nx\,dx}={\frac{n-1}{n}\int_0^{\pi/2}\sin^{n-2}x\,dx}.$ Starting from ${\int_0^{\pi/2}dx=\frac{\pi}{2}}$ and ${\int_0^{\pi/2}\sin x\,dx=1}\text{:}$
${\int_0^{\pi/2}\sin^2x\,dx=\frac{1}{2}\cdot\frac{\pi}{2}=\frac{\pi}{4}},$ ${\int_0^{\pi/2}\sin^3x\,dx=\frac{2}{3}\cdot1=\frac{2}{3}},$ ${\int_0^{\pi/2}\sin^4x\,dx=\frac{3}{4}\cdot\frac{\pi}{4}=\frac{3\pi}{16}}.$
The Second Mean Value Theorem for Integrals
Second mean value theorem. Let $g$ be continuous on ${[a,b]},$ and let $f$ have a continuous derivative on ${[a,b]}$ that does not change sign there. Then there is a point $c$ in ${[a,b]}$ such that
${\int_a^bf(x)\,g(x)\,dx}={f(a)\int_a^cg(x)\,dx}+{{f(b)\int_c^bg(x)\,dx}.}$
So the product is integrated as if $f$ took only its two end values: $f(a)$ on ${[a,c]}$ and $f(b)$ on ${[c,b]}.$
Proof. Let ${G(x)=\int_a^xg(t)\,dt}.$ Then ${G'=g}$ and ${G(a)=0},$ and integration by parts gives
${\int_a^bf(x)\,g(x)\,dx}={\int_a^bf(x)\,G'(x)\,dx}={{f(b)\,G(b)-\int_a^bf'(x)\,G(x)\,dx}.}$
The weight $f'$ is continuous and does not change sign, so by the weighted mean value theorem for integrals (if $G$ and $w$ are continuous and $w$ does not change sign on ${[a,b]},$ then ${\int_a^bG(x)\,w(x)\,dx}={G(c)\int_a^bw(x)\,dx}$ for some $c$ in ${[a,b]}\text{:}$ for ${w\ge0}$ and ${m\le G\le M}$ we have ${m\int_a^bw\,dx}\le{\int_a^bGw\,dx}\le{M\int_a^bw\,dx},$ and the intermediate value theorem gives $c$) there is a point $c$ with ${\int_a^bf'(x)\,G(x)\,dx}={G(c)\big(f(b)-f(a)\big)}.$ Therefore
${\int_a^bf(x)\,g(x)\,dx}={f(b)\,G(b)}-{G(c)\big(f(b)-f(a)\big)}={{f(a)\,G(c)+f(b)\big(G(b)-G(c)\big)},}$
and this is the statement, because ${G(c)=\int_a^cg(x)\,dx}$ and ${G(b)-G(c)}={\int_c^bg(x)\,dx}.$
Exercises
Substitution
1. Find ${\int\sqrt{2x+1}\,dx}.$
Let ${u=2x+1},$ ${du=2\,dx}\text{:}$ ${\frac{1}{2}\int u^{1/2}\,du}={\frac{1}{3}u^{3/2}+C}.$ Answer: ${\frac{1}{3}(2x+1)^{3/2}+C}.$
2. Find ${\int x(x^2+1)^4\,dx}.$
Let ${u=x^2+1},$ ${du=2x\,dx}\text{:}$ ${\frac{1}{2}\int u^4\,du=\frac{u^5}{10}+C}.$ Answer: ${\frac{(x^2+1)^5}{10}+C}.$
3. Find ${\int\frac{\cos x}{\sin^3x}\,dx}$ on an interval where ${\sin x\ne0}.$
Let ${u=\sin x},$ ${du=\cos x\,dx}\text{:}$ ${\int u^{-3}\,du=-\frac{1}{2u^2}+C}.$ Answer: ${-\frac{1}{2\sin^2x}+C}.$
4. Find ${\int\frac{\sin x}{(3+\cos x)^2}\,dx}.$
Let ${u=3+\cos x},$ ${du=-\sin x\,dx}\text{:}$ ${-\int u^{-2}\,du=\frac{1}{u}+C}.$ Answer: ${\frac{1}{3+\cos x}+C}.$
5. Find ${\int\frac{e^x}{1+e^x}\,dx}.$
Let ${u=1+e^x},$ ${du=e^x\,dx}\text{:}$ ${\int\frac{du}{u}=\ln u+C},$ and ${u\gt0}.$ Answer: ${\ln(1+e^x)+C}.$
6. Find ${\int\frac{\ln x}{x}\,dx}$ for ${x\gt0}.$
Let ${u=\ln x},$ ${du=\frac{dx}{x}}\text{:}$ ${\int u\,du=\frac{u^2}{2}+C}.$ Answer: ${\frac{(\ln x)^2}{2}+C}.$
7. Evaluate ${\int_1^4\frac{e^{\sqrt{x}}}{\sqrt{x}}\,dx}.$
Let ${u=\sqrt{x}},$ ${du=\frac{dx}{2\sqrt{x}}};$ the limits become $1$ and $2\text{:}$ ${2\int_1^2e^u\,du=2\Bigl[e^u\Bigr]_1^2}.$ Answer: ${2(e^2-e)}.$
8. Evaluate ${\int_0^{\pi/4}\cos2x\,\sqrt{4-\sin2x}\,dx}.$
Let ${u=4-\sin2x},$ ${du=-2\cos2x\,dx};$ the limits $0$ and $\frac{\pi}{4}$ become $4$ and $3\text{:}$ ${-\frac{1}{2}\int_4^3\sqrt{u}\,du}={\frac{1}{2}\int_3^4\sqrt{u}\,du}={{\frac{1}{3}\Bigl[u^{3/2}\Bigr]_3^4}.}$ Answer: ${\frac{8-3\sqrt{3}}{3}}.$
9. Prove that ${\int_{-a}^af(x)\,dx=0}$ for every continuous odd function $f,$ and deduce that ${\int_{-1}^1x^3\cos x\,dx=0}.$
Split the integral at $0.$ In ${\int_{-a}^0f(x)\,dx}$ put ${x=-t},$ ${dx=-dt}\text{:}$ it becomes ${\int_a^0f(-t)\,(-dt)}={\int_0^af(-t)\,dt}={-\int_0^af(t)\,dt},$ which cancels ${\int_0^af(x)\,dx}.$ The function ${x^3\cos x}$ is odd, so its integral over ${[-1,1]}$ is $0.$
10. Prove that ${\int_0^1x^m(1-x)^n\,dx}={\int_0^1x^n(1-x)^m\,dx}$ for all positive integers $m$ and $n.$
Put ${x=1-t},$ ${dx=-dt};$ the limits $0$ and $1$ become $1$ and $0\text{:}$ ${\int_0^1x^m(1-x)^n\,dx}={\int_1^0(1-t)^mt^n\,(-dt)}={\int_0^1t^n(1-t)^m\,dt}.$
Integration by Parts
11. Find ${\int x\sin x\,dx}.$
${u=x},$ ${dv=\sin x\,dx},$ ${v=-\cos x}\text{:}$ ${-x\cos x+\int\cos x\,dx}.$ Answer: ${-x\cos x+\sin x+C}.$
12. Find ${\int x^2e^x\,dx}.$
${u=x^2},$ ${dv=e^x\,dx}\text{:}$ ${x^2e^x-2\int xe^x\,dx},$ and ${\int xe^x\,dx=(x-1)e^x+C}$ (Example 2 of integration by parts). Answer: ${(x^2-2x+2)e^x+C}.$
13. Find ${\int x\ln x\,dx}$ for ${x\gt0}.$
${u=\ln x},$ ${dv=x\,dx},$ ${v=\frac{x^2}{2}}\text{:}$ ${\frac{x^2}{2}\ln x-\int\frac{x^2}{2}\cdot\frac{1}{x}\,dx}.$ Answer: ${\frac{x^2}{2}\ln x-\frac{x^2}{4}+C}.$
14. Evaluate ${\int_0^1xe^{-x}\,dx}.$
${u=x},$ ${dv=e^{-x}\,dx},$ ${v=-e^{-x}}\text{:}$ ${\Bigl[-xe^{-x}\Bigr]_0^1}+{\int_0^1e^{-x}\,dx}={-\frac{1}{e}+1-\frac{1}{e}}.$ Answer: ${1-\frac{2}{e}}.$
15. Find ${\int e^x\cos x\,dx}.$
As in Example 6 of integration by parts: ${\int e^x\cos x\,dx}={e^x\cos x+\int e^x\sin x\,dx}={e^x\cos x+e^x\sin x}-{{\int e^x\cos x\,dx}.}$ Answer: ${\frac{e^x(\sin x+\cos x)}{2}+C}.$
16. Find ${\int\arcsin x\,dx}$ for ${-1\lt x\lt1}.$
${u=\arcsin x},$ ${dv=dx}\text{:}$ ${x\arcsin x-\int\frac{x}{\sqrt{1-x^2}}\,dx};$ with ${w=1-x^2}$ the last integral is ${-\sqrt{1-x^2}+C}.$ Answer: ${x\arcsin x+\sqrt{1-x^2}+C}.$
17. Use the reduction formula to evaluate ${\int_0^{\pi/2}\sin^5x\,dx}.$
${\int_0^{\pi/2}\sin^5x\,dx}={\frac{4}{5}\int_0^{\pi/2}\sin^3x\,dx}={\frac{4}{5}\cdot\frac{2}{3}}.$ Answer: ${\frac{8}{15}}.$
Mixed Exercises
18. Find ${\int\sin\sqrt{x}\,dx}$ for ${x\gt0}.$
Let ${t=\sqrt{x}},$ ${dt=\frac{dx}{2\sqrt{x}}},$ so ${dx=2\sqrt{x}\,dt=2t\,dt}\text{:}$ ${2\int t\sin t\,dt}={2(\sin t-t\cos t)+C}$ (Exercise 11). Answer: ${2\sin\sqrt{x}-2\sqrt{x}\cos\sqrt{x}+C}.$
19. Find ${\int x^3e^{x^2}\,dx}.$
Let ${u=x^2},$ ${du=2x\,dx}\text{:}$ ${\frac{1}{2}\int ue^u\,du}={\frac{1}{2}(u-1)e^u+C}$ (Example 2 of integration by parts). Answer: ${\frac{(x^2-1)e^{x^2}}{2}+C}.$
20. Find ${\int x\arctan x\,dx}.$
${u=\arctan x},$ ${dv=x\,dx},$ and choose ${v=\frac{x^2+1}{2}}$ (any primitive of $x$ will do): ${\frac{x^2+1}{2}\arctan x}-{\int\frac{x^2+1}{2}\cdot\frac{1}{1+x^2}\,dx}.$ Answer: ${\frac{x^2+1}{2}\arctan x-\frac{x}{2}+C}.$
21. Evaluate ${\int_1^e(\ln x)^2\,dx}.$
${u=(\ln x)^2},$ ${dv=dx}\text{:}$ ${\Bigl[x(\ln x)^2\Bigr]_1^e}-{2\int_1^e\ln x\,dx}={e-2\Bigl[x\ln x-x\Bigr]_1^e}={e-2\cdot1}$ (Example 3 of integration by parts). Answer: ${e-2}.$
More: Integrals (Part 1) · Definite Integrals · Indefinite Integrals · Step-by-step integral solver

MENU