updates
This commit is contained in:
@@ -330,26 +330,35 @@ Let $f(x)$ be differentiable on $(a,b)$ and continuous on $[a,b]$. Then there ex
|
||||
This says for any secant line between $a < b$ there will be a parallel tangent line at some $c$ with $a < c < b$ (all provided $f$ is differentiable on $(a,b)$ and continuous on $[a,b]$).
|
||||
|
||||
|
||||
This graph illustrates the theorem. The orange line is the secant line. A parallel line tangent to the graph is guaranteed by the mean value theorem. In this figure, there are two such lines, rendered using red.
|
||||
Figure @fig-mean-value-theorem illustrates the theorem. The orange line is the secant line. A parallel line tangent to the graph is guaranteed by the mean value theorem. In this figure, there are two such lines, rendered using red.
|
||||
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
#| label: fig-mean-value-theorem
|
||||
f(x) = x^3 - x
|
||||
a, b = -2, 1.75
|
||||
m = (f(b) - f(a)) / (b-a)
|
||||
cps = find_zeros(x -> f'(x) - m, a, b)
|
||||
|
||||
p = plot(f, a-1, b+1, linewidth=3, legend=false)
|
||||
plot!(x -> f(a) + m*(x-a), a-1, b+1, linewidth=3, color=:orange)
|
||||
p = plot(f, a-0.75, b+1,
|
||||
color=:mediumorchid3,
|
||||
linewidth=3, legend=false,
|
||||
axis=([],false),
|
||||
)
|
||||
|
||||
|
||||
plot!(x -> f(a) + m*(x-a), a-1, b+1, linewidth=5, color=:royalblue)
|
||||
scatter!([a,b], [f(a), f(b)])
|
||||
annotate!([(a, f(a), text("a", :bottom)),
|
||||
(b, f(b), text("b", :bottom))])
|
||||
|
||||
|
||||
for cp in cps
|
||||
plot!(x -> f(cp) + f'(cp)*(x-cp), a-1, b+1, color=:red)
|
||||
plot!(x -> f(cp) + f'(cp)*(x-cp), a-1, b+1, color=:brown3)
|
||||
end
|
||||
|
||||
scatter!(cps, f.(cps))
|
||||
subsscripts = collect("₀₁₂₃₄₅₆₇₈₉")
|
||||
annotate!([(cp, f(cp), text("c"*subsscripts[i], :bottom)) for (i,cp) ∈ enumerate(cps)])
|
||||
|
||||
Reference in New Issue
Block a user