This site is being phased out.

Computing integrals

From Mathematics Is A Science
Jump to navigationJump to search

We found these antiderivatives from a list of derivatives.

Integrals of specific functions: $$ \left. \begin{gathered} \int e^{x} \, dx = e^{x} + C, \\ \int \sin x \, dx = -\cos x + C, \\ \int \cos x \, dx = \sin x + C, \\ \int x^{n} \, dx = \frac{x^{n+1}}{n+1} + C, \, \text{ provided } n \neq 1,\\ \int \frac{1}{x} \, dx = \ln |x| + C,x \ne 0. \end{gathered} \right. $$ We need to be careful to interpret the last one. The formula holds only on the two intervals, separately, of the domain of $\frac{1}{x} = (-\infty,0)\cup(0,\infty)$. This means that $C$ can vary from one to the other! For example, we could have this: $$F(x) = \begin{cases} \ln |x| + 3 & \text{ for } x < 0, \\ \ln |x| + 5 & \text{ for } x > 0. \end{cases} $$ To verify, $$ \left. \begin{aligned} F^{\prime} &= \left( \ln |x| + 3 \right)^{\prime} = \frac{1}{x} \\ &= \left( \ln |x| + 5 \right)^{\prime} = \frac{1}{x} \end{aligned} \right. \, \text{ Same! } $$

We get these from the two properties of antiderivatives.

Rules of integrals: $$ \begin{aligned} \text{CMR }\, \int c\, f(x) \, dx &= c \int f(x) \, dx, \\ \text{SR} \, \int \left( f(x) + g(x) \right) \, dx &= \int f(x) \, dx + \int g(x) \, dx. \end{aligned} $$ No product, quotient, or chain rules (below)? There are analogues, see Calc 2.

Exercises on antidifferentiation are done similarly to differentiation exercises -- use properties and the list of derivatives (7 items in total).

Example $$ \begin{aligned} \int \left( x^{3} + 3e^{x} - \sin x \right) \, dx & \overset{\text{SR}}{=} \int x^{3} \, dx + \int 3e^{x} \, dx + \int \sin x \, dx \\ & \overset{\text{CMR}}{=} \int x^{3} \, dx + 3 \int e^{x} \, dx + \int \sin x \, dx \\ & \overset{\text{Formulas}}{=} \frac{x^{4}}{4} + 3\cdot e^{x} - \left( -\cos x \right) + C \\ & \overset{\text{Simplify}}{=} \frac{1}{4}x^{4} + 3e^{x} + \cos x + C \end{aligned} $$ That's the hard part, finding antiderivatives.

Easy part: $$ \begin{aligned} \int_{0}^{1} \left( x^{3} + 3e^{x} - \sin x \right) \, dx & \overset{\text{FTC}}{=} \left. \frac{1}{4} \, x^{4} + 3e^{x} + \cos x \right|_{0}^{1} \\ & \overset{\text{Substitute}}{=} \left( \frac{1}{4} \, 1^{4} + 3e^{1} + \cos 1 \right) + \left( \frac{1}{4} \, 0^{4} + 3e^{0} + \cos 0 \right) \\ &= \frac{1}{4} + 3e + \cos 1 - 0 - 3 -1. \end{aligned} $$ The hard part is easy if there is no multiplication, division, or composition.

How do we integrate functions with compositions?

Let's, again, try to reverse the direction of differentiation.

Let's take $\sin (x^{2})$. Easy to differentiate by the Chain Rule: $$\left( \sin (x^{2}) \right)^{\prime} = \cos (x^{2}) \cdot 2x .$$ However $$\int \sin (x^{2}) \, dx = ? $$ We don't recognize $\sin (x^{2})$ as the derivative of any function we know.

We do recognize $\cos (x^{2}) \cdot 2x$, so $$\int\cos (x^{2}) \, 2x \, dx = \sin (x^{2}) + C .$$ More? $$\int\sin (x^{2}) \, 2x \, dx = -\cos (x^{2}) + C $$ $$\int e^{x^{2}} \, 2x \, dx = e^{x^{2}} + C $$ Verify: $$( e^{x^{2}} )^{\prime} = e^{x^{2}}\cdot 2x.$$

Integration of compositions.png

Three examples. What do they have in common? $$ \int \, ? \, (x^{2}) \cdot 2x \, dx = \, ? \, (x^{2}) + C .$$ All except what ever behind these question marks. In fact we know what that is and we can rewrite: $$ \int f(x^{2}) \cdot 2x \, dx = F(x^{2}) + C, $$ where $$F^{\prime} =f .$$

So, to integrate these we solve this problem: given $f$, find $F$.

What is this? Antidifferentiation.

This is important: $f$ and $F$ aren't functions of $x$!

Composition.png

Let's say they are functions of some $u$. Then to find $F$, we integrate $f$ with respect to $u$: $$F(u) = \int f(u)\, du .$$

Example: Evaluate: $$\int \underbrace{\sqrt[3]{x^{2}}}_{\text{Decompose}}\cdot 2x \, dx = ?$$ The key step is to break the composition apart, to find $u,f,F$.

Decomposition.png

So, $u=x^2,f(x)=u^{1/3}$. Then $$ \begin{aligned} F(u) &= \int \sqrt[3]{u}\, du = \int u^{\frac{1}{3}} \, du \\ &= \frac{u^{\frac{1}{3}+1}}{\frac{1}{3} + 1} + C = \frac{3}{4}u^{\frac{4}{3}} + C. \end{aligned} $$ Note: to finish substitute $u$.

More generally, let's replace $x^{2}$ with $g(x)$. We deal with this composition:

Decomposition2.png

We want to integrate $$\int f(g(x))\cdot g^{\prime}(x)\, dx.$$ Note: we've already done this: $$\sin (x^{2}) \cdot 2x \, dx .$$

Then the answer is $F(g(x))$, where $F$ is an antiderivative of $f$: $$F^{\prime} = f.$$

Proof: $$ \begin{aligned} \left( F(g(x)) \right)^{\prime} &\overset{\text{CR}}{=} F^{\prime}(g(x)\cdot g^{\prime}(x) \\ &= f(g(x))g^{\prime}(x). \end{aligned} $$ $\blacksquare$

Conclusion: we can integrate compositions when the derivative of the "inside function" is present as a factor: $$ f(\underbrace{g(x)}_{\text{inside}}) \cdot \underbrace{g^{\prime}(x)}_{\text{its derivative}} .$$

Officially,

Integration by substitution: $$\int f(g(x))g^{\prime}\, dx = F(g(x)) + C,$$ where $F(u)=\int f(u)\, du$

Example: Evaluate $$\int \sqrt{x^{3} + 1} \cdot 3x^{2} \, dx .$$

Observe first: $$(x^{3} + 1)^{\prime}=3x^2.$$ So, this should work...

$$ \begin{aligned} \text{Identify:} & \\ f(u) = \sqrt{u} & \longrightarrow F(u) = \int u^{\frac{1}{2}} \, du = \frac{2}{3} u^{\frac{3}{2}} + C \\ u = g(x) = x^{3} + 1 &\longrightarrow g^{\prime}(x) = 3x^{2} \\ \text{Substitution: } & \\ &= \frac{2}{3}u^{\frac{3}{2}} + C \\ \text{Back-substitution: } & \\ &= \frac{2}{3}(x^{3} + 1)^{\frac{3}{2}} + C \end{aligned} $$ Verify.

Example: Evaluate $$\int \sqrt{x^{3} + 1} \, x^{2} \, dx = ? $$ Just notice that $(x^{3} + 1 )^{\prime} = 3x^{2}$, not $x^{2}$. The condition doesn't seem to be satisfied...

We'll try to apply the formula anyway.

Method: $$ \left. \begin{aligned} \text{Substitution } u = x^{3} + 1 \\ \text{Compute } du = 3x^{2} \, dx \\ \end{aligned} \right\} \text{Convert the integral with respect to } x \text{ to new one with respect to } u $$ The last part comes from $\frac{du}{dx}=3x^{2}$ (also see differential forms).

We need to convert $\sqrt{x^{3} + 1} \, x^{2}$ to $u$, yes, but what's crucial we need to convert $dx$, too.

We already have all we need above. We break what's inside the integral apart but not in the obvious way: $$\sqrt{x^{3} + 1} = \sqrt u,$$ $$x^{2} \, dx = \frac{1}{3} u\, du.$$ Now we deal with the integral itself. $$ \begin{aligned} \int \sqrt{\underbrace{x^{3} + 1}_{u}} \, x^{2} \, dx = \int \sqrt{u} \cdot \frac{du}{3} & \\ = \frac{1}{3}\int u^{\frac{1}{2}}\, du \, \text{ New integral!} \\ \text{This is called change of variables in the integral.} & \\ & \overset{\text{PF}}{=} \frac{1}{3} \, \frac{2}{3} u^{\frac{3}{2}} + C \, \gets \text{ integration finished!} \\ &= \frac{1}{3} \, \frac{2}{3} (x^{3} + 1)^{\frac{3}{2}} + C \, \gets \text{backsubstitution } u = x^{3} + 1 \end{aligned} $$ Answer: $$\frac{2}{9} (x^{3} + 1)^{\frac{3}{2}} + C.$$

Example: $$\int e^{x} \sin (e^{x}) \, dx$$ Idea: break the composition, $\sin(e^{x}$: $$ u = e^{x}, \, y = \sin u $$ The first equation is in fact the change of variables.

Change of variables in integral.png

Need to convert $dx$ to $du$ too: $$du = e^{x} \, dx $$ Use these two: $$ \begin{aligned} \int e^{x} \sin (e^{x}) \, dx &= \int \sin u \, du \\ \text{evaluate } &= -\cos u + C \\ &= \cos e^{x} + C. \end{aligned} $$