edits; simplify caching
This commit is contained in:
@@ -128,21 +128,16 @@ segments, and we could have derived the graph of `x` from that of
|
||||
`speed`, just using the simple formula relating distance, rate, and
|
||||
time.
|
||||
|
||||
```julia;echo=false
|
||||
note("""
|
||||
|
||||
We were pretty loose with some key terms. There is a distinction
|
||||
between "speed" and "velocity", this being the speed is the absolute
|
||||
value of velocity. Velocity incorporates a direction as well as a
|
||||
magnitude. Similarly, distance traveled and change in position are not
|
||||
the same thing when there is back tracking involved. The total
|
||||
distance traveled is computed with the speed, the change in position
|
||||
is computed with the velocity. When there is no change of sign, it is
|
||||
a bit more natural, perhaps, to use the language of speed and
|
||||
distance.
|
||||
|
||||
""")
|
||||
```
|
||||
!!! note
|
||||
We were pretty loose with some key terms. There is a
|
||||
distinction between "speed" and "velocity", this being the speed
|
||||
is the absolute value of velocity. Velocity incorporates a
|
||||
direction as well as a magnitude. Similarly, distance traveled and
|
||||
change in position are not the same thing when there is back
|
||||
tracking involved. The total distance traveled is computed with
|
||||
the speed, the change in position is computed with the
|
||||
velocity. When there is no change of sign, it is a bit more
|
||||
natural, perhaps, to use the language of speed and distance.
|
||||
|
||||
##### Example: Galileo's ball and ramp experiment
|
||||
|
||||
@@ -326,15 +321,13 @@ ImageFile(imgfile, caption)
|
||||
The tangent line is not just a line that intersects the graph in one
|
||||
point, nor does it need only intersect the line in just one point.
|
||||
|
||||
```julia; echo=false
|
||||
note("""
|
||||
This last point was certainly not obvious at
|
||||
first. [Barrow](http://www.maa.org/sites/default/files/0746834234133.di020795.02p0640b.pdf),
|
||||
who had Newton as a pupil, and was the first to sketch a proof of part
|
||||
of the Fundamental Theorem of Calculus, understood a tangent line to
|
||||
be a line that intersects a curve at only one point.
|
||||
""")
|
||||
```
|
||||
!!! note
|
||||
This last point was certainly not obvious at
|
||||
first. [Barrow](http://www.maa.org/sites/default/files/0746834234133.di020795.02p0640b.pdf),
|
||||
who had Newton as a pupil, and was the first to sketch a proof of
|
||||
part of the Fundamental Theorem of Calculus, understood a tangent
|
||||
line to be a line that intersects a curve at only one point.
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
@@ -791,7 +784,7 @@ Find the derivative of ``f(x) = \sqrt{1 - x^2}``. We identify the composition of
|
||||
|
||||
```math
|
||||
\begin{align*}
|
||||
f(x) &=\sqrt{x} & g(x) &= 1 - x^2 \\
|
||||
f(x) &=\sqrt{x} = x^{1/2} & g(x) &= 1 - x^2 \\
|
||||
f'(\square) &=(1/2)(\square)^{-1/2} & g'(x) &= -2x
|
||||
\end{align*}
|
||||
```
|
||||
@@ -864,8 +857,34 @@ f(g(a+h)) - f(g(a)) - f'(g(a)) g'(a) h = f'(g(a))\epsilon_g(h))h + \epsilon_f(h'
|
||||
where $\epsilon(h)$ combines the above terms which go to zero as $h\rightarrow 0$ into one. This is
|
||||
the alternative definition of the derivative, showing $(f\circ g)'(a) = f'(g(a)) g'(a)$ when $g$ is differentiable at $a$ and $f$ is differentiable at $g(a)$.
|
||||
|
||||
##### The "chain" rule
|
||||
|
||||
##### More examples
|
||||
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:
|
||||
|
||||
```math
|
||||
\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:
|
||||
|
||||
```math
|
||||
\begin{align*}
|
||||
[\sin(e^{\cos(x^2-x)})]'
|
||||
&= \cos(e^{\cos(x^2-x)}) \cdot [e^{\cos(x^2-x)}]'\\
|
||||
&= \cos(e^{\cos(x^2-x)}) \cdot e^{\cos(x^2-x)} \cdot [\cos(x^2-x)]'\\
|
||||
&= \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
|
||||
|
||||
Find the derivative of $x^5 \cdot \sin(x)$.
|
||||
|
||||
@@ -928,14 +947,10 @@ and finally,
|
||||
diff(sin(x)^5)
|
||||
```
|
||||
|
||||
```julia; echo=false
|
||||
note("""
|
||||
The `diff` function can be called as `diff(ex)` when there is just one
|
||||
free variable, as in the above examples; as `diff(ex, var)` when there are parameters in the
|
||||
expression.
|
||||
"""
|
||||
)
|
||||
```
|
||||
!!! note
|
||||
The `diff` function can be called as `diff(ex)` when there is
|
||||
just one free variable, as in the above examples; as `diff(ex,
|
||||
var)` when there are parameters in the expression.
|
||||
|
||||
----
|
||||
|
||||
|
||||
@@ -46,12 +46,12 @@ equations, we may have ``0``, ``1`` or more ``y`` values for a given ``x`` and
|
||||
even more problematic is we may have no rule to find these values.
|
||||
|
||||
|
||||
There are a few options for plotting implicit equations in `Julia`. We will use `ImplicitPlots`, but note both `ImplicitEquations` and `IntervalConstraintProgramming` offer alternatives that are a bit more flexible.
|
||||
There are a few options for plotting equations in `Julia`. We will use `ImplicitPlots` in this section, but note both `ImplicitEquations` and `IntervalConstraintProgramming` offer alternatives that are a bit more flexible.
|
||||
|
||||
|
||||
To plot an implicit equation using `ImplicitPlots` requires expressing the relationship in terms of a function equation `f(x,y) = 0`. In practice this simply requires all the terms be moved to one side of an equals sign.
|
||||
To plot an implicit equation using `ImplicitPlots` requires expressing the relationship in terms of a function, and then plotting the equation `f(x,y) = 0`. In practice this simply requires all the terms be moved to one side of an equals sign.
|
||||
|
||||
To plot the circle of radius ``2``, or the equations ``x^2 + y^2 = 2^2`` we would solve ``x^2 + y^2 - 2^2 = 0`` and then express the left hand side through a function:
|
||||
To plot the circle of radius ``2``, or the equations ``x^2 + y^2 = 2^2`` we would move all terms to one side ``x^2 + y^2 - 2^2 = 0`` and then express the left hand side through a function:
|
||||
|
||||
```julia;
|
||||
f(x,y) = x^2 + y^2 - 2^2
|
||||
@@ -65,13 +65,11 @@ implicit_plot(f)
|
||||
```
|
||||
|
||||
|
||||
```julia; echo=false
|
||||
note("""
|
||||
!!! note
|
||||
The `f` is a function of *two* variables, used here to express one side of an equation. `Julia` makes this easy to do - just make sure two variables are in the signature of `f` when it is defined. Using functions like this, we can express our equation in the form ``f(x,y) = c`` or, more generally, as ``f(x,y) = g(x,y)``. The latter of which can be expressed as ``h(x,y) = f(x,y) - g(x,y) = 0``. That is, only the form ``f(x,y)=0`` is needed to represent an equation.
|
||||
|
||||
The `f` is a function of *two* variables, used here to express one side of an equation. `Julia` makes this easy to do - just make sure two variables are in the signature of `f` when it is defined. Using functions like this, we can express our equation in the form ``f(x,y) = c`` or, more generally, as ``f(x,y) = g(x,y)``. The latter of which can be expressed as ``h(x,y) = f(x,y) - g(x,y) = 0``. That is, only the form ``f(x,y)=0`` is needed to represent an equation.
|
||||
|
||||
""")
|
||||
```
|
||||
!!! note
|
||||
There are two different styles in `Julia` to add simple plot recipes. `ImplicitPlots` adds a new plotting function (`implicit_plot`); alternatively many packages add a new recipe for the generic `plot` method using new types. (For example, `SymPy` has a plot recipe for symbolic types.
|
||||
|
||||
|
||||
Of course, more complicated equations are possible and the steps are
|
||||
@@ -90,7 +88,7 @@ illustration purposes, a narrower viewing window is specified below using `xlims
|
||||
```julia; hold=true
|
||||
a,b = -1,2
|
||||
f(x,y) = y^4 - x^4 + a*y^2 + b*x^2
|
||||
implicit_plot(f, xlims=(-3,3), ylims=(-3,3))
|
||||
implicit_plot(f; xlims=(-3,3), ylims=(-3,3), legend=false)
|
||||
```
|
||||
|
||||
## Tangent lines, implicit differentiation
|
||||
@@ -98,7 +96,7 @@ implicit_plot(f, xlims=(-3,3), ylims=(-3,3))
|
||||
|
||||
The graph ``x^2 + y^2 = 1`` has well-defined tangent lines at all points except
|
||||
``(-1,0)`` and ``(0, 1)`` and even at these two points, we could call the vertical lines
|
||||
``x=-1`` and ``x=1`` tangent lines. However, to recover the slope would
|
||||
``x=-1`` and ``x=1`` tangent lines. However, to recover the slope of these tangent lines would
|
||||
need us to express ``y`` as a function of ``x`` and then differentiate
|
||||
that function. Of course, in this example, we would need two functions:
|
||||
``f(x) = \sqrt{1-x^2}`` and ``g(x) = - \sqrt{1-x^2}`` to do this
|
||||
@@ -126,7 +124,7 @@ For example, starting with ``x^2 + y^2 = 1``, differentiating both sides in ``x
|
||||
2x + 2y\cdot \frac{dy}{dx} = 0.
|
||||
```
|
||||
|
||||
The chain rule was used to find ``(d/dx)(y^2) = 2y \cdot dy/dx``. From this we can solve for ``dy/dx`` (the resulting equations are linear in ``dy/dx``, so can always be solved explicitly):
|
||||
The chain rule was used to find ``(d/dx)(y^2) = [y(x)^2]' = 2y \cdot dy/dx``. From this we can solve for ``dy/dx`` (the resulting equations are linear in ``dy/dx``, so can always be solved explicitly):
|
||||
|
||||
```math
|
||||
\frac{dy}{dx} = -\frac{x}{y}.
|
||||
@@ -137,7 +135,7 @@ This says the slope of the tangent line depends on the point ``(x,y)`` through t
|
||||
|
||||
As a check, we compare to what we would have found had we solved for
|
||||
``y= \sqrt{1 - x^2}`` (for ``(x,y)`` with ``y \geq 0``). We would have
|
||||
found: ``dy/dx = 1/2 \cdot 1/\sqrt{1 - x^2} \cdot -2x``. Which can be
|
||||
found: ``dy/dx = 1/2 \cdot 1/\sqrt{1 - x^2} \cdot (-2x)``. Which can be
|
||||
simplified to ``-x/y``. This should show that the method
|
||||
above - assuming ``y`` is a function of ``x`` and differentiating - is not
|
||||
only more general, but can even be easier.
|
||||
@@ -275,7 +273,7 @@ implicit_plot(F, xlims=(-2, 2), ylims=(-2, 2), aspect_ratio=:equal)
|
||||
plot!(tl)
|
||||
```
|
||||
|
||||
We added *both* ``F ⩵ 1`` and the tangent line to the graph.
|
||||
We added *both* the implicit plot of ``F`` and the tangent line to the graph at the given point.
|
||||
|
||||
|
||||
##### Example
|
||||
@@ -356,7 +354,7 @@ Assume ``y`` is a function of ``x``, called `u(x)`, this substitution is just a
|
||||
ex1 = ex(y => u(x))
|
||||
```
|
||||
|
||||
At this point, we differentiate both sides in `x`:
|
||||
At this point, we differentiate in `x`:
|
||||
|
||||
```julia;
|
||||
ex2 = diff(ex1, x)
|
||||
@@ -393,7 +391,7 @@ Let ``a = b = c = d = 1``, then ``(1,4)`` is a point on the curve. We can draw a
|
||||
H = ex(a=>1, b=>1, c=>1, d=>1)
|
||||
x0, y0 = 1, 4
|
||||
𝒎 = dydx₁(x=>1, y=>4, a=>1, b=>1, c=>1, d=>1)
|
||||
implicit_plot(lambdify(H), xlims=(-5,5), ylims=(-5,5))
|
||||
implicit_plot(lambdify(H); xlims=(-5,5), ylims=(-5,5), legend=false)
|
||||
plot!(y0 + 𝒎 * (x-x0))
|
||||
```
|
||||
|
||||
@@ -491,7 +489,7 @@ As inverses are unique, their notation, ``f^{-1}(x)``, reflects the name of the
|
||||
|
||||
The chain rule can be used to give the derivative of an inverse
|
||||
function when applied to ``f(f^{-1}(x)) = x``. Solving gives,
|
||||
``[f^{-1}(x)]' = 1 / f'(g(x))``.
|
||||
``[f^{-1}(x)]' = 1 / f'(f^{-1}(x))``.
|
||||
|
||||
This is great - if we can remember the rules. If not, sometimes implicit
|
||||
differentiation can also help.
|
||||
@@ -502,6 +500,8 @@ Consider the inverse function for the tangent, which exists when the domain of t
|
||||
\sec(y)^2 \frac{dy}{dx} = 1.
|
||||
```
|
||||
|
||||
Or ``dy/dx = 1/\sec^2(y)``.
|
||||
|
||||
But ``\sec(y)^2 = 1 + \tan(y)^2 = 1 + x^2``, as can be seen by right-triangle trigonometry. This yields the formula ``dy/dx = [\tan^{-1}(x)]' = 1 / (1 + x^2)``.
|
||||
|
||||
##### Example
|
||||
@@ -955,7 +955,7 @@ There are other packages in the `Julia` ecosystem that can plot implicit equatio
|
||||
|
||||
The `ImplicitEquations` packages can plot equations and inequalities. The use is somewhat similar to the examples above, but the object plotted is a predicate, not a function. These predicates are created with functions like `Eq` or `Lt`.
|
||||
|
||||
For example, the `ImplicitPlots` manual shows this function ``f(x,y) = (x^4 + y^4 - 1) * (x^2 + y^2 - 2) + x^5 * y`` to plot. Using `ImplicitEquations`, this equation would be plotted with:
|
||||
For example, the `ImplicitPlots` manual shows this function ``f(x,y) = (x^4 + y^4 - 1) \cdot (x^2 + y^2 - 2) + x^5 \cdot y`` to plot. Using `ImplicitEquations`, this equation would be plotted with:
|
||||
|
||||
```julia; hold=true
|
||||
using ImplicitEquations
|
||||
|
||||
@@ -479,13 +479,13 @@ That is, any ladder less than this length can get around the hallway.
|
||||
Ethan Hunt, a top secret spy, has a mission to chase a bad guy. Here
|
||||
is what we know:
|
||||
|
||||
* Ethan likes to run. He can run at 10 miles per hour.
|
||||
* He can drive a car - usually some concept car by BMW - at 30 miles per hour, but only on the road.
|
||||
* Ethan likes to run. He can run at ``10`` miles per hour.
|
||||
* He can drive a car - usually some concept car by BMW - at ``30`` miles per hour, but only on the road.
|
||||
|
||||
For his mission, he needs to go 10 miles west and 5 miles north. He
|
||||
For his mission, he needs to go ``10`` miles west and ``5`` `miles north. He
|
||||
can do this by:
|
||||
|
||||
* just driving 10 miles west then 5 miles north, or
|
||||
* just driving ``8.310`` miles west then ``5`` miles north, or
|
||||
* just running the diagonal distance, or
|
||||
* driving $0 < x < 10$ miles west, then running on the diagonal
|
||||
|
||||
@@ -524,14 +524,14 @@ The minimum happens way out near 8. We zoom in a bit:
|
||||
plot(T, 7, 9)
|
||||
```
|
||||
|
||||
It appears to be around 8.3. We now use `find_zero` to refine our
|
||||
It appears to be around ``8.3``. We now use `find_zero` to refine our
|
||||
guess at the critical point using $[7,9]$:
|
||||
|
||||
```julia;
|
||||
α = find_zero(T', (7, 9))
|
||||
```
|
||||
|
||||
Okay, got it. Around 8.23. So is our minimum time
|
||||
Okay, got it. Around``8.23``. So is our minimum time
|
||||
|
||||
```julia;
|
||||
T(α)
|
||||
@@ -615,7 +615,7 @@ p.coeffs()
|
||||
```
|
||||
|
||||
Fourth degree polynomials can be solved. The critical points of the
|
||||
original equation will be among the 4 solutions given. However, the result
|
||||
original equation will be among the ``4`` solutions given. However, the result
|
||||
is complicated. The
|
||||
[article](http://www.ams.org/samplings/feature-column/fc-2016-05) -- from
|
||||
which the figure came -- states that "In today's textbooks the problem,
|
||||
@@ -706,7 +706,7 @@ Here the extreme value theorem doesn't technically apply, as we don't
|
||||
have a closed interval. However, **if** we can eliminate the endpoints as
|
||||
candidates, then we should be able to convince ourselves the maximum
|
||||
must occur at a critical point of $f(x)$. (If not, then convince yourself for all sufficiently large $M$ the maximum over $[0,M]$ occurs at
|
||||
a critical point, not an endpoint. Then let $M$ go to infinity.)
|
||||
a critical point, not an endpoint. Then let $M$ go to infinity. In general, for an optimization problem of a continuous function on the interval ``(a,b)`` if the right limit at ``a`` and left limit at ``b`` can be ruled out as candidates, the optimal value must occur at a critical point.)
|
||||
|
||||
So to approach this problem we first graph it over a wide interval.
|
||||
|
||||
@@ -715,7 +715,7 @@ f(x) = x * exp(-x^2)
|
||||
plot(f, 0, 100)
|
||||
```
|
||||
|
||||
Clearly the action is nearer to 1 than 100. We try graphing the
|
||||
Clearly the action is nearer to ``1`` than ``100``. We try graphing the
|
||||
derivative near that area:
|
||||
|
||||
```julia;
|
||||
@@ -852,12 +852,23 @@ numericq(val)
|
||||
|
||||
###### Question
|
||||
|
||||
A rancher with 10 meters of fence wishes to make a pen adjacent to an
|
||||
A rancher with ``10`` meters of fence wishes to make a pen adjacent to an
|
||||
existing fence. The pen will be a rectangle with one edge using the
|
||||
existing fence. Say that has length $x$, then $10 = 2y + x$, with $y$
|
||||
the other dimension of the pen. What is the maximum area that can be
|
||||
made?
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
p = plot(; legend=false, aspect_ratio=:equal, axis=nothing, border=:none)
|
||||
plot!([0,10, 10, 0, 0], [0,0,10,10,0]; linewidth=3)
|
||||
plot!(p, [10,14,14,10], [2, 2, 8,8]; linewidth = 1)
|
||||
annotate!(p, [(15, 5, "x"), (12,1, "y")])
|
||||
p
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
Ar(y) = (10-2y)*y;
|
||||
val = Ar(find_zero(Ar', 5))
|
||||
@@ -906,6 +917,79 @@ ans = 1
|
||||
radioq(choices, ans)
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
A cardboard box is to be designed with a square base and an open top holding a fixed volume ``V``. What dimensions yield the minimal surface area?
|
||||
|
||||
|
||||
|
||||
If this problem were approached symbolically, we might see the following code. First:
|
||||
|
||||
```julia;eval=false
|
||||
@syms V::positive x::positive z::positive
|
||||
SA = 1 * x * x + 4 * x * z
|
||||
```
|
||||
|
||||
What does this express?
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
radioq((
|
||||
"The box has a square base with open top, so `x*x` is the amount of material in the base; the 4 sides each have `x*z` area.",
|
||||
"The volume is a fixed amount, so is `x*x*z`, with sides suitably labeled",
|
||||
"The surface area of a box is `6x*x`, so this is wrong."
|
||||
), 1)
|
||||
```
|
||||
|
||||
What does this command express?
|
||||
|
||||
```julia; eval=false
|
||||
SA = subs(SA, z => V / x^2)
|
||||
```
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
radioq((
|
||||
"This command replaces `z` with an expression in `x` using the constraint of fixed volume `V`",
|
||||
"This command replaces `z`, reparameterizing in `V` instead.",
|
||||
"This command is merely algebraic simplification"
|
||||
), 1)
|
||||
```
|
||||
|
||||
What does this command find?
|
||||
|
||||
```julia; eval=false
|
||||
solve(diff(SA, x) ~ 0, x)
|
||||
```
|
||||
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
radioq((
|
||||
"This solves ``SA'=0``, that is it find critical points of a continuously differentiable function",
|
||||
"This solves for ``V`` the fixed, but unknown volume",
|
||||
"This checks the values of `SA` at the end points of the domain"
|
||||
), 1)
|
||||
```
|
||||
|
||||
What do these commands do?
|
||||
|
||||
```julia; eval=false
|
||||
cps = solve(diff(SA, x) ~ 0, x)
|
||||
xx = filter(isreal, cps)[1]
|
||||
diff(SA, x, x)(xx) > 0
|
||||
```
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
radioq((
|
||||
"This applies the second derivative test to the lone *real* critical point showing there is a local minimum at that point.",
|
||||
"This applies the first derivative test to the lone *real* critical point showing there is a local minimum at that point.",
|
||||
"This finds the ``4`th derivative of `SA`"
|
||||
), 1)
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###### Question
|
||||
|
||||
A rain gutter is constructed from a 30" wide sheet of tin by bending
|
||||
@@ -1265,3 +1349,59 @@ raw" ``\sqrt{3}/2 \cdot (a/b)^{2/3}``"
|
||||
]
|
||||
radioq(choices, 1)
|
||||
```
|
||||
|
||||
###### Question
|
||||
|
||||
In [Hall](https://www.maa.org/sites/default/files/hall03010308158.pdf) we can find a dozen optimization problems related to the following figure of the parabola ``y=x^2`` a point ``P=(a,a^2)``, ``a > 0``, and its normal line. We will do two.
|
||||
|
||||
|
||||
```julia; hold=true, echo=false
|
||||
p = plot(; legend=false, aspect_ratio=:equal, axis=nothing, border=:none)
|
||||
b = 2.
|
||||
plot!(p, x -> x^2, -b, b)
|
||||
plot!(p, [-b,b], [0,0])
|
||||
plot!(p, [0,0], [0, b^2])
|
||||
a = 1
|
||||
scatter!(p, [a],[a^2])
|
||||
m = 2a
|
||||
plot!(p, x -> a^2 + m*(x-a), 1/2, b)
|
||||
mₚ = -1/m
|
||||
plot!(p, x -> a^2 + mₚ*(x-a))
|
||||
scatter!(p, [-3/2], [(3/2)^2])
|
||||
annotate!(p, [(1+1/4, 1+1/8, "P"), (-3/2-1/4, (-3/2)^2-1/4, "Q")])
|
||||
p
|
||||
```
|
||||
|
||||
What do these commands do?
|
||||
|
||||
```julia; hold=true;
|
||||
@syms x::real, a::real
|
||||
mₚ = - 1 / diff(x^2, x)(a)
|
||||
solve(x^2 - (a^2 + mₚ*(x-a)) ~ 0, x)
|
||||
```
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
radioq((
|
||||
"It finds the ``x`` value of the intersection points of the normal line and the parabola",
|
||||
"It finds the tangent line",
|
||||
"It finds the point ``P``"
|
||||
), 1)
|
||||
```
|
||||
|
||||
Numerically, find the value of ``a`` that minimizes the ``y`` coordinate of ``Q``.
|
||||
|
||||
```julia; hold=true; echo=false
|
||||
y(a) = (-a - 1/(2a))^2
|
||||
a = find_zero(y', 1)
|
||||
numericq(a)
|
||||
```
|
||||
|
||||
|
||||
Numerically find the value of ``a`` that minimizes the length of the line seqment ``PQ``.
|
||||
|
||||
```juila; hold=true; echo=false
|
||||
x(a) = -a - 1/(2a)
|
||||
d(a) = (a-x(a))^2 + (a^2 - x(a)^2)^2
|
||||
a = find_zero(d', 1)
|
||||
numericq(a)
|
||||
```
|
||||
|
||||
@@ -224,7 +224,7 @@ Solving, yields:
|
||||
```
|
||||
|
||||
|
||||
* If $l = 12$ and $db/dt = 2$ when $b=4$, find $dh/dt$.
|
||||
* If when $l = 12$ it is known that $db/dt = 2$ when $b=4$, find $dh/dt$.
|
||||
|
||||
We just need to find $h$ for this value of $b$, as the other two quantities in the last equation are known.
|
||||
|
||||
@@ -242,6 +242,9 @@ height = sqrt(length^2 - bottom^2)
|
||||
As $b$ goes to $l$, $h$ goes to ``0``, so $b/h$ blows up. Unless $db/dt$
|
||||
goes to $0$, the expression will become $-\infty$.
|
||||
|
||||
!!! note
|
||||
Often, this problem is presented with ``db/dt`` having a constant rate. In this case, the ladder problem defies physics, as ``dh/dt`` eventually is faster than the speed of light as ``h \rightarrow 0+``. In practice, were ``db/dt`` kept at a constant, the ladder would necessarily come away from the wall. The trajectory would follow that of a tractrix were there no gravity to account for.
|
||||
|
||||
|
||||
##### Example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user