This is worth 5 points extra credit if done properly and turned in by the last class.
Let $f$ be a function defined on the real line. M. Stemlund proved in 2001 (The College Mathematics Journal, 32, 194-196) the following:
The function $f(x)$ is a quadratic polynomial if and only if for any $a$ and $b$ the intersection point of the tangents lines to $f(x)$ at $(a, f(a))$ and $(b, f(b))$ happens at $x=(a+b)/2$.
We wish to investigate this. We will use the tangent
function provided by the MTH229
package:
using MTH229 plotly()
Plots.PlotlyBackend()
We can graph two tangent lines using this pattern:
f(x) = exp(x) a,b = 1, 2 plot(f, a, b) plot!(tangent(f, a), a, b) plot!(tangent(f, b), a, b)
Here we can see the intersection point is not at (a+b)/2 = 1.5
, but a bit to the right of that.
a
and b
using a,b = sort(4*rand(2))
and show graphically that this relationship is not a coincidence.fzero
or fzeros
) that the intersection point is equal to (a+b)/2
for the function $f(x) = x^2 + 2x + 3$ with $a=1$ and $b=2$.