Monday, September 9, 2019

Substitution trick

What we will cover here is usually called "$u$-substitution". It is a neat way to make a hard integral into an easier one. Let's start with an example. Say we want to compute the indefinite integral $$\int x(x^{2} + 1)^{2} dx.$$ We like smashing problems with my bare hands, so let's just brute-force compute. Since $$x(x^{2} + 1)^{2} = x(x^{4} + 2x^{2} + 1) = x^{5} + 2x^{3} + x,$$ we have $$\begin{align*} \int x(x^{2} + 1)^{2} dx &= \int (x^{5} + 2x^{3} + x) dx \\ &= \frac{x^{6}}{6} + \frac{x^{4}}{2} + \frac{x^{2}}{2} + c,\end{align*}$$ where $c$ is an arbitrary constant.

OK. Let me tell you a different trick. Write $u = x^{2} + 1.$ Now, we want to write the integral in the perspective of $u.$

Step 1. Our integral needs to have $du$ at the end not $dx.$

How do we do this? Since $u = x^{2} + 1,$ we have $$\frac{du}{dx} = 2x.$$ Thus, we have $du = 2xdx.$

Step 2. Rewrite the integral completely in $u,$ and compute it in $u.$

We compute $$\begin{align*} \int x(x^{2} + 1)^{2} dx &= \int u^{2} xdx \\ &= \int \frac{u^{2}}{2} \cdot 2xdx \\ &= \int \frac{u^{2}}{2}du \\ &= \frac{u^{3}}{6} + c,\end{align*}$$ for an arbitrary constant $c.$

Step 3. For indefinite integrals, write the answer in $x.$

Hence, continuing our previous computation, our answer will come down to $$\frac{(x^{2} + 1)^{3}}{6} + c,$$ for an arbitrary constant $c.$

Exercise. Why do two answers we got look different? Or, are they the same?

Exercise. Compute $$\int_{-1}^{2} x(x^{2} + 1)^{2} dx.$$ (Hint: when you go to Step 2 above, make sure that the bounds $x = -1$ and $x = 2$ go to $u = 2$ and $u = 5,$ using $u = x^{2} + 1.$)

Exercise. Compute $$\int_{-1}^{1}\frac{e^{t} - e^{-t}}{e^{t} + e^{-t}} dt$$

Exercise. Compute $$\int \frac{e^{t} - e^{-t}}{e^{t} + e^{-t}} dt.$$

Exercise. Compute $$\int_{-1}^{1} \frac{\tan(x)}{\cos^{2}(x)} dx.$$

Exercise. Compute $$\int \frac{\tan(x)}{\cos(x)} dx.$$

Exercise. Read Section 7.1 of your book.

Exercise. Do #1 (b) on Exam 1 (Winter 2019).

Exercise. Do #1 (d) on Exam 1 (Fall 2018).

Exercise. Do #4 (a) on Exam 1 (Fall 2018).

No comments:

Post a Comment