lots of cleanup
This commit is contained in:
@@ -3,35 +3,37 @@
|
||||
|
||||
{{< include ../_common_code.qmd >}}
|
||||
|
||||
We discuss the integration techniques of $u$-substitution and trigonometric substitution.
|
||||
|
||||
This section uses these add-on packages:
|
||||
|
||||
|
||||
```{julia}
|
||||
using CalculusWithJulia
|
||||
using Plots
|
||||
plotly()
|
||||
using Plots; plotly()
|
||||
using SymPy
|
||||
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
## Integration by *u*-substitution
|
||||
|
||||
|
||||
|
||||
The technique of $u$-[substitution](https://en.wikipedia.org/wiki/Integration_by_substitution) is derived from reversing the chain rule: $[f(g(x))]' = f'(g(x)) g'(x)$.
|
||||
|
||||
::: {.definition title="Subsitution"}
|
||||
|
||||
Suppose that $g$ is continuous and $u(x)$ is differentiable with $u'(x)$ being Riemann integrable. Then both these integrals are defined:
|
||||
Suppose that $g$ is continuous and $u(x)$ is differentiable with $u'(x)$ being Riemann integrable. Then both these integrals are defined and are equal:
|
||||
|
||||
|
||||
$$
|
||||
\int_a^b g(u(t)) \cdot u'(t) dt, \quad \text{and}\quad \int_{u(a)}^{u(b)} g(x) dx.
|
||||
\int_a^b g(u(t)) \cdot u'(t) dt = \quad \int_{u(a)}^{u(b)} g(x) dx
|
||||
$$
|
||||
|
||||
We wish to show they are equal.
|
||||
:::
|
||||
|
||||
|
||||
Let $G$ be an antiderivative of $g$, which exists as $g$ is assumed to be continuous. (By the Fundamental Theorem part I.) Consider the composition $G \circ u$. The chain rule gives:
|
||||
Let $G$ be an antiderivative of $g$, which exists and is differentiable as $g$ is assumed to be continuous. (By the Fundamental Theorem part I.) Consider the composition $G \circ u$. The chain rule gives:
|
||||
|
||||
|
||||
$$
|
||||
@@ -50,28 +52,15 @@ $$
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
That is, this substitution formula applies:
|
||||
|
||||
|
||||
> $\int_a^b g(u(x)) u'(x) dx = \int_{u(a)}^{u(b)} g(x) dx.$
|
||||
|
||||
|
||||
|
||||
Further, for indefinite integrals,
|
||||
|
||||
|
||||
> $\int f(g(x)) g'(x) dx = \int f(u) du.$
|
||||
|
||||
|
||||
---
|
||||
|
||||
We have seen a special case of substitution where $u(x) = x-c$ in the formula $\int_{a-c}^{b-c} g(x) dx= \int_a^b g(x-c)dx$.
|
||||
|
||||
|
||||
The main use of this is to take complicated things inside of the function $g$ out of the function (the $u(x)$) by renaming them, then accounting for the change of name.
|
||||
The main use of substitution is to take complicated things inside of the function $g$ out of the function (the $u(x)$) by renaming them, then accounting for the change of name.
|
||||
|
||||
|
||||
Some examples are in order.
|
||||
An example is in order.
|
||||
|
||||
|
||||
Consider:
|
||||
@@ -85,15 +74,13 @@ Clearly the $\sin(x)$ inside the exponential is an issue. If we let $u(x) = \sin
|
||||
|
||||
|
||||
$$
|
||||
\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.
|
||||
\int_0^{\pi/2} u'(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.
|
||||
$$
|
||||
|
||||
This all worked, as the problem was such that it was more or less obvious what to choose for $u$ and $G$.
|
||||
|
||||
|
||||
### Integration by substitution
|
||||
|
||||
|
||||
The process of identifying the result of the chain rule in the function to integrate is not automatic, but rather a bit of an art. The basic step is to try some values and hope one works. Typically, this is taught by "substituting" in some value for part of the expression (basically the $u(x)$) and seeing what happens.
|
||||
|
||||
@@ -115,8 +102,13 @@ Again, we see that the $x^2$ inside the exponential is a complication. Letting $
|
||||
|
||||
|
||||
$$
|
||||
\int_0^2 4x e^{x^2} dx = 2\int_0^2 e^{x^2} \cdot 2x dx = 2\int_{u(0)}^{u(2)} e^u du = 2 \int_0^4 e^u du =
|
||||
2 e^u\big|_{u=0}^4 = 2(e^4 - 1).
|
||||
\begin{align*}
|
||||
\int_0^2 4x e^{x^2} dx = 2\int_0^2 e^{x^2} \cdot 2x dx\\
|
||||
& = 2\int_{u(0)}^{u(2)} e^u du\\
|
||||
&= 2 \int_0^4 e^u du \\
|
||||
&= 2 e^u\Big|_{u=0}^4 \\
|
||||
&= 2(e^4 - 1).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
---
|
||||
@@ -126,8 +118,11 @@ Consider now $\int_0^1 2x^2 \sqrt{1 + x^3} dx$. Here we see that the $1 + x^3$ m
|
||||
|
||||
|
||||
$$
|
||||
\int_0^1 2x^2 \sqrt{1 + x^3} dx = \int_{u(0)}^{u(1)} 2 \sqrt{u} (1/3) du = 2/3 \cdot \frac{u^{3/2}}{3/2} \big|_1^2 =
|
||||
\frac{4}{9} \cdot(2^{3/2} - 1).
|
||||
\begin{align*}
|
||||
\int_0^1 2x^2 \sqrt{1 + x^3} dx
|
||||
&= \int_{u(0)}^{u(1)} 2 \sqrt{u} (1/3) du = 2/3 \cdot \frac{u^{3/2}}{3/2} \Big|_1^2\\
|
||||
&= \frac{4}{9} \cdot(2^{3/2} - 1).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
---
|
||||
@@ -137,26 +132,29 @@ Consider $\int_0^{\pi} \cos(x)^3 \sin(x) dx$. The $\cos(x)$ function inside the
|
||||
|
||||
|
||||
$$
|
||||
\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.
|
||||
\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 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:
|
||||
|
||||
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 in @fig-plot-cos-cubed-times-sin-over-0-pi shows that about $\pi/2$ the function has odd-like symmetry, so the answer of $0$ is supported by the plot.
|
||||
|
||||
::: {#fig-plot-cos-cubed-times-sin-over-0-pi}
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
f(x) = cos(x)^3 * sin(x)
|
||||
plot(f, 0, 1pi)
|
||||
plot(f, 0, pi; legend=false)
|
||||
```
|
||||
|
||||
Plot of $f(x) = \cos(x)^3 \cdot \sin(x)$ over $[0, \pi]$ shows odd symmetry about $x=\pi/2$
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
|
||||
Consider $\int_1^e \log(x)/x dx$. There isn't really an "inside" function here, but instead just a tricky $\log(x)$. If we let $u=\log(x)$, what happens? We get $du = 1/x \cdot dx$, which we see present in the original. So with this, we have:
|
||||
Consider $\int_1^e (\log(x)/x) dx$. There isn't really an "inside" function here, but instead just a tricky $\log(x)$. If we let $u=\log(x)$, what happens? We get $du = 1/x \cdot dx$, which we see present in the original. So with this, we have:
|
||||
|
||||
|
||||
$$
|
||||
\int_1^e \frac{\log(x)}{x} dx = \int_{u(1)}^{u(e)} u du = \frac{u^2}{2}\big|_0^1 = \frac{1}{2}.
|
||||
\int_1^e \frac{\log(x)}{x} dx = \int_{u(1)}^{u(e)} u du = \frac{u^2}{2}\Big|_0^1 = \frac{1}{2}.
|
||||
$$
|
||||
|
||||
##### Example: Transformations
|
||||
@@ -165,7 +163,7 @@ $$
|
||||
We say that the area intrinsically discussed in the definite integral $A=\int_a^b f(x-c) dx$ is unaffected by shifts, in that $A = \int_{a-c}^{b-c} f(x) dx$. What about more general transformations? For example: if $g(x) = (1/h) \cdot f((x-c)/h)$ for values $c$ and $h$ what is the integral over $a$ to $b$ in terms of the function $f(x)$?
|
||||
|
||||
|
||||
If $A = \int_a^b (1/h) \cdot f((x-c)/h) dx$ then we let $u = (x-c)/h$. With this, $du = 1/h \cdot dx$. This allows a straight substitution:
|
||||
If $A = \int_a^b (1/h) \cdot f((x-c)/h) dx$ then we let $u = (x-c)/h$. With this, $du = 1/h \cdot dx$ allowing a straight substitution:
|
||||
|
||||
|
||||
$$
|
||||
@@ -176,7 +174,7 @@ So the answer is: the area under the transformed function over $a$ to $b$ is the
|
||||
|
||||
|
||||
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?
|
||||
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) = (1/h) \cdot f(u(x))$. Then, as $du = 1/h dx$
|
||||
@@ -225,7 +223,7 @@ $$
|
||||
Gives the *total distance* traveled.
|
||||
|
||||
|
||||
To illustrate with a simple example, if a car drives East for one hour at 60 miles per hour, then heads back West for an hour at 60 miles per hour, the car's position after one hour is $x(2) = x(0)$, with a change in position $x(2) - x(0) = 0$. Whereas, the total distance traveled is $120$ miles. (Gas is paid on total distance, not change in position!). What are the formulas for speed and velocity? Clearly $s(t) = 60$, a constant, whereas here $v(t) = 60$ for $0 \leq t \leq 1$ and $-60$ for $1 < t \leq 2$.
|
||||
To illustrate with a simple example, if a car drives East for one hour at 60 miles per hour, then heads back West for an hour at 60 miles per hour, the car's position after one hour is $x(2) = x(0)$, with a change in position $x(2) - x(0) = 0$. Whereas, the total distance traveled is $120$ miles. (Gas is paid on total distance, not change in position!) What are the formulas for speed and velocity? Clearly $s(t) = 60$, a constant, whereas here $v(t) = 60$ for $0 \leq t \leq 1$ and $-60$ for $1 < t \leq 2$.
|
||||
|
||||
|
||||
Suppose $v(t)$ is given by $v(t) = (t-2)^3/3 - 4(t-2)/3$. If $x(0)=0$ Find the position after 3 time units and the total distance traveled.
|
||||
@@ -235,16 +233,22 @@ We let $u(t) = t - 2$ so $du=dt$. The position is given by
|
||||
|
||||
|
||||
$$
|
||||
\int_0^3 ((t-2)^3/3 - 4(t-2)/3) dt = \int_{u(0)}^{u(3)} (u^3/3 - 4/3 u) du =
|
||||
(\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{-2}^1 = \frac{3}{4}.
|
||||
\begin{align*}
|
||||
\int_0^3 \left(\frac{(t-2)^3}{3} - \frac{4(t-2)}{3}\right) dt
|
||||
&= \int_{u(0)}^{u(3)} \left(\frac{u^3}{3} - \frac{4u}{3} \right) du\\
|
||||
&= \left(\frac{u^4}{12} - \frac{4}{3}\cdot\frac{u^2}{2}\right) \Big|_{-2}^1\\
|
||||
&= \frac{3}{4}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
The speed is similar, but we have to work harder:
|
||||
|
||||
|
||||
$$
|
||||
\int_0^3 \lvert v(t) \rvert dt = \int_0^3 \lvert ((t-2)^3/3 - 4(t-2)/3) \rvert dt =
|
||||
\int_{-2}^1 \lvert u^3/3 - 4u/3 \rvert du.
|
||||
\begin{align*}
|
||||
\int_0^3 \lvert v(t) \rvert dt &= \int_0^3 \lvert \left(\frac{(t-2)^3}{3} - \frac{4(t-2)}{3}\right) \rvert dt\\
|
||||
&= \int_{-2}^1 \lvert \frac{u^3}{3} - \frac{4u}{3} \rvert du.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
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:
|
||||
@@ -252,9 +256,9 @@ But $u^3/3 - 4u/3 = (1/3) \cdot u(u-2)(u+2)$, so between $-2$ and $0$ it is posi
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\int_{-2}^0 (u^3/3 - 4u/3 ) du + \int_{0}^1 -(u^3/3 - 4u/3) du
|
||||
&= (\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{-2}^0 - (\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{0}^1\\
|
||||
&= \frac{4}{3} - -\frac{7}{12}\\
|
||||
\int_{-2}^0 \left(\frac{u^3}{3} - \frac{4u}{3} \right) du &+ \int_{0}^1 -\left(\frac{u^3}{3} - \frac{4u}{3}\right) du\\
|
||||
&= \left(\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}\right) \Big|_{-2}^0 - \left(\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}\right) \Big|_{0}^1\\
|
||||
&= \frac{4}{3} - \left(-\frac{7}{12}\right)\\
|
||||
&= \frac{23}{12}.
|
||||
\end{align*}
|
||||
$$
|
||||
@@ -337,7 +341,7 @@ The above calculation is for illustration purposes. The add-on package `Distribu
|
||||
|
||||
:::
|
||||
|
||||
## SymPy and substitution
|
||||
### SymPy and *u*-substitution
|
||||
|
||||
|
||||
The `integrate` function in `SymPy` can handle most problems which involve substitution. Here are a few examples:
|
||||
@@ -356,11 +360,11 @@ integrate(4x / sqrt(x^2 + 1), (x, 0, 2))
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
f(x) = 1/(x*log(x))
|
||||
integrate(f(x), (x, sympy.E, sympy.E^2))
|
||||
E = sympy.E
|
||||
integrate(1/(x*log(x)), (x, E, 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` or even constant `ℯ`---to avoid any conversion to floating point with $e^2$, which could yield an inexact answer.)
|
||||
|
||||
|
||||
The antiderivative is interesting here; it being an *iterated* logarithm.
|
||||
@@ -370,7 +374,7 @@ The antiderivative is interesting here; it being an *iterated* logarithm.
|
||||
integrate(1/(x*log(x)), x)
|
||||
```
|
||||
|
||||
### Failures...
|
||||
#### Failures...
|
||||
|
||||
|
||||
Not every integral problem lends itself to solution by substitution. For example, we can use substitution to evaluate the integral of $xe^{-x^2}$, but for $e^{-x^2}$ or $x^2e^{-x^2}$. The first has no familiar antiderivative, the second is done by a different technique.
|
||||
@@ -379,7 +383,7 @@ Not every integral problem lends itself to solution by substitution. For example
|
||||
Even when substitution can be used, `SymPy` may not be able to algorithmically identify it. The main algorithm used can determine if expressions involving rational functions, radicals, logarithms, and exponential functions is integrable. Missing from this list are absolute values.
|
||||
|
||||
|
||||
For some such problems, we can help `SymPy` out - by breaking the integral into pieces where we know the sign of the expression.
|
||||
For some such problems, we can help `SymPy` out---by breaking the integral into pieces where we know the sign of the expression.
|
||||
|
||||
|
||||
For substitution problems, we can also help out. For example, to find an antiderivative for
|
||||
@@ -393,8 +397,8 @@ A quick attempt with `SymPy` turns up nothing:
|
||||
|
||||
|
||||
```{julia}
|
||||
𝒇(x) = (1 + log(x)) * sqrt(1 + (x*log(x))^2 )
|
||||
integrate(𝒇(x), x)
|
||||
f(x) = (1 + log(x)) * sqrt(1 + (x*log(x))^2 )
|
||||
integrate(f(x), x)
|
||||
```
|
||||
|
||||
But were we to try $u=x\log(x)$, we'd see that this simplifies to $\int \sqrt{1 + u^2} du$, which has some hope of having an antiderivative.
|
||||
@@ -406,7 +410,7 @@ We can help `SymPy` out by substitution:
|
||||
```{julia}
|
||||
u(x) = x * log(x)
|
||||
@syms w dw
|
||||
ex = 𝒇(x)
|
||||
ex = f(x)
|
||||
ex₁ = ex(u(x) => w, diff(u(x),x) => dw)
|
||||
```
|
||||
|
||||
@@ -441,7 +445,7 @@ This can be found using *trigonometric* substitution. In this example, we know t
|
||||
|
||||
|
||||
$$
|
||||
\int \sqrt{1 + x^2} dx = \int \sec(u)^2 \lvert \sec(u) \rvert du = \int \sec(u)^3 du,
|
||||
\int \sqrt{1 + x^2} dx = \int \lvert \sec(u) \rvert \sec(u)^2 du = \int \sec(u)^3 du,
|
||||
$$
|
||||
|
||||
if we know $\sec(u) \geq 0$.
|
||||
@@ -491,7 +495,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-\sin(u)^2 = \cos(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 the substitution $3\sin(u) = x$ with $3\cos(u)du = dx$ being used successfully:
|
||||
|
||||
|
||||
$$
|
||||
@@ -500,7 +504,7 @@ $$
|
||||
&=\int \frac{1}{3\sqrt{1 - \sin(u)^2}}\cdot3\cos(u) du \\
|
||||
&= \int du \\
|
||||
&= u \\
|
||||
&= \sin^{-1}(x/3).
|
||||
&= \sin^{-1}(\frac{x}{3}).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
@@ -514,6 +518,8 @@ Further substitution allows the following integral to be solved for an antideriv
|
||||
integrate(1 / sqrt(a^2 - b^2*x^2), x)
|
||||
```
|
||||
|
||||
In the above, we implicitly assumed the argument to square root function was non-negative which is the second of these two cases found in general.
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
@@ -541,7 +547,7 @@ $$
|
||||
$$
|
||||
|
||||
|
||||
SymPy gives a different representation using the arccosine:
|
||||
SymPy readily handles the more general case:
|
||||
|
||||
|
||||
```{julia}
|
||||
@@ -560,16 +566,18 @@ We need to compute:
|
||||
|
||||
|
||||
$$
|
||||
2\int_{-a}^a b \sqrt{1 - x^2/a^2} dx =
|
||||
4 b \int_0^a\sqrt{1 - x^2/a^2} dx.
|
||||
2\int_{-a}^a b \sqrt{1 - \frqc{x^2}{a^2}} dx =
|
||||
4 b \int_0^a\sqrt{1 - \frac{x^2}{a^2}} dx.
|
||||
$$
|
||||
|
||||
Letting $\sin(u) = x/a$ gives $a\cos(u)du = dx$ and an antiderivative is found with:
|
||||
|
||||
|
||||
$$
|
||||
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
|
||||
\begin{align*}
|
||||
4 b \int_0^a \sqrt{1 - \frac{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.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
The identify $\cos(u)^2 = (1 + \cos(2u))/2$ makes this tractable:
|
||||
@@ -579,7 +587,7 @@ $$
|
||||
\begin{align*}
|
||||
4ab \int \cos(u)^2 du
|
||||
&= 4ab\int_0^{\pi/2}(\frac{1}{2} + \frac{\cos(2u)}{2}) du\\
|
||||
&= 4ab(\frac{1}{2}u + \frac{\sin(2u)}{4})\big|_0^{\pi/2}\\
|
||||
&= 4ab(\frac{1}{2}u + \frac{\sin(2u)}{4})\Big|_0^{\pi/2}\\
|
||||
&= 4ab (\pi/4 + 0) = \pi ab.
|
||||
\end{align*}
|
||||
$$
|
||||
@@ -605,8 +613,8 @@ choices = [
|
||||
"``\\int u (1 - u^2) du``",
|
||||
"``\\int u \\cos(x) du``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -624,8 +632,8 @@ choices = [
|
||||
"``u=\\sec(x)``",
|
||||
"``u=\\sec(x)^2``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -643,8 +651,8 @@ choices = [
|
||||
"``u=\\sqrt{x^2 - 1}``",
|
||||
"``u=x``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -671,7 +679,7 @@ yesnoq("yes")
|
||||
###### Question
|
||||
|
||||
|
||||
For $\int (\log(x))^3/x dx$ the substitution $u=\log(x)$ reduces this to what?
|
||||
For $\int (\log(x))^3/x \cdot dx$ the substitution $u=\log(x)$ reduces this to what?
|
||||
|
||||
|
||||
```{julia}
|
||||
@@ -682,8 +690,8 @@ choices = [
|
||||
"``\\int u du``",
|
||||
"``\\int u^3/x du``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -700,8 +708,8 @@ choices = [
|
||||
"``u=\\sin(x)``",
|
||||
"``u=\\tan(x)``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -726,10 +734,100 @@ choices = [
|
||||
"``a=0,~ b=0``",
|
||||
"``a=1,~ b=1``"
|
||||
]
|
||||
answ = 2
|
||||
radioq(choices, answ)
|
||||
answer = 2
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
Some integration problems require trigonometric identities, not trigonometric substitution.
|
||||
|
||||
We consider first the integral
|
||||
|
||||
$$
|
||||
\int_0^\pi \cos(\theta) \sin(\theta) d\theta
|
||||
$$
|
||||
|
||||
Compute this using substitution or by noting the resemblance to the double angle formula $\sin(2\theta) = 2\sin(\theta)\cos(\theta)$.
|
||||
|
||||
```{julia}
|
||||
#| echo: false
|
||||
let
|
||||
@syms x
|
||||
val = integrate(cos(x)*sin(x), (x, 0, PI))
|
||||
numericq(float(val))
|
||||
end
|
||||
```
|
||||
|
||||
Now let $k > 1$ be an integer. We wish to find the integral of
|
||||
|
||||
$$
|
||||
I = \int_0^\pi \cos(k\theta) \cdot \sin(\theta) d\theta
|
||||
$$
|
||||
|
||||
First, we combine the two formulas
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\sin(a + b) &= \sin(a) \cos(b) + \cos(a) \sin(b)\\
|
||||
\sin(a - b) &= \sin(a) \cos(b) - \cos(a) \sin(b)
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
to get
|
||||
|
||||
$$
|
||||
\sin(a + b) + \sin(a-b) = 2 \sin(a) \cos(b)
|
||||
$$
|
||||
|
||||
Taking $a=\theta$ and $b = k\theta$, what is a re-expression for the integrand $\cos(k\theta) \sin(\theta)$?
|
||||
|
||||
```{julia}
|
||||
#| echo: false
|
||||
choices = [
|
||||
L"1/2 \cdot (\sin((1 + k)\theta) + \sin((1-k)\theta))",
|
||||
L"1/2 \cdot (\cos((1 + k) \theta) + \cos((1-k)\theta))",
|
||||
L"\cos(\theta) \sin(k \theta)"
|
||||
]
|
||||
answer = 1
|
||||
buttonq(choices, answer)
|
||||
```
|
||||
|
||||
Using substitution (e.g. $u=a\theta$) or some other means find the value of
|
||||
|
||||
$$
|
||||
\int_0^\pi \sin(a \theta) d\theta.
|
||||
$$
|
||||
|
||||
|
||||
```{julia}
|
||||
#| echo: false
|
||||
choices = [L"1/a - \cos(a\cdot \pi)/a",
|
||||
L"1/a"]
|
||||
answer = 1
|
||||
buttonq(choices, answer)
|
||||
```
|
||||
|
||||
When $a=k+1$ or $k-1$ we have to evaluate $\cos((k+1)\pi$ or $\cos((k-1)\pi)$. These have the same value, which can be seen by writing, say, $\cos((k +1)\pi) = \cos(k\pi + \pi)$. What is the value?
|
||||
|
||||
```{julia}
|
||||
#| echo: false
|
||||
choices = [L"-\cos(\pi)",
|
||||
L"-\cos(k\pi)"]
|
||||
answer = 2
|
||||
explanation = L"the extra $\pi$ just rotates the angle half way around the unit circle so changes the sign but not the magnitude of the cosine of $k\pi$"
|
||||
buttonq(choices, answer; explanation)
|
||||
```
|
||||
|
||||
Combining, this gives a value of
|
||||
|
||||
$$
|
||||
I = \frac{1 + \cos(k\pi)}{1 - k^2}.
|
||||
$$
|
||||
|
||||
|
||||
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
@@ -745,14 +843,14 @@ choices = [
|
||||
"``\\sec(u) = x``",
|
||||
"``u = 1 - x^2``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
The integral $\int x/(1+x^2) dx$ lends itself to what substitution?
|
||||
The integral $\int x/(1+x^2) \cdot dx$ lends itself to what substitution?
|
||||
|
||||
|
||||
```{julia}
|
||||
@@ -764,8 +862,8 @@ choices = [
|
||||
"``\\tan(u) = x``",
|
||||
"``\\sec(u) = x``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -783,8 +881,8 @@ choices = [
|
||||
"``\\sec(u) = x``",
|
||||
"``u = 1 - x^2``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -801,8 +899,8 @@ choices = [
|
||||
"``\\sec(u) = x``",
|
||||
"``4\\sin(u) = x``",
|
||||
"``\\sin(u) = x``"]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -819,8 +917,8 @@ choices = [
|
||||
"``\\tan(u) = x``",
|
||||
"``a\\sec(u) = x``",
|
||||
"``\\sec(u) = x``"]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
answer = 1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -845,8 +943,8 @@ choices =[
|
||||
"``a=\\pi/3,~ b=\\pi/2``",
|
||||
"``a=1/2,~ b= 1``"
|
||||
]
|
||||
answ =1
|
||||
radioq(choices, answ)
|
||||
answer =1
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
###### Question
|
||||
@@ -861,6 +959,6 @@ How would we verify that $\log\lvert (\sec(u) + \tan(u))\rvert$ is an antideriva
|
||||
choices = [
|
||||
L"We could differentiate $\sec(u)$.",
|
||||
L"We could differentiate $\log\lvert (\sec(u) + \tan(u))\rvert$ "]
|
||||
answ = 2
|
||||
radioq(choices, answ)
|
||||
answer = 2
|
||||
radioq(choices, answer)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user