This notebook contains the CAS portion of the solution to problem 28.
%display latex
var('x a b c p');
f1(x) = x*(x-2)*(x-6);
Df1 = f1.diff(x);
Lf1(p,x) = f1(x = p) + Df1(x = p)*(x-p);
show(plot(f1(x),(x,-1,7),ymin=-20,ymax=30,color='blue') + plot(Lf1(4,x),(x,-1,7),color='red') + plot(Lf1(3,x),(x,-1,7),color='green') +
plot(Lf1(1,x),(x,-1,7),color='purple') + plot(point((4,f1(4)),color='black',size=15)) + plot(point((2,0),color='black',size=15)) +
plot(point((6,0),color='black',size=15)) + plot(point((1,f1(1)),color='black',size=15)) + plot(point((3,f1(3)),color='black',size=15)) +
plot(point((0,0),color='black',size=15)),aspect_ratio=1/10)
The $x$-intercepts of the tangent lines at the averages of any two zeros appears to be the other zero. Indeed, this is true.
solve(Lf1(1,x) == f1(x),x)
solve(Lf1(3,x) == f1(x),x)
solve(Lf1(4,x) == f1(x),x)
We now let Sage do the general computation.
assume(a!=b, b!=c, a!=c)
f(x) = (x-a)*(x-b)*(x-c);
Df(x) = f.diff(x);
Lf(p,x) = f(x = p) + Df(x = p)*(x - p);
avg = (a + b)/2;
z = solve(Lf(avg,x) == f(x),x);
z
Indeed, the tangent line meets the curve at $x = c$. This also means that $Lf(c) = 0$.
solve(Lf(avg,x) == 0,x)[0]