make pdf file generation work
This commit is contained in:
@@ -513,14 +513,14 @@ This holds two rules: the derivative of a constant times a function is the const
|
||||
This example shows a useful template:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
[2x^2 - \frac{x}{3} + 3e^x]' & = 2[\square]' - \frac{[\square]]}{3} + 3[\square]'\\
|
||||
&= 2[x^2]' - \frac{[x]'}{3} + 3[e^x]'\\
|
||||
&= 2(2x) - \frac{1}{3} + 3e^x\\
|
||||
&= 4x - \frac{1}{3} + 3e^x
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
### Product rule
|
||||
|
||||
@@ -541,13 +541,13 @@ The output uses the Leibniz notation to represent that the derivative of $u(x) \
|
||||
This example shows a useful template for the product rule:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
[(x^2+1)\cdot e^x]' &= [\square]' \cdot (\square) + (\square) \cdot [\square]'\\
|
||||
&= [x^2 + 1]' \cdot (e^x) + (x^2+1) \cdot [e^x]'\\
|
||||
&= (2x)\cdot e^x + (x^2+1)\cdot e^x
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
### Quotient rule
|
||||
|
||||
@@ -565,13 +565,13 @@ limit((f(x+h) - f(x))/h, h => 0)
|
||||
This example shows a useful template for the quotient rule:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
[\frac{x^2+1}{e^x}]' &= \frac{[\square]' \cdot (\square) - (\square) \cdot [\square]'}{(\square)^2}\\
|
||||
&= \frac{[x^2 + 1]' \cdot (e^x) - (x^2+1) \cdot [e^x]'}{(e^x)^2}\\
|
||||
&= \frac{(2x)\cdot e^x - (x^2+1)\cdot e^x}{e^{2x}}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
##### Examples
|
||||
|
||||
@@ -731,17 +731,17 @@ Combined, we would end up with:
|
||||
To see that this works in our specific case, we assume the general power rule that $[x^n]' = n x^{n-1}$ to get:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(x) &= x^2 & g(x) &= \sqrt{x}\\
|
||||
f'(\square) &= 2(\square) & g'(x) &= \frac{1}{2}x^{-1/2}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
We use $\square$ for the argument of `f'` to emphasize that $g(x)$ is the needed value, not just $x$:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
[(\sqrt{x})^2]' &= [f(g(x)]'\\
|
||||
&= f'(g(x)) \cdot g'(x) \\
|
||||
@@ -749,7 +749,7 @@ $$
|
||||
&= \frac{2\sqrt{x}}{2\sqrt{x}}\\
|
||||
&=1
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
This is the same as the derivative of $x$ found by first evaluating the composition. For this problem, the chain rule is not necessary, but typically it is a needed rule to fully differentiate a function.
|
||||
|
||||
@@ -760,12 +760,12 @@ This is the same as the derivative of $x$ found by first evaluating the composit
|
||||
Find the derivative of $f(x) = \sqrt{1 - x^2}$. We identify the composition of $\sqrt{x}$ and $(1-x^2)$. We set the functions and their derivatives into a pattern to emphasize the pieces in the chain-rule formula:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(x) &=\sqrt{x} = x^{1/2} & g(x) &= 1 - x^2 \\
|
||||
f'(\square) &=(1/2)(\square)^{-1/2} & g'(x) &= -2x
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Then:
|
||||
|
||||
@@ -824,15 +824,12 @@ $$
|
||||
|
||||
Where $h' = (g'(a) + \epsilon_g(h))h \rightarrow 0$ as $h \rightarrow 0$ will be used to simplify the following:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\begin{align*}
|
||||
f(g(a+h)) - f(g(a)) &=
|
||||
f(g(a) + g'(a)h + \epsilon_g(h)h) - f(g(a)) \\
|
||||
&= f(g(a)) + f'(g(a)) (g'(a)h + \epsilon_g(h)h) + \epsilon_f(h')(h') - f(g(a))\\
|
||||
&= f'(g(a)) g'(a)h + f'(g(a))(\epsilon_g(h)h) + \epsilon_f(h')(h').
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
Rearranging:
|
||||
|
||||
@@ -852,17 +849,17 @@ where $\epsilon(h)$ combines the above terms which go to zero as $h\rightarrow 0
|
||||
The chain rule name could also be simply the "composition rule," as that is the operation the rule works for. However, in practice, there are usually *multiple* compositions, and the "chain" rule is used to chain together the different pieces. To get a sense, consider a triple composition $u(v(w(x())))$. This will have derivative:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
[u(v(w(x)))]' &= u'(v(w(x))) \cdot [v(w(x))]' \\
|
||||
&= u'(v(w(x))) \cdot v'(w(x)) \cdot w'(x)
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The answer can be viewed as a repeated peeling off of the outer function, a view with immediate application to many compositions. To see that in action with an expression, consider this derivative problem, shown in steps:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
[\sin(e^{\cos(x^2-x)})]'
|
||||
&= \cos(e^{\cos(x^2-x)}) \cdot [e^{\cos(x^2-x)}]'\\
|
||||
@@ -870,7 +867,7 @@ $$
|
||||
&= \cos(e^{\cos(x^2-x)}) \cdot e^{\cos(x^2-x)} \cdot (-\sin(x^2-x)) \cdot [x^2-x]'\\
|
||||
&= \cos(e^{\cos(x^2-x)}) \cdot e^{\cos(x^2-x)} \cdot (-\sin(x^2-x)) \cdot (2x-1)\\
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
##### More examples of differentiation
|
||||
|
||||
@@ -986,16 +983,13 @@ Find the derivative of $f(x) = x \cdot e^{-x^2}$.
|
||||
|
||||
Using the product rule and then the chain rule, we have:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\begin{align*}
|
||||
f'(x) &= [x \cdot e^{-x^2}]'\\
|
||||
&= [x]' \cdot e^{-x^2} + x \cdot [e^{-x^2}]'\\
|
||||
&= 1 \cdot e^{-x^2} + x \cdot (e^{-x^2}) \cdot [-x^2]'\\
|
||||
&= e^{-x^2} + x \cdot e^{-x^2} \cdot (-2x)\\
|
||||
&= e^{-x^2} (1 - 2x^2).
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
---
|
||||
|
||||
@@ -1006,15 +1000,15 @@ Find the derivative of $f(x) = e^{-ax} \cdot \sin(x)$.
|
||||
Using the product rule and then the chain rule, we have:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
|
||||
\begin{align*}
|
||||
f'(x) &= [e^{-ax} \cdot \sin(x)]'\\
|
||||
&= [e^{-ax}]' \cdot \sin(x) + e^{-ax} \cdot [\sin(x)]'\\
|
||||
&= e^{-ax} \cdot [-ax]' \cdot \sin(x) + e^{-ax} \cdot \cos(x)\\
|
||||
&= e^{-ax} \cdot (-a) \cdot \sin(x) + e^{-ax} \cos(x)\\
|
||||
&= e^{-ax}(\cos(x) - a\sin(x)).
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
|
||||
---
|
||||
|
||||
@@ -1149,15 +1143,12 @@ Find the first $3$ derivatives of $f(x) = ax^3 + bx^2 + cx + d$.
|
||||
|
||||
Differentiating a polynomial is done with the sum rule, here we repeat three times:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\begin{align*}
|
||||
f(x) &= ax^3 + bx^2 + cx + d\\
|
||||
f'(x) &= 3ax^2 + 2bx + c \\
|
||||
f''(x) &= 3\cdot 2 a x + 2b \\
|
||||
f'''(x) &= 6a
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
We can see, the fourth derivative – and all higher order ones – would be identically $0$. This is part of a general phenomenon: an $n$th degree polynomial has only $n$ non-zero derivatives.
|
||||
|
||||
@@ -1168,16 +1159,16 @@ We can see, the fourth derivative – and all higher order ones – would be ide
|
||||
Find the first $5$ derivatives of $\sin(x)$.
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
|
||||
\begin{align*}
|
||||
f(x) &= \sin(x) \\
|
||||
f'(x) &= \cos(x) \\
|
||||
f''(x) &= -\sin(x) \\
|
||||
f'''(x) &= -\cos(x) \\
|
||||
f^{(4)} &= \sin(x) \\
|
||||
f^{(5)} &= \cos(x)
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
|
||||
We see the derivatives repeat themselves. (We also see alternative notation for higher order derivatives.)
|
||||
|
||||
@@ -1603,7 +1594,7 @@ The right graph is of $g(x) = \exp(x)$ at $x=1$, the left graph of $f(x) = \sin(
|
||||
Assuming the approximation gets better for $h$ close to $0$, as it visually does, the derivative at $1$ for $f(g(x))$ should be given by this limit:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\frac{d(f\circ g)}{dx}\mid_{x=1}
|
||||
&= \lim_{h\rightarrow 0} \frac{f(g(1) + g'(1)h)-f(g(1))}{h}\\
|
||||
@@ -1611,7 +1602,7 @@ $$
|
||||
&= \lim_{h\rightarrow 0} \frac{f(g(1) + g'(1)h)-f(g(1))}{g'(1)h} \cdot g'(1)\\
|
||||
&= \lim_{h\rightarrow 0} (f\circ g)'(1) \cdot g'(1).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
What limit law, described below assuming all limits exist. allows the last equals sign?
|
||||
|
||||
|
||||
BIN
quarto/derivatives/figures/fcarc-may2016-fig35-350.png
Normal file
BIN
quarto/derivatives/figures/fcarc-may2016-fig35-350.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
BIN
quarto/derivatives/figures/fcarc-may2016-fig40-300.png
Normal file
BIN
quarto/derivatives/figures/fcarc-may2016-fig40-300.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
BIN
quarto/derivatives/figures/fcarc-may2016-fig43-250.png
Normal file
BIN
quarto/derivatives/figures/fcarc-may2016-fig43-250.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
@@ -1016,7 +1016,7 @@ This accurately summarizes how the term is used outside of math books. Does it a
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true, echo
|
||||
#| echo: false
|
||||
choices = ["Yes. Same words, same meaning",
|
||||
"""No, but it is close. An inflection point is when the *acceleration* changes from positive to negative, so if "results" are about how a company's rate of change is changing, then it is in the ballpark."""]
|
||||
radioq(choices, 2)
|
||||
|
||||
@@ -902,9 +902,12 @@ imgfile = "figures/fcarc-may2016-fig35-350.gif"
|
||||
caption = """
|
||||
Image number 35 from L'Hospitals calculus book (the first). Given a description of the curve, identify the point ``E`` which maximizes the height.
|
||||
"""
|
||||
ImageFile(:derivatives, imgfile, caption)
|
||||
#ImageFile(:derivatives, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
The figure above shows a problem appearing in L'Hospital's first calculus book. Given a function defined implicitly by $x^3 + y^3 = axy$ (with $AP=x$, $AM=y$ and $AB=a$) find the point $E$ that maximizes the height. In the [AMS feature column](http://www.ams.org/samplings/feature-column/fc-2016-05) this problem is illustrated and solved in the historical manner, with the comment that the concept of implicit differentiation wouldn't have occurred to L'Hospital.
|
||||
|
||||
|
||||
|
||||
@@ -307,24 +307,24 @@ L'Hospital's rule generalizes to other indeterminate forms, in particular the in
|
||||
The value $c$ in the limit can also be infinite. Consider this case with $c=\infty$:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\lim_{x \rightarrow \infty} \frac{f(x)}{g(x)} &=
|
||||
\lim_{x \rightarrow 0} \frac{f(1/x)}{g(1/x)}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
L'Hospital's limit applies as $x \rightarrow 0$, so we differentiate to get:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\lim_{x \rightarrow 0} \frac{[f(1/x)]'}{[g(1/x)]'}
|
||||
&= \lim_{x \rightarrow 0} \frac{f'(1/x)\cdot(-1/x^2)}{g'(1/x)\cdot(-1/x^2)}\\
|
||||
&= \lim_{x \rightarrow 0} \frac{f'(1/x)}{g'(1/x)}\\
|
||||
&= \lim_{x \rightarrow \infty} \frac{f'(x)}{g'(x)},
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
*assuming* the latter limit exists, L'Hospital's rule assures the equality
|
||||
|
||||
@@ -414,12 +414,12 @@ Be just saw that $\lim_{x \rightarrow 0+}\log(x)/(1/x) = 0$. So by the rules for
|
||||
A limit $\lim_{x \rightarrow c} f(x) - g(x)$ of indeterminate form $\infty - \infty$ can be reexpressed to be of the from $0/0$ through the transformation:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(x) - g(x) &= f(x)g(x) \cdot (\frac{1}{g(x)} - \frac{1}{f(x)}) \\
|
||||
&= \frac{\frac{1}{g(x)} - \frac{1}{f(x)}}{\frac{1}{f(x)g(x)}}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Applying this to
|
||||
|
||||
|
||||
@@ -505,22 +505,22 @@ $$
|
||||
Suppose $f(x)$ and $g(x)$ are represented by their tangent lines about $c$, respectively:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(x) &= f(c) + f'(c)(x-c) + \mathcal{O}((x-c)^2), \\
|
||||
g(x) &= g(c) + g'(c)(x-c) + \mathcal{O}((x-c)^2).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Consider the sum, after rearranging we have:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(x) + g(x) &= \left(f(c) + f'(c)(x-c) + \mathcal{O}((x-c)^2)\right) + \left(g(c) + g'(c)(x-c) + \mathcal{O}((x-c)^2)\right)\\
|
||||
&= \left(f(c) + g(c)\right) + \left(f'(c)+g'(c)\right)(x-c) + \mathcal{O}((x-c)^2).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The two big "Oh" terms become just one as the sum of a constant times $(x-c)^2$ plus a constant time $(x-c)^2$ is just some other constant times $(x-c)^2$. What we can read off from this is the term multiplying $(x-c)$ is just the derivative of $f(x) + g(x)$ (from the sum rule), so this too is a tangent line approximation.
|
||||
|
||||
@@ -528,7 +528,7 @@ The two big "Oh" terms become just one as the sum of a constant times $(x-c)^2$
|
||||
Is it a coincidence that a basic algebraic operation with tangent lines approximations produces a tangent line approximation? Let's try multiplication:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(x) \cdot g(x) &= [f(c) + f'(c)(x-c) + \mathcal{O}((x-c)^2)] \cdot [g(c) + g'(c)(x-c) + \mathcal{O}((x-c)^2)]\\
|
||||
&=[(f(c) + f'(c)(x-c)] \cdot [g(c) + g'(c)(x-c)] + (f(c) + f'(c)(x-c) \cdot \mathcal{O}((x-c)^2)) + g(c) + g'(c)(x-c) \cdot \mathcal{O}((x-c)^2)) + [\mathcal{O}((x-c)^2))]^2\\
|
||||
@@ -536,7 +536,7 @@ f(x) \cdot g(x) &= [f(c) + f'(c)(x-c) + \mathcal{O}((x-c)^2)] \cdot [g(c) + g'(
|
||||
&= f(c) \cdot g(c) + [f'(c)\cdot g(c) + f(c)\cdot g'(c)] \cdot (x-c) + [f'(c)\cdot g'(c) \cdot (x-c)^2 + \mathcal{O}((x-c)^2)] \\
|
||||
&= f(c) \cdot g(c) + [f'(c)\cdot g(c) + f(c)\cdot g'(c)] \cdot (x-c) + \mathcal{O}((x-c)^2)
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The big "oh" notation just sweeps up many things including any products of it *and* the term $f'(c)\cdot g'(c) \cdot (x-c)^2$. Again, we see from the product rule that this is just a tangent line approximation for $f(x) \cdot g(x)$.
|
||||
|
||||
@@ -612,7 +612,7 @@ Automatic differentiation (forward mode) essentially uses this technique. A "dua
|
||||
Dual(0, 1)
|
||||
```
|
||||
|
||||
Then what is $\(x)$? It should reflect both $(\sin(0), \cos(0))$ the latter being the derivative of $\sin$. We can see this is *almost* what is computed behind the scenes through:
|
||||
Then what is $x$? It should reflect both $(\sin(0), \cos(0))$ the latter being the derivative of $\sin$. We can see this is *almost* what is computed behind the scenes through:
|
||||
|
||||
|
||||
```{julia}
|
||||
@@ -798,14 +798,14 @@ numericq(abs(answ))
|
||||
The [Birthday problem](https://en.wikipedia.org/wiki/Birthday_problem) computes the probability that in a group of $n$ people, under some assumptions, that no two share a birthday. Without trying to spoil the problem, we focus on the calculus specific part of the problem below:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
p
|
||||
&= \frac{365 \cdot 364 \cdot \cdots (365-n+1)}{365^n} \\
|
||||
&= \frac{365(1 - 0/365) \cdot 365(1 - 1/365) \cdot 365(1-2/365) \cdot \cdots \cdot 365(1-(n-1)/365)}{365^n}\\
|
||||
&= (1 - \frac{0}{365})\cdot(1 -\frac{1}{365})\cdot \cdots \cdot (1-\frac{n-1}{365}).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Taking logarithms, we have $\log(p)$ is
|
||||
|
||||
|
||||
@@ -161,9 +161,15 @@ at a relative minimum, the tangent line is parallel to the
|
||||
$x$-axis. This of course is true when the tangent line is well defined
|
||||
by Fermat's observation.
|
||||
"""
|
||||
ImageFile(:derivatives, imgfile, caption)
|
||||
# ImageFile(:derivatives, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Numeric derivatives
|
||||
|
||||
|
||||
@@ -247,10 +253,10 @@ Here the maximum occurs at an endpoint. The critical point $c=0.67\dots$ does no
|
||||
:::{.callout-note}
|
||||
## Note
|
||||
|
||||
:::
|
||||
|
||||
**Absolute minimum** We haven't discussed the parallel problem of absolute minima over a closed interval. By considering the function $h(x) = - f(x)$, we see that the any thing true for an absolute maximum should hold in a related manner for an absolute minimum, in particular an absolute minimum on a closed interval will only occur at a critical point or an end point.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
## Rolle's theorem
|
||||
|
||||
|
||||
@@ -127,13 +127,13 @@ Though the derivative is related to the slope of the secant line, that is in the
|
||||
Let $\epsilon_{n+1} = x_{n+1}-\alpha$, where $\alpha$ is assumed to be the *simple* zero of $f(x)$ that the secant method converges to. A [calculation](https://math.okstate.edu/people/binegar/4513-F98/4513-l08.pdf) shows that
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\epsilon_{n+1} &\approx \frac{x_n-x_{n-1}}{f(x_n)-f(x_{n-1})} \frac{(1/2)f''(\alpha)(e_n-e_{n-1})}{x_n-x_{n-1}} \epsilon_n \epsilon_{n-1}\\
|
||||
& \approx \frac{f''(\alpha)}{2f'(\alpha)} \epsilon_n \epsilon_{n-1}\\
|
||||
&= C \epsilon_n \epsilon_{n-1}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The constant `C` is similar to that for Newton's method, and reveals potential troubles for the secant method similar to those of Newton's method: a poor initial guess (the initial error is too big), the second derivative is too large, the first derivative too flat near the answer.
|
||||
|
||||
|
||||
@@ -684,7 +684,7 @@ $$
|
||||
For this value, we have
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
x_{i+1} - \alpha
|
||||
&= \left(x_i - \frac{f(x_i)}{f'(x_i)}\right) - \alpha\\
|
||||
@@ -694,7 +694,7 @@ x_{i+1} - \alpha
|
||||
\right)\\
|
||||
&= \frac{1}{2}\frac{f''(\xi)}{f'(x_i)} \cdot(x_i - \alpha)^2.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
That is
|
||||
|
||||
|
||||
@@ -534,9 +534,20 @@ http://www.ams.org/samplings/feature-column/fc-2016-05.)
|
||||
|
||||
|
||||
"""
|
||||
ImageFile(:derivatives, imgfile, caption)
|
||||
#ImageFile(:derivatives, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
The last example is a modern day illustration of a problem of calculus dating back to l'Hospital. His parameterization is a bit different. Let's change his by taking two points $(0, a)$ and $(L,-b)$, with $a,b,L$ positive values. Above the $x$ axis travel happens at rate $r_0$, and below, travel happens at rate $r_1$, again, both positive. What value $x$ in $[0,L]$ will minimize the total travel time?
|
||||
|
||||
|
||||
@@ -1227,9 +1238,13 @@ caption = L"""
|
||||
Image number $40$ from l'Hospital's calculus book (the first calculus book). Among all the cones that can be inscribed in a sphere, determine which one has the largest lateral area. (From http://www.ams.org/samplings/feature-column/fc-2016-05)
|
||||
|
||||
"""
|
||||
ImageFile(:derivatives, imgfile, caption)
|
||||
#ImageFile(:derivatives, imgfile, caption)
|
||||
nothing
|
||||
```
|
||||
|
||||
).](./figures/fcarc-may2016-fig40-300.png)
|
||||
|
||||
|
||||
The figure above poses a problem about cones in spheres, which can be reduced to a two-dimensional problem. Take a sphere of radius $r=1$, and imagine a secant line of length $l$ connecting $(-r, 0)$ to another point $(x,y)$ with $y>0$. Rotating that line around the $x$ axis produces a cone and its lateral surface is given by $SA=\pi \cdot y \cdot l$. Write $SA$ as a function of $x$ and solve.
|
||||
|
||||
|
||||
@@ -1345,12 +1360,12 @@ solve(x/b ~ (x+a)/(b + b*p), x)
|
||||
With $x = a/p$ we get by Pythagorean's theorem that
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
c^2 &= (a + a/p)^2 + (b + bp)^2 \\
|
||||
&= a^2(1 + \frac{1}{p})^2 + b^2(1+p)^2.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The ladder problem minimizes $c$ or equivalently $c^2$.
|
||||
|
||||
|
||||
@@ -247,549 +247,7 @@ Often, this problem is presented with $db/dt$ having a constant rate. In this ca
|
||||
caption = "A man and woman walk towards the light."
|
||||
|
||||
imgfile = "figures/long-shadow-noir.png"
|
||||
ImageFile(:derivatives, imgfile, caption)
|
||||
```
|
||||
|
||||
Shadows are a staple of film noir. In the photo, suppose a man and a woman walk towards a street light. As they approach the light the length of their shadow changes.
|
||||
|
||||
|
||||
Suppose, we focus on the $5$ foot tall woman. Her shadow comes from a streetlight $15$ feet high. She is walking at $3$ feet per second towards the light. What is the rate of change of her shadow?
|
||||
|
||||
|
||||
The setup for this problem involves drawing a right triangle with height $12$ and base given by the distance $x$ from the light the woman is *plus* the length $l$ of the shadow. There is a similar triangle formed by the woman's height with length $l$. Equating the ratios of the sided gives:
|
||||
|
||||
|
||||
$$
|
||||
\frac{5}{l} = \frac{12}{x + l}
|
||||
$$
|
||||
|
||||
As we need to take derivatives, we work with the reciprocal relationship:
|
||||
|
||||
|
||||
$$
|
||||
\frac{l}{5} = \frac{x + l}{12}
|
||||
$$
|
||||
|
||||
Differentiating in $t$ gives:
|
||||
|
||||
|
||||
$$
|
||||
\frac{l'}{5} = \frac{x' + l'}{12}
|
||||
$$
|
||||
|
||||
Or
|
||||
|
||||
|
||||
$$
|
||||
l' \cdot (\frac{1}{5} - \frac{1}{12}) = \frac{x'}{12}
|
||||
$$
|
||||
|
||||
Solving for $l'$ gives an answer in terms of $x'$ the rate the woman is walking. In this description $x$ is getting shorter, so $x'$ would be $-3$ feet per second and the shadow length would be decreasing at a rate proportional to the walking speed.
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
p = plot(; axis=nothing, border=:none, legend=false, aspect_ratio=:equal)
|
||||
scatter!(p, [0],[50], color=:yellow, markersize=50)
|
||||
plot!(p, [0, 50], [0,0], linestyle=:dash)
|
||||
plot!(p, [0,50], [50,0], linestyle=:dot)
|
||||
plot!(p, [25,25],[25,0], linewidth=5, color=:black)
|
||||
plot!(p, [25,50], [0,0], linewidth=2, color=:black)
|
||||
```
|
||||
|
||||
The sun is setting at the rate of $1/20$ radian/min, and appears to be dropping perpendicular to the horizon, as depicted in the figure. How fast is the shadow of a $25$ meter wall lengthening at the moment when the shadow is $25$ meters long?
|
||||
|
||||
|
||||
Let the shadow length be labeled $x$, as it appears on the $x$ axis above. Then we have by right-angle trigonometry:
|
||||
|
||||
|
||||
$$
|
||||
\tan(\theta) = \frac{25}{x}
|
||||
$$
|
||||
|
||||
of $x\tan(\theta) = 25$.
|
||||
|
||||
|
||||
As $t$ evolves, we know $d\theta/dt$ but what is $dx/dt$? Using implicit differentiation yields:
|
||||
|
||||
|
||||
$$
|
||||
\frac{dx}{dt} \cdot \tan(\theta) + x \cdot (\sec^2(\theta)\cdot \frac{d\theta}{dt}) = 0
|
||||
$$
|
||||
|
||||
Substituting known values and identifying $\theta=\pi/4$ when the shadow length, $x$, is $25$ gives:
|
||||
|
||||
|
||||
$$
|
||||
\frac{dx}{dt} \cdot \tan(\pi/4) + 25 \cdot((4/2) \cdot \frac{-1}{20} = 0
|
||||
$$
|
||||
|
||||
This can be solved for the unknown: $dx/dt = 50/20$.
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
A batter hits a ball toward third base at $75$ ft/sec and runs toward first base at a rate of $24$ ft/sec. At what rate does the distance between the ball and the batter change when $2$ seconds have passed?
|
||||
|
||||
|
||||
We will answer this with `SymPy`. First we create some symbols for the movement of the ball towardsthird base, `b(t)`, the runner toward first base, `r(t)`, and the two velocities. We use symbolic functions for the movements, as we will be differentiating them in time:
|
||||
|
||||
|
||||
```{julia}
|
||||
@syms b() r() v_b v_r
|
||||
d = sqrt(b(t)^2 + r(t)^2)
|
||||
```
|
||||
|
||||
The distance formula applies to give $d$. As the ball and runner are moving in a perpendicular direction, the formula is easy to apply.
|
||||
|
||||
|
||||
We can differentiate `d` in terms of `t` and in process we also find the derivatives of `b` and `r`:
|
||||
|
||||
|
||||
```{julia}
|
||||
db, dr = diff(b(t),t), diff(r(t),t) # b(t), r(t) -- symbolic functions
|
||||
dd = diff(d,t) # d -- not d(t) -- an expression
|
||||
```
|
||||
|
||||
The slight difference in the commands is due to `b` and `r` being symbolic functions, whereas `d` is a symbolic expression. Now we begin substituting. First, from the problem `db` is just the velocity in the ball's direction, or `v_b`. Similarly for `v_r`:
|
||||
|
||||
|
||||
```{julia}
|
||||
ddt = subs(dd, db => v_b, dr => v_r)
|
||||
```
|
||||
|
||||
Now, we can substitute in for `b(t)`, as it is `v_b*t`, etc.:
|
||||
|
||||
|
||||
```{julia}
|
||||
ddt₁ = subs(ddt, b(t) => v_b * t, r(t) => v_r * t)
|
||||
```
|
||||
|
||||
This finds the rate of change of time for any `t` with symbolic values of the velocities. (And shows how the answer doesn't actually depend on $t$.) The problem's answer comes from a last substitution:
|
||||
|
||||
|
||||
```{julia}
|
||||
ddt₁(t => 2, v_b => 75, v_r => 24)
|
||||
```
|
||||
|
||||
Were this done by "hand," it would be better to work with distance squared to avoid the expansion of complexity from the square root. That is, using implicit differentiation:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
d^2 &= b^2 + r^2\\
|
||||
2d\cdot d' &= 2b\cdot b' + 2r\cdot r'\\
|
||||
d' &= (b\cdot b' + r \cdot r')/d\\
|
||||
d' &= (tb'\cdot b' + tr' \cdot r')/d\\
|
||||
d' &= \left((b')^2 + (r')^2\right) \cdot \frac{t}{d}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
#| cache: true
|
||||
###{{{baseball_been_berry_good}}}
|
||||
## Secant line approaches tangent line...
|
||||
function baseball_been_berry_good_graph(n)
|
||||
|
||||
v0 = 15
|
||||
x = (t) -> 50t
|
||||
y = (t) -> v0*t - 5 * t^2
|
||||
|
||||
|
||||
ns = range(.25, stop=3, length=8)
|
||||
|
||||
t = ns[n]
|
||||
ts = range(0, stop=t, length=50)
|
||||
xs = map(x, ts)
|
||||
ys = map(y, ts)
|
||||
|
||||
degrees = atand(y(t)/(100-x(t)))
|
||||
degrees = degrees < 0 ? 180 + degrees : degrees
|
||||
|
||||
plt = plot(xs, ys, legend=false, size=fig_size, xlim=(0,150), ylim=(0,15))
|
||||
plot!(plt, [x(t), 100], [y(t), 0.0], color=:orange)
|
||||
annotate!(plt, [(55, 4,"θ = $(round(Int, degrees)) degrees"),
|
||||
(x(t), y(t), "($(round(Int, x(t))), $(round(Int, y(t))))")])
|
||||
|
||||
end
|
||||
caption = L"""
|
||||
|
||||
The flight of the ball as being tracked by a stationary outfielder. This ball will go over the head of the player. What can the player tell from the quantity $d\theta/dt$?
|
||||
|
||||
"""
|
||||
n = 8
|
||||
|
||||
|
||||
anim = @animate for i=1:n
|
||||
baseball_been_berry_good_graph(i)
|
||||
end
|
||||
|
||||
|
||||
imgfile = tempname() * ".gif"
|
||||
gif(anim, imgfile, fps = 1)
|
||||
|
||||
ImageFile(imgfile, caption)
|
||||
```
|
||||
|
||||
A baseball player stands $100$ meters from home base. A batter hits the ball directly at the player so that the distance from home plate is $x(t)$ and the height is $y(t)$.
|
||||
|
||||
|
||||
The player tracks the flight of the ball in terms of the angle $\theta$ made between the ball and the player. This will satisfy:
|
||||
|
||||
|
||||
$$
|
||||
\tan(\theta) = \frac{y(t)}{100 - x(t)}.
|
||||
$$
|
||||
|
||||
What is the rate of change of $\theta$ with respect to $t$ in terms of that of $x$ and $y$?
|
||||
|
||||
|
||||
We have by the chain rule and quotient rule:
|
||||
|
||||
|
||||
$$
|
||||
\sec^2(\theta) \theta'(t) = \frac{y'(t) \cdot (100 - x(t)) - y(t) \cdot (-x'(t))}{(100 - x(t))^2}.
|
||||
$$
|
||||
|
||||
If we have $x(t) = 50t$ and $y(t)=v_{0y} t - 5 t^2$ when is the rate of change of the angle happening most quickly?
|
||||
|
||||
|
||||
The formula for $\theta'(t)$ is
|
||||
|
||||
|
||||
$$
|
||||
\theta'(t) = \cos^2(\theta) \cdot \frac{y'(t) \cdot (100 - x(t)) - y(t) \cdot (-x'(t))}{(100 - x(t))^2}.
|
||||
$$
|
||||
|
||||
This question requires us to differentiate *again* in $t$. Since we have fairly explicit function for $x$ and $y$, we will use `SymPy` to do this.
|
||||
|
||||
|
||||
```{julia}
|
||||
@syms theta()
|
||||
|
||||
v0 = 5
|
||||
x(t) = 50t
|
||||
y(t) = v0*t - 5 * t^2
|
||||
eqn = tan(theta(t)) - y(t) / (100 - x(t))
|
||||
```
|
||||
|
||||
```{julia}
|
||||
thetap = diff(theta(t),t)
|
||||
dtheta = solve(diff(eqn, t), thetap)[1]
|
||||
```
|
||||
|
||||
We could proceed directly by evaluating:
|
||||
|
||||
|
||||
```{julia}
|
||||
d2theta = diff(dtheta, t)(thetap => dtheta)
|
||||
```
|
||||
|
||||
That is not so tractable, however.
|
||||
|
||||
|
||||
It helps to simplify $\cos^2(\theta(t))$ using basic right-triangle trigonometry. Recall, $\theta$ comes from a right triangle with height $y(t)$ and length $(100 - x(t))$. The cosine of this angle will be $100 - x(t)$ divided by the length of the hypotenuse. So we can substitute:
|
||||
|
||||
|
||||
```{julia}
|
||||
dtheta₁ = dtheta(cos(theta(t))^2 => (100 -x(t))^2/(y(t)^2 + (100-x(t))^2))
|
||||
```
|
||||
|
||||
Plotting reveals some interesting things. For $v_{0y} < 10$ we have graphs that look like:
|
||||
|
||||
|
||||
```{julia}
|
||||
plot(dtheta₁, 0, v0/5)
|
||||
```
|
||||
|
||||
The ball will drop in front of the player, and the change in $d\theta/dt$ is monotonic.
|
||||
|
||||
|
||||
But let's rerun the code with $v_{0y} > 10$:
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
v0 = 15
|
||||
x(t) = 50t
|
||||
y(t) = v0*t - 5 * t^2
|
||||
eqn = tan(theta(t)) - y(t) / (100 - x(t))
|
||||
thetap = diff(theta(t),t)
|
||||
dtheta = solve(diff(eqn, t), thetap)[1]
|
||||
dtheta₁ = subs(dtheta, cos(theta(t))^2, (100 - x(t))^2/(y(t)^2 + (100 - x(t))^2))
|
||||
plot(dtheta₁, 0, v0/5)
|
||||
```
|
||||
|
||||
In the second case we have a different shape. The graph is not monotonic, and before the peak there is an inflection point. Without thinking too hard, we can see that the greatest change in the angle is when it is just above the head ($t=2$ has $x(t)=100$).
|
||||
|
||||
|
||||
That these two graphs differ so, means that the player may be able to read if the ball is going to go over his or her head by paying attention to the how the ball is being tracked.
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
Hipster pour-over coffee is made with a conical coffee filter. The cone is actually a [frustum](http://en.wikipedia.org/wiki/Frustum) of a cone with small diameter, say $r_0$, chopped off. We will parameterize our cone by a value $h \geq 0$ on the $y$ axis and an angle $\theta$ formed by a side and the $y$ axis. Then the coffee filter is the part of the cone between some $h_0$ (related $r_0=h_0 \tan(\theta)$) and $h$.
|
||||
|
||||
|
||||
The volume of a cone of height $h$ is $V(h) = \pi/3 h \cdot R^2$. From the geometry, $R = h\tan(\theta)$. The volume of the filter then is:
|
||||
|
||||
|
||||
$$
|
||||
V = V(h) - V(h_0).
|
||||
$$
|
||||
|
||||
What is $dV/dh$ in terms of $dR/dh$?
|
||||
|
||||
|
||||
Differentiating implicitly gives:
|
||||
|
||||
|
||||
$$
|
||||
\frac{dV}{dh} = \frac{\pi}{3} ( R(h)^2 + h \cdot 2 R \frac{dR}{dh}).
|
||||
$$
|
||||
|
||||
We see that it depends on $R$ and the change in $R$ with respect to $h$. However, we visualize $h$ - the height - so it is better to re-express. Clearly, $dR/dh = \tan\theta$ and using $R(h) = h \tan(\theta)$ we get:
|
||||
|
||||
|
||||
$$
|
||||
\frac{dV}{dh} = \pi h^2 \tan^2(\theta).
|
||||
$$
|
||||
|
||||
The rate of change goes down as $h$ gets smaller ($h \geq h_0$) and gets bigger for bigger $\theta$.
|
||||
|
||||
|
||||
How do the quantities vary in time?
|
||||
|
||||
|
||||
For an incompressible fluid, by balancing the volume leaving with how it leaves we will have $dh/dt$ is the ratio of the cross-sectional area at bottom over that at the height of the fluid $(\pi \cdot (h_0\tan(\theta))^2) / (\pi \cdot ((h\tan\theta))^2)$ times the outward velocity of the fluid.
|
||||
|
||||
|
||||
That is $dh/dt = (h_0/h)^2 \cdot v$. Which makes sense - larger openings ($h_0$) mean more fluid lost per unit time so the height change follows, higher levels ($h$) means the change in height is slower, as the cross-sections have more volume.
|
||||
|
||||
|
||||
By [Torricelli's](http://en.wikipedia.org/wiki/Torricelli's_law) law, the out velocity follows the law $v = \sqrt{2g(h-h_0)}$. This gives:
|
||||
|
||||
|
||||
$$
|
||||
\frac{dh}{dt} = \frac{h_0^2}{h^2} \cdot v = \frac{h_0^2}{h^2} \sqrt{2g(h-h_0)}.
|
||||
$$
|
||||
|
||||
If $h >> h_0$, then $\sqrt{h-h_0} = \sqrt{h}\sqrt(1 - h_0/h) \approx \sqrt{h}(1 - (1/2)(h_0/h)) \approx \sqrt{h}$. So the rate of change of height in time is like $1/h^{3/2}$.
|
||||
|
||||
|
||||
Now, by the chain rule, we have then the rate of change of volume with respect to time, $dV/dt$, is:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\frac{dV}{dt} &=
|
||||
\frac{dV}{dh} \cdot \frac{dh}{dt}\\
|
||||
&= \pi h^2 \tan^2(\theta) \cdot \frac{h_0^2}{h^2} \sqrt{2g(h-h_0)} \\
|
||||
&= \pi \sqrt{2g} \cdot (r_0)^2 \cdot \sqrt{h-h_0} \\
|
||||
&\approx \pi \sqrt{2g} \cdot r_0^2 \cdot \sqrt{h}.
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
This rate depends on the square of the size of the opening ($r_0^2$) and the square root of the height ($h$), but not the angle of the cone.
|
||||
|
||||
|
||||
## Questions
|
||||
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
Supply and demand. Suppose demand for product $XYZ$ is $d(x)$ and supply is $s(x)$. The excess demand is $d(x) - s(x)$. Suppose this is positive. How does this influence price? Guess the "law" of economics that applies:
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
"The rate of change of price will be ``0``",
|
||||
"The rate of change of price will increase",
|
||||
"The rate of change of price will be positive and will depend on the rate of change of excess demand."
|
||||
]
|
||||
answ = 3
|
||||
radioq(choices, answ, keep_order=true)
|
||||
```
|
||||
|
||||
(Theoretically, when demand exceeds supply, prices increase.)
|
||||
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
Which makes more sense from an economic viewpoint?
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
"If the rate of change of unemployment is negative, the rate of change of wages will be negative.",
|
||||
"If the rate of change of unemployment is negative, the rate of change of wages will be positive."
|
||||
]
|
||||
answ = 2
|
||||
radioq(choices, answ, keep_order=true)
|
||||
```
|
||||
|
||||
(Colloquially, "the rate of change of unemployment is negative" means the unemployment rate is going down, so there are fewer workers available to fill new jobs.)
|
||||
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
In chemistry there is a fundamental relationship between pressure ($P$), temperature ($T)$ and volume ($V$) given by $PV=cT$ where $c$ is a constant. Which of the following would be true with respect to time?
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
L"The rate of change of pressure is always increasing by $c$",
|
||||
"If volume is constant, the rate of change of pressure is proportional to the temperature",
|
||||
"If volume is constant, the rate of change of pressure is proportional to the rate of change of temperature",
|
||||
"If pressure is held constant, the rate of change of pressure is proportional to the rate of change of temperature"]
|
||||
answ = 3
|
||||
radioq(choices, answ, keep_order=true)
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
A pebble is thrown into a lake causing ripples to form expanding circles. Suppose one of the circles expands at a rate of $1$ foot per second and the radius of the circle is $10$ feet, what is the rate of change of the area enclosed by the circle?
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
# a = pi*r^2
|
||||
# da/dt = pi * 2r * drdt
|
||||
r = 10; drdt = 1
|
||||
val = pi * 2r * drdt
|
||||
numericq(val, units=L"feet$^2$/second")
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
A pizza maker tosses some dough in the air. The dough is formed in a circle with radius $10$. As it rotates, its area increases at a rate of $1$ inch$^2$ per second. What is the rate of change of the radius?
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
# a = pi*r^2
|
||||
# da/dt = pi * 2r * drdt
|
||||
r = 10; dadt = 1
|
||||
val = dadt /( pi * 2r)
|
||||
numericq(val, units="inches/second")
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
An FBI agent with a powerful spyglass is located in a boat anchored 400 meters offshore. A gangster under surveillance is driving along the shore. Assume the shoreline is straight and that the gangster is 1 km from the point on the shore nearest to the boat. If the spyglasses must rotate at a rate of $\pi/4$ radians per minute to track the gangster, how fast is the gangster moving? (In kilometers per minute.) [Source.](http://oregonstate.edu/instruct/mth251/cq/Stage9/Practice/ratesProblems.html)
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
## tan(theta) = x/y
|
||||
## sec^2(theta) dtheta/dt = 1/y dx/dt (y is constant)
|
||||
## dxdt = y sec^2(theta) dtheta/dt
|
||||
dthetadt = pi/4
|
||||
y0 = .4; x0 = 1.0
|
||||
theta = atan(x0/y0)
|
||||
val = y0 * sec(theta)^2 * dthetadt
|
||||
numericq(val, units="kilometers/minute")
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
A flood lamp is installed on the ground 200 feet from a vertical wall. A six foot tall man is walking towards the wall at the rate of 4 feet per second. How fast is the tip of his shadow moving down the wall when he is 50 feet from the wall? [Source.](http://oregonstate.edu/instruct/mth251/cq/Stage9/Practice/ratesProblems.html) (As the question is written the answer should be positive.)
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
## y/200 = 6/x
|
||||
## dydt = 200 * 6 * -1/x^2 dxdt
|
||||
x0 = 200 - 50
|
||||
dxdt = 4
|
||||
val = 200 * 6 * (1/x0^2) * dxdt
|
||||
numericq(val, units="feet/second")
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
Consider the hyperbola $y = 1/x$ and think of it as a slide. A particle slides along the hyperbola so that its x-coordinate is increasing at a rate of $f(x)$ units/sec. If its $y$-coordinate is decreasing at a constant rate of $1$ unit/sec, what is $f(x)$? [Source.](http://oregonstate.edu/instruct/mth251/cq/Stage9/Practice/ratesProblems.html)
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
"``f(x) = 1/x``",
|
||||
"``f(x) = x^0``",
|
||||
"``f(x) = x``",
|
||||
"``f(x) = x^2``"
|
||||
]
|
||||
answ = 4
|
||||
radioq(choices, answ, keep_order=true)
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
A balloon is in the shape of a sphere, fortunately, as this gives a known formula, $V=4/3 \pi r^3$, for the volume. If the balloon is being filled with a rate of change of volume per unit time is $2$ and the radius is $3$, what is rate of change of radius per unit time?
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
r, dVdt = 3, 2
|
||||
drdt = dVdt / (4 * pi * r^2)
|
||||
numericq(drdt, units="units per unit time")
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
|
||||
Consider the curve $f(x) = x^2 - \log(x)$. For a given $x$, the tangent line intersects the $y$ axis. Where?
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
"``y = 1 - x^2 - \\log(x)``",
|
||||
"``y = 1 - x^2``",
|
||||
"``y = 1 - \\log(x)``",
|
||||
"``y = x(2x - 1/x)``"
|
||||
]
|
||||
answ = 1
|
||||
radioq(choices, answ)
|
||||
```
|
||||
|
||||
If $dx/dt = -1$, what is $dy/dt$?
|
||||
|
||||
|
||||
```{julia}
|
||||
#ImageFile(:der
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
|
||||
@@ -113,7 +113,7 @@ The term "best" is deserved, as any other straight line will differ at least in
|
||||
(This is a consequence of Cauchy's mean value theorem with $F(c) = f(c) - f'(c)\cdot(c-x)$ and $G(c) = (c-x)^2$
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
\frac{F'(\xi)}{G'(\xi)} &=
|
||||
\frac{f'(\xi) - f''(\xi)(\xi-x) - f(\xi)\cdot 1}{2(\xi-x)} \\
|
||||
@@ -122,7 +122,7 @@ $$
|
||||
&= \frac{f(c) - f'(c)(c-x) - (f(x) - f'(x)(x-x))}{(c-x)^2 - (x-x)^2} \\
|
||||
&= \frac{f(c) + f'(c)(x-c) - f(x)}{(x-c)^2}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
That is, $f(x) = f(c) + f'(c)(x-c) + f''(\xi)/2\cdot(x-c)^2$, or $f(x)-tl(x)$ is as described.)
|
||||
|
||||
@@ -153,14 +153,12 @@ As in the linear case, there is flexibility in the exact points chosen for the i
|
||||
Now, we take a small detour to define some notation. Instead of writing our two points as $c$ and $c+h,$ we use $x_0$ and $x_1$. For any set of points $x_0, x_1, \dots, x_n$, define the **divided differences** of $f$ inductively, as follows:
|
||||
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\begin{align*}
|
||||
f[x_0] &= f(x_0) \\
|
||||
f[x_0, x_1] &= \frac{f[x_1] - f[x_0]}{x_1 - x_0}\\
|
||||
\cdots &\\
|
||||
f[x_0, x_1, x_2, \dots, x_n] &= \frac{f[x_1, \dots, x_n] - f[x_0, x_1, x_2, \dots, x_{n-1}]}{x_n - x_0}.
|
||||
\end{align}
|
||||
$$
|
||||
\end{align*}
|
||||
|
||||
We see the first two values look familiar, and to generate more we just take certain ratios akin to those formed when finding a secant line.
|
||||
|
||||
@@ -252,12 +250,12 @@ A proof based on Rolle's theorem appears in the appendix.
|
||||
Why the fuss? The answer comes from a result of Newton on *interpolating* polynomials. Consider a function $f$ and $n+1$ points $x_0$, $x_1, \dots, x_n$. Then an interpolating polynomial is a polynomial of least degree that goes through each point $(x_i, f(x_i))$. The [Newton form](https://en.wikipedia.org/wiki/Newton_polynomial) of such a polynomial can be written as:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f[x_0] &+ f[x_0,x_1] \cdot (x-x_0) + f[x_0, x_1, x_2] \cdot (x-x_0) \cdot (x-x_1) + \\
|
||||
& \cdots + f[x_0, x_1, \dots, x_n] \cdot (x-x_0)\cdot \cdots \cdot (x-x_{n-1}).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
The case $n=0$ gives the value $f[x_0] = f(c)$, which can be interpreted as the slope-$0$ line that goes through the point $(c,f(c))$.
|
||||
|
||||
@@ -485,12 +483,12 @@ On inspection, it is seen that this is Newton's method applied to $f'(x)$. This
|
||||
Starting with the Newton form of the interpolating polynomial of smallest degree:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f[x_0] &+ f[x_0,x_1] \cdot (x - x_0) + f[x_0, x_1, x_2] \cdot (x - x_0)\cdot(x-x_1) + \\
|
||||
& \cdots + f[x_0, x_1, \dots, x_n] \cdot (x-x_0) \cdot \cdots \cdot (x-x_{n-1}).
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
and taking $x_i = c + i\cdot h$, for a given $n$, we have in the limit as $h > 0$ goes to zero that coefficients of this polynomial converge to the coefficients of the *Taylor Polynomial of degree n*:
|
||||
|
||||
@@ -850,24 +848,24 @@ The actual code is different, as the Taylor polynomial isn't used. The Taylor p
|
||||
For notational purposes, let $g(x)$ be the inverse function for $f(x)$. Assume *both* functions have a Taylor polynomial expansion:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
f(x_0 + \Delta_x) &= f(x_0) + a_1 \Delta_x + a_2 (\Delta_x)^2 + \cdots a_n + (\Delta_x)^n + \dots\\
|
||||
g(y_0 + \Delta_y) &= g(y_0) + b_1 \Delta_y + b_2 (\Delta_y)^2 + \cdots b_n + (\Delta_y)^n + \dots
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
Then using $x = g(f(x))$, we have expanding the terms and using $\approx$ to drop the $\dots$:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
x_0 + \Delta_x &= g(f(x_0 + \Delta_x)) \\
|
||||
&\approx g(f(x_0) + \sum_{j=1}^n a_j (\Delta_x)^j) \\
|
||||
&\approx g(f(x_0)) + \sum_{i=1}^n b_i \left(\sum_{j=1}^n a_j (\Delta_x)^j \right)^i \\
|
||||
&\approx x_0 + \sum_{i=1}^{n-1} b_i \left(\sum_{j=1}^n a_j (\Delta_x)^j\right)^i + b_n \left(\sum_{j=1}^n a_j (\Delta_x)^j\right)^n
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
That is:
|
||||
|
||||
@@ -1207,7 +1205,7 @@ $$
|
||||
These two polynomials are of degree $n$ or less and have $u(x) = h(x)-g(x)=0$, by uniqueness. So the coefficients of $u(x)$ are $0$. We have that the coefficient of $x^n$ must be $a_n-b_n$ so $a_n=b_n$. Our goal is to express $a_n$ in terms of $a_{n-1}$ and $b_{n-1}$. Focusing on the $x^{n-1}$ term, we have:
|
||||
|
||||
|
||||
$$
|
||||
|
||||
\begin{align*}
|
||||
b_n(x-x_n)(x-x_{n-1})\cdot\cdots\cdot(x-x_1)
|
||||
&- a_n\cdot(x-x_0)\cdot\cdots\cdot(x-x_{n-1}) \\
|
||||
@@ -1215,7 +1213,7 @@ b_n(x-x_n)(x-x_{n-1})\cdot\cdots\cdot(x-x_1)
|
||||
a_n [(x-x_1)\cdot\cdots\cdot(x-x_{n-1})] [(x- x_n)-(x-x_0)] \\
|
||||
&= -a_n \cdot(x_n - x_0) x^{n-1} + p_{n-2},
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
|
||||
where $p_{n-2}$ is a polynomial of at most degree $n-2$. (The expansion of $(x-x_1)\cdot\cdots\cdot(x-x_{n-1}))$ leaves $x^{n-1}$ plus some lower degree polynomial.) Similarly, we have $a_{n-1}(x-x_0)\cdot\cdots\cdot(x-x_{n-2}) = a_{n-1}x^{n-1} + q_{n-2}$ and $b_{n-1}(x-x_n)\cdot\cdots\cdot(x-x_2) = b_{n-1}x^{n-1}+r_{n-2}$. Combining, we get that the $x^{n-1}$ term of $u(x)$ is
|
||||
|
||||
|
||||
Reference in New Issue
Block a user