Merge pull request #93 from fangliu-tju/main

Update substitution.qmd
This commit is contained in:
john verzani 2023-05-17 13:00:46 -04:00 committed by GitHub
commit 55c795bb9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ Clearly the $\sin(x)$ inside the exponential is an issue. If we let $u(x) = \sin
$$
\int_0^2 u\prime(x) e^{u(x)} dx =
\int_0^{\pi/2} u\prime(x) e^{u(x)} dx =
\int_{u(0)}^{u(\pi/2)} e^x dx = e^x \big|_{\sin(0)}^{\sin(\pi/2)} = e^1 - e^0.
$$
@ -100,7 +100,7 @@ In the above problem, $\int_0^{\pi/2} \cos(x) e^{\sin(x)} dx$, we might just ren
$$
\int_0^{\pi/2} \cos(x) e^{\sin(x)} dx = \int_0^{\pi/2} e^{\sin(x)} \cdot \cos(x) dx = \int_{u(0)}^{u(\pi)} e^u du.
\int_0^{\pi/2} \cos(x) e^{\sin(x)} dx = \int_0^{\pi/2} e^{\sin(x)} \cdot \cos(x) dx = \int_{u(0)}^{u(\pi/2)} e^u du.
$$
---
@ -131,14 +131,14 @@ $$
---
Consider $\int_0^{\pi} \cos(x)^3 \sin(x) dx$. The $\cos(x)$ function inside the $x^3$ function is complicated. We let $u(x) = \cos(x)$ and see what that implies: $du = \sin(x) dx$, which we see is part of the question. So the above becomes:
Consider $\int_0^{\pi} \cos(x)^3 \sin(x) dx$. The $\cos(x)$ function inside the $x^3$ function is complicated. We let $u(x) = \cos(x)$ and see what that implies: $du = -\sin(x) dx$, which we see is part of the question. So the above becomes:
$$
\int_0^{\pi} \cos(x)^3 \sin(x) dx = \int_{u(0)}^{u(\pi)} u^3 du= \frac{u^4}{4}\big|_0^0 = 0.
\int_0^{\pi} \cos(x)^3 \sin(x) dx = \int_{u(0)}^{u(\pi)} -u^3 du= -\frac{u^4}{4}\big|_1^{-1} = 0.
$$
Changing limits leaves the two endpoints the same, which means the total area after substitution is $0$. A graph of this function shows that about $\pi/2$ the function has odd-like symmetry, so the answer of $0$ is supported by the plot:
Changing limits leaves the two antiderivative values of endpoints the same, which means the total area after substitution is $0$. A graph of this function shows that about $\pi/2$ the function has odd-like symmetry, so the answer of $0$ is supported by the plot:
```{julia}
@ -177,20 +177,20 @@ For example, consider the "hat" function $f(x) = 1 - \lvert x \rvert$
when $-1 \leq x \leq 1$ and $0$ otherwise. The area under $f$ is just $1$ - the graph forms a triangle with base of length $2$ and height $1$. If we take any values of $c$ and $h$, what do we find for the area under the curve of the transformed function?
Let $u(x) = (x-c)/h$ and $g(x) = h f(u(x))$. Then, as $du = 1/h dx$
Let $u(x) = (x-c)/h$ and $g(x) = (1/h) \cdot f(u(x))$. Then, as $du = 1/h dx$
\begin{align*}
\int_{c-h}^{c+h} g(x) dx
&= \int_{c-h}^{c+h} h f(u(x)) dx\\
&= \int_{c-h}^{c+h} \frac{1}{h} f(u(x)) dx\\
&= \int_{u(c-h)}^{u(c+h)} f(u) du\\
&= \int_{-1}^1 f(u) du\\
&= 1.
\end{align*}
So the area of this transformed function is still $1$. The shifting by $c$ we know doesn't effect the area, the scaling by $h$ inside of $f$ does, but is balanced out by the multiplication by $h$ outside of $f$.
So the area of this transformed function is still $1$. The shifting by $c$ we know doesn't effect the area, the scaling by $h$ inside of $f$ does, but is balanced out by the multiplication by $1/h$ outside of $f$.
##### Example: Speed versus velocity
@ -203,7 +203,7 @@ As mentioned previously, position is the integral of velocity, as expressed prec
$$
x(t) = \int_0^t v(u) du - x(0).
x(t) = \int_0^t v(u) du + x(0).
$$
What is the integral of speed?
@ -244,7 +244,7 @@ $$
\int_{-2}^1 \lvert u^3/3 - 4u/3 \rvert du.
$$
But $u^3/3 - 4u/3 = (1/3) \cdot u(u-1)(u+2)$, so between $-2$ and $0$ it is positive and between $0$ and $1$ negative, so this integral is:
But $u^3/3 - 4u/3 = (1/3) \cdot u(u-2)(u+2)$, so between $-2$ and $0$ it is positive and between $0$ and $1$ negative, so this integral is:
@ -353,7 +353,7 @@ f(x) = 1/(x*log(x))
integrate(f(x), (x, sympy.E, sympy.E^2))
```
(We used `sympy.E)` - and not `e` - to avoid any conversion to floating point, which could yield an inexact answer.)
(We used `sympy.E` - and not `e` - to avoid any conversion to floating point, which could yield an inexact answer.)
The antiderivative is interesting here; it being an *iterated* logarithm.
@ -455,7 +455,7 @@ Let's see some examples where a trigonometric substitution is all that is needed
Consider $\int 1/(1+x^2) dx$. This is an antiderivative of some function, but if that isn't observed, we might notice the $1+x^2$ and try to simplify that. First, an attempt at a $u$-substitution:
Letting $u = 1+x^2$ we get $du = 2xdx$ which gives $\int (1/u) (2x) du$. We aren't able to address the "$2x$" part successfully, so this attempt is for naught.
Letting $u = 1+x^2$ we get $du = 2xdx$ which gives $\int (1/u) (1/2x) du$. We aren't able to address the "$2x$" part successfully, so this attempt is for naught.
Now we try a trigonometric substitution, taking advantage of the identity $1+\tan(x)^2 = \sec(x)^2$. Letting $\tan(u) = x$ yields $\sec(u)^2 du = dx$ and we get:
@ -484,7 +484,7 @@ integrate(1 / (a^2 + (b*x)^2), x)
##### Example
The expression $1-x^2$ can be attacked by the substitution $\sin(u) =x$ as then $1-x^2 = 1-\cos(u)^2 = \sin(u)^2$. Here we see this substitution being used successfully:
The expression $1-x^2$ can be attacked by the substitution $\sin(u) =x$ as then $1-x^2 = 1-\sin(u)^2 = \cos(u)^2$. Here we see this substitution being used successfully:
@ -558,7 +558,7 @@ Letting $\sin(u) = x/a$ gives $a\cos(u)du = dx$ and an antiderivative is found w
$$
4 b \int_0^a \sqrt{1 - x^2/a^2} dx = 4b \int_0^{\pi/2} \sqrt{1-u^2} a \cos(u) du
4 b \int_0^a \sqrt{1 - x^2/a^2} dx = 4b \int_0^{\pi/2} \sqrt{1-\sin(u)^2} a \cos(u) du
= 4ab \int_0^{\pi/2} \cos(u)^2 du
$$
@ -601,7 +601,7 @@ radioq(choices, answ)
###### Question
For $\int \tan(x)^4 \sec(x)2 dx$ what $u$-substitution makes this easy?
For $\int \tan(x)^4 \sec(x)^2 dx$ what $u$-substitution makes this easy?
```{julia}
@ -715,7 +715,7 @@ choices = [
"``a=0,~ b=0``",
"``a=1,~ b=1``"
]
answ = 1
answ = 2
radioq(choices, answ)
```
@ -804,7 +804,7 @@ The integral $\int dx / (a^2 + x^2)$ lends itself to what substitution?
#| hold: true
#| echo: false
choices = [
"``\\tan(u) = x``",
"``a\\tan(u) = x``",
"``\\tan(u) = x``",
"``a\\sec(u) = x``",
"``\\sec(u) = x``"]