> e:=textplot([-.9,1.2,`f'(x)`],font=[TIMES,BOLD,12]):
>
with(plots):
q:=(f(x0+h)-f(x0))/h:
m:=limit(q,h=0):
tanline:=x->f(x0)+m*(x-x0):
f:=x->-x^2+4:
a:=plot(f(x),x=-2..2,y=-4..6,color=red,thickness=2):
b:=plot(D(f)(x),x=-2..2,color=blue,thickness=2):
c:=animate(tanline(x),x=-2..2,x0=-2..2,color=green,thickness=2,frames=80):d:=textplot([.6,3,`f (x)`],font=[TIMES,BOLD,12]):
display({a,b,c,d,e},title=`Animated Tangent Line`,titlefont=[TIMES,BOLD,10]);
>
> ?animate
>