make pdf file generation work
This commit is contained in:
@@ -26,9 +26,13 @@ caption = """
|
||||
A kids' jump rope by Lifeline is comprised of little plastic segments of uniform length around a cord. The length of the rope can be computed by adding up the lengths of each segment, regardless of how the rope is arranged.
|
||||
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
The length of the jump rope in the picture can be computed by either looking at the packaging it came in, or measuring the length of each plastic segment and multiplying by the number of segments. The former is easier, the latter provides the intuition as to how we can find the length of curves in the $x-y$ plane. The idea is old, [Archimedes](http://www.maa.org/external_archive/joma/Volume7/Aktumen/Polygon.html) used fixed length segments of polygons to approximate $\pi$ using the circumference of circle producing the bounds $3~\frac{1}{7} > \pi > 3~\frac{10}{71}$.
|
||||
|
||||
|
||||
@@ -64,7 +68,6 @@ To see why, any partition of the interval $[a,b]$ by $a = t_0 < t_1 < \cdots < t
|
||||
```{julia}
|
||||
#| hold: false
|
||||
#| echo: false
|
||||
#| cache: true
|
||||
## {{{arclength_graph}}}
|
||||
function make_arclength_graph(n)
|
||||
|
||||
@@ -120,7 +123,7 @@ $$
|
||||
But looking at each term, we can push the denominator into the square root as:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
d_i &= d_i \cdot \frac{t_i - t_{i-1}}{t_i - t_{i-1}}
|
||||
\\
|
||||
@@ -128,7 +131,7 @@ d_i &= d_i \cdot \frac{t_i - t_{i-1}}{t_i - t_{i-1}}
|
||||
\left(\frac{f(t_i)-f(t_{i-1})}{t_i-t_{i-1}}\right)^2} \cdot (t_i - t_{i-1}) \\
|
||||
&= \sqrt{ g'(\xi_i)^2 + f'(\psi_i)^2} \cdot (t_i - t_{i-1}).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The values $\xi_i$ and $\psi_i$ are guaranteed by the mean value theorem and must be in $[t_{i-1}, t_i]$.
|
||||
|
||||
@@ -257,9 +260,12 @@ This picture of Jasper John's [Near the Lagoon](http://www.artic.edu/aic/collect
|
||||
#| echo: false
|
||||
imgfile = "figures/johns-catenary.jpg"
|
||||
caption = "One of Jasper Johns' Catenary series. Art Institute of Chicago."
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
The museum notes have
|
||||
|
||||
|
||||
@@ -342,9 +348,12 @@ imgfile="figures/verrazzano-unloaded.jpg"
|
||||
caption = """
|
||||
The Verrazzano-Narrows Bridge during construction. The unloaded suspension cables form a catenary.
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
@@ -352,21 +361,25 @@ imgfile="figures/verrazzano-loaded.jpg"
|
||||
caption = """
|
||||
A rendering of the Verrazzano-Narrows Bridge after construction (cf. [nycgovparks.org](https://www.nycgovparks.org/highlights/verrazano-bridge)). The uniformly loaded suspension cables would form a parabola, presumably a fact the artist of this rendering knew. (The spelling in the link is not the official spelling, which carries two zs.)
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||
). The uniformly loaded suspension cables would form a parabola, presumably a fact the artist of this rendering knew. (The spelling in the link is not the official spelling, which carries two zs.)
|
||||
](./figures/verrazzano-loaded.jpg)
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
The [nephroid](http://www-history.mcs.st-and.ac.uk/Curves/Nephroid.html) is a curve that can be described parametrically by
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
g(t) &= a(3\cos(t) - \cos(3t)), \\
|
||||
f(t) &= a(3\sin(t) - \sin(3t)).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Taking $a=1$ we have this graph:
|
||||
|
||||
@@ -391,7 +404,7 @@ quadgk(t -> sqrt(𝒈'(t)^2 + 𝒇'(t)^2), 0, 2pi)[1]
|
||||
The answer seems like a floating point approximation of $24$, which suggests that this integral is tractable. Pursuing this, the integrand simplifies:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\sqrt{g'(t)^2 + f'(t)^2}
|
||||
&= \sqrt{(-3\sin(t) + 3\sin(3t))^2 + (3\cos(t) - 3\cos(3t))^2} \\
|
||||
@@ -401,7 +414,7 @@ $$
|
||||
&= 3\sqrt{2}\sqrt{1 - \cos(2t)}\\
|
||||
&= 3\sqrt{2}\sqrt{2\sin(t)^2}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The second to last line comes from a double angle formula expansion of $\cos(3t - t)$ and the last line from the half angle formula for $\cos$.
|
||||
|
||||
@@ -423,6 +436,7 @@ The following link shows how the perimeter of a complex figure relates to the pe
|
||||
tweet = """
|
||||
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">How cookie cutters are made <a href="https://t.co/eumfwH4Ixl">pic.twitter.com/eumfwH4Ixl</a></p>— How Things Are Manufactured (@fastworkers6) <a href="https://twitter.com/fastworkers6/status/1556214840909111296?ref_src=twsrc%5Etfw">August 7, 2022</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||||
"""
|
||||
|
||||
HTMLoutput(tweet)
|
||||
```
|
||||
|
||||
@@ -435,14 +449,14 @@ A teacher of small children assigns his students the task of computing the lengt
|
||||
Mathematically, suppose a curve is described parametrically by $(g(t), f(t))$ for $a \leq t \leq b$. A new parameterization is provided by $\gamma(t)$. Suppose $\gamma$ is strictly increasing, so that an inverse function exists. (This assumption is implicitly made by the teacher, as it implies the student won't start counting in the wrong direction.) Then the same curve is described by composition through $(g(\gamma(u)), f(\gamma(u)))$, $\gamma^{-1}(a) \leq u \leq \gamma^{-1}(b)$. That the arc length is the same follows from substitution:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_{\gamma^{-1}(a)}^{\gamma^{-1}(b)} \sqrt{([g(\gamma(t))]')^2 + ([f(\gamma(t))]')^2} dt
|
||||
&=\int_{\gamma^{-1}(a)}^{\gamma^{-1}(b)} \sqrt{(g'(\gamma(t) )\gamma'(t))^2 + (f'(\gamma(t) )\gamma'(t))^2 } dt \\
|
||||
&=\int_{\gamma^{-1}(a)}^{\gamma^{-1}(b)} \sqrt{g'(\gamma(t))^2 + f'(\gamma(t))^2} \gamma'(t) dt\\
|
||||
&=\int_a^b \sqrt{g'(u)^2 + f'(u)^2} du = L
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
(Using $u=\gamma(t)$ for the substitution.)
|
||||
|
||||
@@ -466,13 +480,13 @@ For a simple example, we have $g(t) = R\cos(t)$ and $f(t)=R\sin(t)$ parameterizi
|
||||
What looks at first glance to be just a slightly more complicated equation is that of an ellipse, with $g(t) = a\cos(t)$ and $f(t) = b\sin(t)$. Taking $a=1$ and $b = a + c$, for $c > 0$ we get the equation for the arc length as a function of $t$ is just
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
s(u) &= \int_0^u \sqrt{(-\sin(t))^2 + b\cos(t)^2} dt\\
|
||||
&= \int_0^u \sqrt{\sin(t))^2 + \cos(t)^2 + c\cos(t)^2} dt \\
|
||||
&=\int_0^u \sqrt{1 + c\cos(t)^2} dt.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
But, despite it not looking too daunting, this integral is not tractable through our techniques and has an answer involving elliptic integrals. We can work numerically though. Letting $a=1$ and $b=2$, we have the arc length is given by:
|
||||
|
||||
@@ -571,12 +585,12 @@ $$
|
||||
So
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_0^1 (tf'(u) + (1-t)f'(v)) dt &< \int_0^1 f'(tu + (1-t)v) dt, \text{or}\\
|
||||
\frac{f'(u) + f'(v)}{2} &< \frac{1}{v-u}\int_u^v f'(w) dw,
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
by the substitution $w = tu + (1-t)v$. Using the fundamental theorem of calculus to compute the mean value of the integral of $f'$ over $[u,v]$ gives the following as a consequence of strict concavity of $f'$:
|
||||
|
||||
@@ -667,25 +681,25 @@ which holds by the strict concavity of $f'$, as found previously.
|
||||
Using the substitution $x = f_i^{-1}(u)$ as needed to see:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_a^u f(x) dx &= \int_0^{f(u)} u [f_1^{-1}]'(u) du \\
|
||||
&> -\int_0^h u [f_2^{-1}]'(u) du \\
|
||||
&= \int_h^0 u [f_2^{-1}]'(u) du \\
|
||||
&= \int_v^b f(x) dx.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
For the latter claim, integrating in the $y$ variable gives
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_u^c (f(x)-h) dx &= \int_h^m (c - f_1^{-1}(y)) dy\\
|
||||
&> \int_h^m (c - f_2^{-1}(y)) dy\\
|
||||
&= \int_c^v (f(x)-h) dx
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Now, the area under $h$ over $[u,c]$ is greater than that over $[c,v]$ as $(u+v)/2 < c$ or $v-c < c-u$. That means the area under $f$ over $[u,c]$ is greater than that over $[c,v]$.
|
||||
|
||||
@@ -707,7 +721,7 @@ or $\phi'(z) < 0$. Moreover, we have by the first assertion that $f'(z) < -f'(\p
|
||||
Using the substitution $x = \phi(z)$ gives:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_v^b \sqrt{1 + f'(x)^2} dx &=
|
||||
\int_u^a \sqrt{1 + f'(\phi(z))^2} \phi'(z) dz\\
|
||||
@@ -716,7 +730,7 @@ $$
|
||||
&= \int_a^u \sqrt{\phi'(z)^2 + f'(z)^2} dz\\
|
||||
&< \int_a^u \sqrt{1 + f'(z)^2} dz
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Letting $h=f(u) \rightarrow c$ we get the *inequality*
|
||||
|
||||
@@ -765,12 +779,12 @@ $$
|
||||
with the case above corresponding to $W = -m(k/m)$. The set of equations then satisfy:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
x''(t) &= - W(t,x(t), x'(t), y(t), y'(t)) \cdot x'(t)\\
|
||||
y''(t) &= -g - W(t,x(t), x'(t), y(t), y'(t)) \cdot y'(t)\\
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
with initial conditions: $x(0) = y(0) = 0$ and $x'(0) = v_0 \cos(\theta), y'(0) = v_0 \sin(\theta)$.
|
||||
|
||||
@@ -778,28 +792,28 @@ with initial conditions: $x(0) = y(0) = 0$ and $x'(0) = v_0 \cos(\theta), y'(0)
|
||||
Only with certain drag forces, can this set of equations be be solved exactly, though it can be approximated numerically for admissible $W$, but if $W$ is strictly positive then it can be shown $x(t)$ is increasing on $[0, x_\infty)$ and so invertible, and $f(u) = y(x^{-1}(u))$ is three times differentiable with both $f$ and $f'$ being strictly concave, as it can be shown that (say $x(v) = u$ so $dv/du = 1/x'(v) > 0$):
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f''(u) &= -\frac{g}{x'(v)^2} < 0\\
|
||||
f'''(u) &= \frac{2gx''(v)}{x'(v)^3} \\
|
||||
&= -\frac{2gW}{x'(v)^2} \cdot \frac{dv}{du} < 0
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The latter by differentiating, the former a consequence of the following formulas for derivatives of inverse functions
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
[x^{-1}]'(u) &= 1 / x'(v) \\
|
||||
[x^{-1}]''(u) &= -x''(v)/(x'(v))^3
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
For then
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(u) &= y(x^{-1}(u)) \\
|
||||
f'(u) &= y'(x^{-1}(u)) \cdot {x^{-1}}'(u) \\
|
||||
@@ -808,7 +822,7 @@ f''(u) &= y''(x^{-1}(u))\cdot[x^{-1}]'(u)^2 + y'(x^{-1}(u)) \cdot [x^{-1}]''(u)
|
||||
&= -g/(x'(v))^2 - W y'/(x'(v))^2 - y'(v) \cdot (- W \cdot x'(v)) / x'(v)^3\\
|
||||
&= -g/x'(v)^2.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
## Questions
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ In a previous section, we saw this animation:
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
#| cache: true
|
||||
## {{{archimedes_parabola}}}
|
||||
|
||||
|
||||
@@ -154,10 +153,16 @@ approximations by geometric figures with known area is the basis of
|
||||
Riemann sums.
|
||||
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
#ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
Beeckman actually did more than find the area. He generalized the relationship of rate $\times$ time $=$ distance. The line was interpreting a velocity, the "squares", then, provided an approximate distance traveled when the velocity is taken as a constant on the small time interval. Then the distance traveled can be approximated by a smaller quantity - just add the area of the rectangles squarely within the desired area ($6+16+6$) - and a larger quantity - by including all rectangles that have a portion of their area within the desired area ($10 + 16 + 10$). Beeckman argued that the error vanishes as the rectangles get smaller.
|
||||
|
||||
|
||||
@@ -222,7 +227,7 @@ To successfully compute a good approximation for the area, we would need to choo
|
||||
For Archimedes' problem - finding the area under $f(x)=x^2$ between $0$ and $1$ - if we take as a partition $x_i = i/n$ and $c_i = x_i$, then the above sum becomes:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
S_n &= f(c_1) \cdot (x_1 - x_0) + f(c_2) \cdot (x_2 - x_1) + \cdots + f(c_n) \cdot (x_n - x_{n-1})\\
|
||||
&= (x_1)^2 \cdot \frac{1}{n} + (x_2)^2 \cdot \frac{1}{n} + \cdot + (x_n)^2 \cdot \frac{1}{n}\\
|
||||
@@ -230,7 +235,7 @@ S_n &= f(c_1) \cdot (x_1 - x_0) + f(c_2) \cdot (x_2 - x_1) + \cdots + f(c_n) \cd
|
||||
&= \frac{1}{n^3} \cdot (1^2 + 2^2 + \cdots + n^2) \\
|
||||
&= \frac{1}{n^3} \cdot \frac{n\cdot(n-1)\cdot(2n+1)}{6}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The latter uses a well-known formula for the sum of squares of the first $n$ natural numbers.
|
||||
|
||||
@@ -460,7 +465,7 @@ Using the definition, we can compute a few definite integrals:
|
||||
This is just the area of a trapezoid with heights $a$ and $b$ and side length $b-a$, or $1/2 \cdot (b + a) \cdot (b - a)$. The right sum would be:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
S &= x_1 \cdot (x_1 - x_0) + x_2 \cdot (x_2 - x_1) + \cdots x_n \cdot (x_n - x_{n-1}) \\
|
||||
&= (a + 1\frac{b-a}{n}) \cdot \frac{b-a}{n} + (a + 2\frac{b-a}{n}) \cdot \frac{b-a}{n} + \cdots (a + n\frac{b-a}{n}) \cdot \frac{b-a}{n}\\
|
||||
@@ -469,7 +474,7 @@ S &= x_1 \cdot (x_1 - x_0) + x_2 \cdot (x_2 - x_1) + \cdots x_n \cdot (x_n - x_{
|
||||
& \rightarrow a \cdot(b-a) + \frac{(b-a)^2}{2} \\
|
||||
&= \frac{b^2}{2} - \frac{a^2}{2}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
> $$
|
||||
> \int_a^b x^2 dx = \frac{b^3}{3} - \frac{a^3}{3}.
|
||||
@@ -491,7 +496,7 @@ This is similar to the Archimedes case with $a=0$ and $b=1$ shown above.
|
||||
Cauchy showed this using a *geometric series* for the partition, not the arithmetic series $x_i = a + i (b-a)/n$. The series defined by $1 + \alpha = (b/a)^{1/n}$, then $x_i = a \cdot (1 + \alpha)^i$. Here the bases $x_{i+1} - x_i$ simplify to $x_i \cdot \alpha$ and $f(x_i) = (a\cdot(1+\alpha)^i)^k = a^k (1+\alpha)^{ik}$, or $f(x_i)(x_{i+1}-x_i) = a^{k+1}\alpha[(1+\alpha)^{k+1}]^i$, so, using $u=(1+\alpha)^{k+1}=(b/a)^{(k+1)/n}$, $f(x_i) \cdot(x_{i+1} - x_i) = a^{k+1}\alpha u^i$. This gives
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
S &= a^{k+1}\alpha u^0 + a^{k+1}\alpha u^1 + \cdots + a^{k+1}\alpha u^{n-1}
|
||||
&= a^{k+1} \cdot \alpha \cdot (u^0 + u^1 + \cdot u^{n-1}) \\
|
||||
@@ -499,7 +504,7 @@ S &= a^{k+1}\alpha u^0 + a^{k+1}\alpha u^1 + \cdots + a^{k+1}\alpha u^{n-1}
|
||||
&= (b^{k+1} - a^{k+1}) \cdot \frac{\alpha}{(1+\alpha)^{k+1} - 1} \\
|
||||
&\rightarrow \frac{b^{k+1} - a^{k+1}}{k+1}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
> $$
|
||||
> \int_a^b x^{-1} dx = \log(b) - \log(a), \quad (0 < a < b).
|
||||
@@ -761,14 +766,12 @@ So $\pi$ is about `2a`.
|
||||
We have the well-known triangle [inequality](http://en.wikipedia.org/wiki/Triangle_inequality) which says for an individual sum: $\lvert a + b \rvert \leq \lvert a \rvert +\lvert b \rvert$. Applying this recursively to a partition with $a < b$ gives:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\lvert f(c_1)(x_1-x_0) + f(c_2)(x_2-x_1) + \cdots + f(c_n) (x_n-x_1) \rvert
|
||||
& \leq
|
||||
\begin{multline*}
|
||||
\lvert f(c_1)(x_1-x_0) + f(c_2)(x_2-x_1) + \cdots + f(c_n) (x_n-x_1) \rvert\\
|
||||
\leq
|
||||
\lvert f(c_1)(x_1-x_0) \rvert + \lvert f(c_2)(x_2-x_1)\rvert + \cdots +\lvert f(c_n) (x_n-x_1) \rvert \\
|
||||
&= \lvert f(c_1)\rvert (x_1-x_0) + \lvert f(c_2)\rvert (x_2-x_1)+ \cdots +\lvert f(c_n) \rvert(x_n-x_1).
|
||||
\end{align*}
|
||||
$$
|
||||
= \lvert f(c_1)\rvert (x_1-x_0) + \lvert f(c_2)\rvert (x_2-x_1)+ \cdots +\lvert f(c_n) \rvert(x_n-x_1).
|
||||
\end{multline*}
|
||||
|
||||
This suggests that the following inequality holds for integrals:
|
||||
|
||||
@@ -793,7 +796,7 @@ While such bounds are disappointing, often, when looking for specific values, th
|
||||
The Riemann sum above is actually extremely inefficient. To see how much, we can derive an estimate for the error in approximating the value using an arithmetic progression as the partition. Let's assume that our function $f(x)$ is increasing, so that the right sum gives an upper estimate and the left sum a lower estimate, so the error in the estimate will be between these two values:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\text{error} &\leq
|
||||
\left[
|
||||
@@ -803,7 +806,7 @@ f(x_1) \cdot (x_{1} - x_0) + f(x_2) \cdot (x_{2} - x_1) + \cdots + f(x_{n-1})(
|
||||
&= \frac{b-a}{n} \cdot (\left[f(x_1) + f(x_2) + \cdots f(x_n)\right] - \left[f(x_0) + \cdots f(x_{n-1})\right]) \\
|
||||
&= \frac{b-a}{n} \cdot (f(b) - f(a)).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
We see the error goes to $0$ at a rate of $1/n$ with the constant depending on $b-a$ and the function $f$. In general, a similar bound holds when $f$ is not monotonic.
|
||||
|
||||
@@ -847,12 +850,12 @@ This formula will actually be exact for any 3rd degree polynomial. In fact an en
|
||||
The formulas for an approximation to the integral $\int_{-1}^1 f(x) dx$ discussed so far can be written as:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
S &= f(x_1) \Delta_1 + f(x_2) \Delta_2 + \cdots + f(x_n) \Delta_n\\
|
||||
&= w_1 f(x_1) + w_2 f(x_2) + \cdots + w_n f(x_n).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The $w$s are "weights" and the $x$s are nodes. A [Gaussian](http://en.wikipedia.org/wiki/Gaussian_quadrature) *quadrature rule* is a set of weights and nodes for $i=1, \dots n$ for which the sum is *exact* for any $f$ which is a polynomial of degree $2n-1$ or less. Such choices then also approximate well the integrals of functions which are not polynomials of degree $2n-1$, provided $f$ can be well approximated by a polynomial over $[-1,1]$. (Which is the case for the "nice" functions we encounter.) Some examples are given in the questions.
|
||||
|
||||
|
||||
@@ -688,9 +688,13 @@ imgfile="figures/cycloid-companion-curve.png"
|
||||
caption = """
|
||||
Figure from Martin showing the companion curve to the cycloid. As the generating circle rolls, from ``A`` to ``C``, the original point of contact, ``D``, traces out an arch of the cycloid. The companion curve is that found by congruent line segments. In the figure, when ``D`` was at point ``P`` the line segment ``PQ`` is congruent to ``EF`` (on the original position of the generating circle).
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
In particular, it can be read that Roberval proved that the area between the cycloid and its companion curve is half the are of the generating circle. Roberval didn't know integration, so finding the area between two curves required other tricks. One is called "Cavalieri's principle." From the figure above, which of the following would you guess this principle to be:
|
||||
|
||||
|
||||
@@ -738,5 +742,9 @@ imgfile="figures/companion-curve-bisects-rectangle.png"
|
||||
caption = """
|
||||
Roberval, avoiding a trignometric integral, instead used symmetry to show that the area under the companion curve was half the area of the rectangle, which in this figure is ``2\\pi``.
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -32,9 +32,18 @@ m_2$. This means if the two children weigh the same the balance will
|
||||
tip in favor of the child farther away, and if both are the same
|
||||
distance, the balance will tip in favor of the heavier.
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
The game of seesaw is one where children earn an early appreciation for the effects of distance and relative weight. For children with equal weights, the seesaw will balance if they sit an equal distance from the center (on opposite sides, of course). However, with unequal weights that isn't the case. If one child weighs twice as much, the other must sit twice as far.
|
||||
|
||||
|
||||
@@ -148,13 +157,13 @@ The figure shows the approximating rectangles and circles representing their mas
|
||||
Generalizing from this figure shows the center of mass for such an approximation will be:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
&\frac{\rho f(c_1) (x_1 - x_0) \cdot x_1 + \rho f(c_2) (x_2 - x_1) \cdot x_1 + \cdots + \rho f(c_n) (x_n- x_{n-1}) \cdot x_{n-1}}{\rho f(c_1) (x_1 - x_0) + \rho f(c_2) (x_2 - x_1) + \cdots + \rho f(c_n) (x_n- x_{n-1})} \\
|
||||
&=\\
|
||||
&\quad\frac{f(c_1) (x_1 - x_0) \cdot x_1 + f(c_2) (x_2 - x_1) \cdot x_1 + \cdots + f(c_n) (x_n- x_{n-1}) \cdot x_{n-1}}{f(c_1) (x_1 - x_0) + f(c_2) (x_2 - x_1) + \cdots + f(c_n) (x_n- x_{n-1})}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
But the top part is an approximation to the integral $\int_a^b x f(x) dx$ and the bottom part the integral $\int_a^b f(x) dx$. The ratio of these defines the center of mass.
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ where we define $g(i) = f(a + ih)h$. In the above, $n$ relates to $b$, but we co
|
||||
Again, we fix a large $n$ and let $h=(b-a)/n$. And suppose $x = a + Mh$ for some $M$. Then writing out the approximations to both the definite integral and the derivative we have
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
F'(x) = & \frac{d}{dx} \int_a^x f(u) du \\
|
||||
& \approx \frac{F(x) - F(x-h)}{h} \\
|
||||
@@ -112,18 +112,18 @@ F'(x) = & \frac{d}{dx} \int_a^x f(u) du \\
|
||||
\left(f(a + 1h) + f(a + 2h) + \cdots + f(a + (M-1)h) \right) \\
|
||||
&= f(a + Mh).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
If $g(i) = f(a + ih)$, then the above becomes
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
F'(x) & \approx D(S(g))(M) \\
|
||||
&= f(a + Mh)\\
|
||||
&= f(x).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
That is $F'(x) \approx f(x)$.
|
||||
|
||||
@@ -365,26 +365,26 @@ This statement is nothing more than the derivative formula $[cf(x) + dg(x)]' = c
|
||||
* The antiderivative of the polynomial $p(x) = a_n x^n + \cdots a_1 x + a_0$ follows from the linearity of the integral and the general power rule:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
|
||||
\begin{align*}
|
||||
\int (a_n x^n + \cdots a_1 x + a_0) dx
|
||||
&= \int a_nx^n dx + \cdots \int a_1 x dx + \int a_0 dx \\
|
||||
&= a_n \int x^n dx + \cdots + a_1 \int x dx + a_0 \int dx \\
|
||||
&= a_n\frac{x^{n+1}}{n+1} + \cdots + a_1 \frac{x^2}{2} + a_0 \frac{x}{1}.
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
|
||||
* More generally, a [Laurent](https://en.wikipedia.org/wiki/Laurent_polynomial) polynomial allows for terms with negative powers. These too can be handled by the above. For example
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
|
||||
\begin{align*}
|
||||
\int (\frac{2}{x} + 2 + 2x) dx
|
||||
&= \int \frac{2}{x} dx + \int 2 dx + \int 2x dx \\
|
||||
&= 2\int \frac{1}{x} dx + 2 \int dx + 2 \int xdx\\
|
||||
&= 2\log(x) + 2x + 2\frac{x^2}{2}.
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
|
||||
* Consider this integral:
|
||||
|
||||
@@ -433,7 +433,6 @@ The value of $a$ does not matter, as long as the integral is defined.
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
#| cache: true
|
||||
##{{{ftc_graph}}}
|
||||
|
||||
function make_ftc_graph(n)
|
||||
@@ -645,14 +644,14 @@ Under assumptions that the $X$ are identical and independent, the largest value,
|
||||
This problem is constructed to take advantage of the FTC, and we have:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\left[P(M \leq a)\right]'
|
||||
&= \left[F(a)^n\right]'\\
|
||||
&= n \cdot F(a)^{n-1} \left[F(a)\right]'\\
|
||||
&= n F(a)^{n-1}f(a)
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ To define integrals with either functions having singularities or infinite doma
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
#| cache: true
|
||||
### {{{sqrt_graph}}}
|
||||
|
||||
function make_sqrt_x_graph(n)
|
||||
|
||||
@@ -94,7 +94,7 @@ An illustration can clarify.
|
||||
Consider the integral $\int_0^\pi x\sin(x) dx$. If we let $u=x$ and $dv=\sin(x) dx$, then $du = 1dx$ and $v=-\cos(x)$. The above then says:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_0^\pi x\sin(x) dx &= \int_0^\pi u dv\\
|
||||
&= uv\big|_0^\pi - \int_0^\pi v du\\
|
||||
@@ -103,7 +103,7 @@ $$
|
||||
&= \pi + \sin(x)\big|_0^\pi\\
|
||||
&= \pi.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The technique means one part is differentiated and one part integrated. The art is to break the integrand up into a piece that gets easier through differentiation and a piece that doesn't get much harder through integration.
|
||||
|
||||
@@ -128,7 +128,7 @@ $$
|
||||
Putting together gives:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_1^2 x \log(x) dx
|
||||
&= (\log(x) \cdot \frac{x^2}{2}) \big|_1^2 - \int_1^2 \frac{x^2}{2} \frac{1}{x} dx\\
|
||||
@@ -136,7 +136,7 @@ $$
|
||||
&= 2\log(2) - (1 - \frac{1}{4}) \\
|
||||
&= 2\log(2) - \frac{3}{4}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
@@ -144,14 +144,14 @@ $$
|
||||
This related problem, $\int \log(x) dx$, uses the same idea, though perhaps harder to see at first glance, as setting `dv=dx` is almost too simple to try:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
u &= \log(x) & dv &= dx\\
|
||||
du &= \frac{1}{x}dx & v &= x
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
$$
|
||||
|
||||
|
||||
\begin{align*}
|
||||
\int \log(x) dx
|
||||
&= \int u dv\\
|
||||
@@ -160,7 +160,7 @@ $$
|
||||
&= x \log(x) - \int dx\\
|
||||
&= x \log(x) - x
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Were this a definite integral problem, we would have written:
|
||||
|
||||
@@ -243,14 +243,14 @@ $$
|
||||
Positive integer powers of trigonometric functions can be addressed by this technique. Consider $\int \cos(x)^n dx$. We let $u=\cos(x)^{n-1}$ and $dv=\cos(x) dx$. Then $du = (n-1)\cos(x)^{n-2}(-\sin(x))dx$ and $v=\sin(x)$. So,
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int \cos(x)^n dx &= \cos(x)^{n-1} \cdot (\sin(x)) - \int (\sin(x)) ((n-1)\sin(x) \cos(x)^{n-2}) dx \\
|
||||
&= \sin(x) \cos(x)^{n-1} + (n-1)\int \sin^2(x) \cos(x)^{n-1} dx\\
|
||||
&= \sin(x) \cos(x)^{n-1} + (n-1)\int (1 - \cos(x)^2) \cos(x)^{n-2} dx\\
|
||||
&= \sin(x) \cos(x)^{n-1} + (n-1)\int \cos(x)^{n-2}dx - (n-1)\int \cos(x)^n dx.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
We can then solve for the unknown ($\int \cos(x)^{n}dx$) to get this *reduction formula*:
|
||||
|
||||
@@ -278,13 +278,13 @@ The visual interpretation of integration by parts breaks area into two pieces, t
|
||||
Let $uv = x f^{-1}(x)$. Then we have $[uv]' = u'v + uv' = f^{-1}(x) + x [f^{-1}(x)]'$. So, up to a constant $uv = \int [uv]'dx = \int f^{-1}(x) + \int x [f^{-1}(x)]'$. Re-expressing gives:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int f^{-1}(x) dx
|
||||
&= xf^{-1}(x) - \int x [f^{-1}(x)]' dx\\
|
||||
&= xf^{-1}(x) - \int f(u) du.\\
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The last line follows from the $u$-substitution: $u=f^{-1}(x)$ for then $du = [f^{-1}(x)]' dx$ and $x=f(u)$.
|
||||
|
||||
@@ -292,13 +292,13 @@ The last line follows from the $u$-substitution: $u=f^{-1}(x)$ for then $du = [f
|
||||
We use this to find an antiderivative for $\sin^{-1}(x)$:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int \sin^{-1}(x) dx &= x \sin^{-1}(x) - \int \sin(u) du \\
|
||||
&= x \sin^{-1}(x) + \cos(u) \\
|
||||
&= x \sin^{-1}(x) + \cos(\sin^{-1}(x)).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Using right triangles to simplify, the last value $\cos(\sin^{-1}(x))$ can otherwise be written as $\sqrt{1 - x^2}$.
|
||||
|
||||
@@ -321,12 +321,12 @@ This [proof](http://www.math.ucsd.edu/~ebender/20B/77_Trap.pdf) for the error es
|
||||
First, for convenience, we consider the interval $x_i$ to $x_i+h$. The actual answer over this is just $\int_{x_i}^{x_i+h}f(x) dx$. By a $u$-substitution with $u=x-x_i$ this becomes $\int_0^h f(t + x_i) dt$. For analyzing this we integrate once by parts using $u=f(t+x_i)$ and $dv=dt$. But instead of letting $v=t$, we choose to add - as is our prerogative - a constant of integration $A$, so $v=t+A$:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_0^h f(t + x_i) dt &= uv \big|_0^h - \int_0^h v du\\
|
||||
&= f(t+x_i)(t+A)\big|_0^h - \int_0^h (t + A) f'(t + x_i) dt.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
We choose $A$ to be $-h/2$, any constant is possible, for then the term $f(t+x_i)(t+A)\big|_0^h$ becomes $(1/2)(f(x_i+h) + f(x_i)) \cdot h$, or the trapezoid approximation. This means, the error over this interval - actual minus estimate - satisfies:
|
||||
|
||||
@@ -338,12 +338,12 @@ $$
|
||||
For this, we *again* integrate by parts with
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
u &= f'(t + x_i) & dv &= (t + A)dt\\
|
||||
du &= f''(t + x_i) & v &= \frac{(t + A)^2}{2} + B
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Again we added a constant of integration, $B$, to $v$. The error becomes:
|
||||
|
||||
@@ -417,14 +417,14 @@ We added a rectangle for a Riemann sum for $t_i = \pi/3$ and $t_{i+1} = \pi/3 +
|
||||
Taking this Riemann sum approach, we can approximate the area under the curve parameterized by $(u(t), v(t))$ over the time range $[t_i, t_{i+1}]$ as a rectangle with height $y(t_i)$ and base $x(t_{i}) - x(t_{i+1})$. Then we get, as expected:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
A &\approx \sum_i y(t_i) \cdot (x(t_{i}) - x(t_{i+1}))\\
|
||||
&= - \sum_i y(t_i) \cdot (x(t_{i+1}) - x(t_{i}))\\
|
||||
&= - \sum_i y(t_i) \cdot \frac{x(t_{i+1}) - x(t_i)}{t_{i+1}-t_i} \cdot (t_{i+1}-t_i)\\
|
||||
&\approx -\int_a^b y(t) x'(t) dt.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
So with a counterclockwise rotation, the actual answer for the area includes a minus sign. If the area is traced out in a *clockwise* manner, there is no minus sign.
|
||||
|
||||
|
||||
@@ -88,14 +88,14 @@ Though not continuous, $f(x)$ is integrable as it contains only jumps. The integ
|
||||
What is the average value of the function $e^{-x}$ between $0$ and $\log(2)$?
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\text{average} = \frac{1}{\log(2) - 0} \int_0^{\log(2)} e^{-x} dx\\
|
||||
&= \frac{1}{\log(2)} (-e^{-x}) \big|_0^{\log(2)}\\
|
||||
&= -\frac{1}{\log(2)} (\frac{1}{2} - 1)\\
|
||||
&= \frac{1}{2\log(2)}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Visualizing, we have
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ What remains is to establish that we can take $A(x) = a(x)\cdot P(x)$ with a deg
|
||||
In Proposition 3.8 of [Bradley](http://www.m-hikari.com/imf/imf-2012/29-32-2012/cookIMF29-32-2012.pdf) and Cook we can see how. Recall the division algorithm, for example, says there are $q_k$ and $r_k$ with $A=q\cdot q_k + r_k$ where the degree of $r_k$ is less than that of $q$, which is linear or quadratic. This is repeatedly applied below:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\frac{A}{q^k} &= \frac{q\cdot q_k + r_k}{q^k}\\
|
||||
&= \frac{r_k}{q^k} + \frac{q_k}{q^{k-1}}\\
|
||||
@@ -119,7 +119,7 @@ $$
|
||||
&= \cdots\\
|
||||
&= \frac{r_k}{q^k} + \frac{r_{k-1}}{q^{k-1}} + \cdots + q_1.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
So the term $A(x)/q(x)^k$ can be expressed in terms of a sum where the numerators or each term have degree less than $q(x)$, as expected by the statement of the theorem.
|
||||
|
||||
@@ -208,14 +208,14 @@ integrate(B/((a*x)^2 - 1)^4, x)
|
||||
In [Bronstein](http://www-sop.inria.fr/cafe/Manuel.Bronstein/publications/issac98.pdf) this characterization can be found - "This method, which dates back to Newton, Leibniz and Bernoulli, should not be used in practice, yet it remains the method found in most calculus texts and is often taught. Its major drawback is the factorization of the denominator of the integrand over the real or complex numbers." We can also find the following formulas which formalize the above exploratory calculations ($j>1$ and $b^2 - 4c < 0$ below):
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int \frac{A}{(x-a)^j} &= \frac{A}{1-j}\frac{1}{(x-a)^{1-j}}\\
|
||||
\int \frac{A}{x-a} &= A\log(x-a)\\
|
||||
\int \frac{Bx+C}{x^2 + bx + c} &= \frac{B}{2} \log(x^2 + bx + c) + \frac{2C-bB}{\sqrt{4c-b^2}}\cdot \arctan\left(\frac{2x+b}{\sqrt{4c-b^2}}\right)\\
|
||||
\int \frac{Bx+C}{(x^2 + bx + c)^j} &= \frac{B' x + C'}{(x^2 + bx + c)^{j-1}} + \int \frac{C''}{(x^2 + bx + c)^{j-1}}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The first returns a rational function; the second yields a logarithm term; the third yields a logarithm and an arctangent term; while the last, which has explicit constants available, provides a reduction that can be recursively applied;
|
||||
|
||||
@@ -482,12 +482,12 @@ How to see that these give rise to real answers on integration is the point of t
|
||||
Breaking the terms up over $a$ and $b$ we have:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
I &= \frac{a}{x - (\alpha + i \beta)} + \frac{a}{x - (\alpha - i \beta)} \\
|
||||
II &= i\frac{b}{x - (\alpha + i \beta)} - i\frac{b}{x - (\alpha - i \beta)}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Integrating $I$ leads to two logarithmic terms, which are combined to give:
|
||||
|
||||
|
||||
@@ -40,14 +40,14 @@ $$
|
||||
So,
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_a^b g(u(t)) \cdot u'(t) dt &= \int_a^b (G \circ u)'(t) dt\\
|
||||
&= (G\circ u)(b) - (G\circ u)(a) \quad\text{(the FTC, part II)}\\
|
||||
&= G(u(b)) - G(u(a)) \\
|
||||
&= \int_{u(a)}^{u(b)} g(x) dx. \quad\text{(the FTC part II)}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
That is, this substitution formula applies:
|
||||
|
||||
@@ -173,21 +173,22 @@ $$
|
||||
So the answer is: the area under the transformed function over $a$ to $b$ is the area of the function over the transformed region.
|
||||
|
||||
|
||||
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?
|
||||
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$
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
|
||||
\begin{align*}
|
||||
\int_{c-h}^{c+h} g(x) dx
|
||||
&= \int_{c-h}^{c+h} h f(u(x)) dx\\
|
||||
&= \int_{u(c-h)}^{u(c+h)} f(u) du\\
|
||||
&= \int_{-1}^1 f(u) du\\
|
||||
&= 1.
|
||||
\end{align}
|
||||
$$
|
||||
\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$.
|
||||
|
||||
@@ -246,14 +247,14 @@ $$
|
||||
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:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\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}\\
|
||||
&= \frac{23}{12}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
@@ -268,14 +269,14 @@ $$
|
||||
Integrals involving this function are typically transformed by substitution. For example:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_a^b f(x; \mu, \sigma) dx
|
||||
&= \int_a^b \frac{1}{\sqrt{2\pi}}\frac{1}{\sigma} \exp(-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2) dx \\
|
||||
&= \int_{u(a)}^{u(b)} \frac{1}{\sqrt{2\pi}} \exp(-\frac{1}{2}u^2) du \\
|
||||
&= \int_{u(a)}^{u(b)} f(u; 0, 1) du,
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
where $u = (x-\mu)/\sigma$, so $du = (1/\sigma) dx$.
|
||||
|
||||
@@ -293,13 +294,13 @@ $$
|
||||
A further change of variables by $t = u/\sqrt{2}$ (with $\sqrt{2}dt = du$) gives:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_a^b f(x; \mu, \sigma) dx &=
|
||||
\int_{t(u(a))}^{t(u(b))} \frac{\sqrt{2}}{\sqrt{2\pi}} \exp(-t^2) dt\\
|
||||
&= \frac{1}{2} \int_{t(u(a))}^{t(u(b))} \frac{2}{\sqrt{\pi}} \exp(-t^2) dt
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Up to a factor of $1/2$ this is `erf`.
|
||||
|
||||
@@ -307,14 +308,14 @@ Up to a factor of $1/2$ this is `erf`.
|
||||
So we would have, for example, with $\mu=1$,$\sigma=2$ and $a=1$ and $b=3$ that:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
t(u(a)) &= (1 - 1)/2/\sqrt{2} = 0\\
|
||||
t(u(b)) &= (3 - 1)/2/\sqrt{2} = \frac{1}{\sqrt{2}}\\
|
||||
\int_1^3 f(x; 1, 2)
|
||||
&= \frac{1}{2} \int_0^{1/\sqrt{2}} \frac{2}{\sqrt{\pi}} \exp(-t^2) dt.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Or
|
||||
|
||||
@@ -486,7 +487,7 @@ integrate(1 / (a^2 + (b*x)^2), x)
|
||||
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:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int \frac{1}{\sqrt{9 - x^2}} dx &= \int \frac{1}{\sqrt{9 - (3\sin(u))^2}} \cdot 3\cos(u) du\\
|
||||
&=\int \frac{1}{3\sqrt{1 - \sin(u)^2}}\cdot3\cos(u) du \\
|
||||
@@ -494,7 +495,7 @@ $$
|
||||
&= u \\
|
||||
&= \sin^{-1}(x/3).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Further substitution allows the following integral to be solved for an antiderivative:
|
||||
|
||||
@@ -511,24 +512,24 @@ integrate(1 / sqrt(a^2 - b^2*x^2), x)
|
||||
The expression $x^2 - 1$ is a bit different, this lends itself to $\sec(u) = x$ for a substitution, for $\sec(u)^2 - 1 = \tan(u)^2$. For example, we try $\sec(u) = x$ to integrate:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int \frac{1}{\sqrt{x^2 - 1}} dx &= \int \frac{1}{\sqrt{\sec(u)^2 - 1}} \cdot \sec(u)\tan(u) du\\
|
||||
&=\int \frac{1}{\tan(u)}\sec(u)\tan(u) du\\
|
||||
&= \int \sec(u) du.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
This doesn't seem that helpful, but the antiderivative to $\sec(u)$ is $\log\lvert (\sec(u) + \tan(u))\rvert$, so we can proceed to get:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int \frac{1}{\sqrt{x^2 - 1}} dx &= \int \sec(u) du\\
|
||||
&= \log\lvert (\sec(u) + \tan(u))\rvert\\
|
||||
&= \log\lvert x + \sqrt{x^2-1} \rvert.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
SymPy gives a different representation using the arccosine:
|
||||
|
||||
@@ -564,14 +565,14 @@ $$
|
||||
The identify $\cos(u)^2 = (1 + \cos(2u))/2$ makes this tractable:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\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 (\pi/4 + 0) = \pi ab.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Keeping in mind that that a circle with radius $a$ is an ellipse with $b=a$, we see that this gives the correct answer for a circle.
|
||||
|
||||
|
||||
@@ -34,9 +34,19 @@ revolution, there is an easier way. (Photo credit to
|
||||
[firepanjewellery](http://firepanjewellery.com/).)
|
||||
"""
|
||||
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||
.)
|
||||
](./figures/gehry-hendrix.jpg)
|
||||
|
||||
> The surface area generated by rotating the graph of $f(x)$ between $a$ and $b$ about the $x$-axis is given by the integral
|
||||
>
|
||||
> $$
|
||||
@@ -110,7 +120,6 @@ If we assume integrability of the integrand, then as our partition size goes to
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
#| cache: true
|
||||
## {{{approximate_surface_area}}}
|
||||
|
||||
xs,ys = range(-1, stop=1, length=50), range(-1, stop=1, length=50)
|
||||
@@ -154,7 +163,7 @@ Lets see that the surface area of an open cone follows from this formula, even t
|
||||
A cone be be envisioned as rotating the function $f(x) = x\tan(\theta)$ between $0$ and $h$ around the $x$ axis. This integral yields the surface area:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_0^h 2\pi f(x) \sqrt{1 + f'(x)^2}dx
|
||||
&= \int_0^h 2\pi x \tan(\theta) \sqrt{1 + \tan(\theta)^2}dx \\
|
||||
@@ -162,7 +171,7 @@ $$
|
||||
&= \pi \tan(\theta) \sec(\theta) h^2 \\
|
||||
&= \pi r^2 / \sin(\theta).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
(There are many ways to express this, we used $r$ and $\theta$ to match the work above. If the cone is parameterized by a height $h$ and radius $r$, then the surface area of the sides is $\pi r\sqrt{h^2 + r^2}$. If the base is included, there is an additional $\pi r^2$ term.)
|
||||
|
||||
@@ -350,14 +359,14 @@ plot(g, f, 0, 1pi)
|
||||
The integrand simplifies to $8\sqrt{2}\pi \sin(t) (1 + \cos(t))^{3/2}$. This lends itself to $u$-substitution with $u=\cos(t)$.
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\int_0^\pi 8\sqrt{2}\pi \sin(t) (1 + \cos(t))^{3/2}
|
||||
&= 8\sqrt{2}\pi \int_1^{-1} (1 + u)^{3/2} (-1) du\\
|
||||
&= 8\sqrt{2}\pi (2/5) (1+u)^{5/2} \big|_{-1}^1\\
|
||||
&= 8\sqrt{2}\pi (2/5) 2^{5/2} = \frac{2^7 \pi}{5}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
## The first Theorem of Pappus
|
||||
|
||||
@@ -406,12 +415,12 @@ surface(ws..., legend=false, zlims=(-12,12))
|
||||
The surface area of sphere will be SA$=2\pi \rho (\pi r) = 2 \pi^2 r \cdot \rho$. What is $\rho$? The centroid of an arc formula can be derived in a manner similar to that of the centroid of a region. The formulas are:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
|
||||
\begin{align*}
|
||||
\text{cm}_x &= \frac{1}{L} \int_a^b g(t) \sqrt{g'(t)^2 + f'(t)^2} dt\\
|
||||
\text{cm}_y &= \frac{1}{L} \int_a^b f(t) \sqrt{g'(t)^2 + f'(t)^2} dt.
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
|
||||
Here, $L$ is the arc length of the curve.
|
||||
|
||||
|
||||
@@ -34,9 +34,12 @@ caption = """
|
||||
Hey Michelin Man, how much does that costume weigh?
|
||||
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
An ad for a summer job says work as the Michelin Man! Sounds promising, but how much will that costume weigh? A very hot summer may make walking around in a heavy costume quite uncomfortable.
|
||||
|
||||
|
||||
@@ -96,9 +99,15 @@ curve about the $x$ axis. The radius of revolution varies as a function of $x$
|
||||
between about $0$ and $6.2$cm.
|
||||
|
||||
"""
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
#ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
If $r(x)$ is the radius as a function of $x$, then the cross sectional area is $\pi r(x)^2$ so the volume is given by:
|
||||
|
||||
|
||||
@@ -166,9 +175,12 @@ Before Solo "squared" the cup, the Solo cup had markings that - [some thought](h
|
||||
#| echo: false
|
||||
imgfile = "figures/red-solo-cup.jpg"
|
||||
caption = "Markings on the red Solo cup indicated various volumes"
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
What is the height for $5$ ounces (for a glass of wine)? $12$ ounces (for a beer unit)?
|
||||
|
||||
|
||||
@@ -515,9 +527,12 @@ Consider this big Solo cup:
|
||||
#| echo: false
|
||||
imgfile ="figures/big-solo-cup.jpg"
|
||||
caption = " Big solo cup. "
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
# ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
It has approximate dimensions: smaller radius 5 feet, upper radius 8 feet and height 15 feet. How many gallons is it? At $8$ pounds a gallon this would be pretty heavy!
|
||||
|
||||
|
||||
@@ -552,9 +567,12 @@ This figure shows some of the wide variety of beer-serving glasses:
|
||||
#| echo: false
|
||||
imgfile ="figures/beer_glasses.jpg"
|
||||
caption = "A variety of different serving glasses for beer."
|
||||
ImageFile(:integrals, imgfile, caption)
|
||||
#ImageFile(:integrals, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
We work with metric units, as there is a natural relation between volume in cm$^3$ and liquid measure ($1$ liter = $1000$ cm$^3$, so a $16$-oz pint glass is roughly $450$ cm$^3$.)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user