Average Rate of Change and Selected Exercises
> restart;
>
avgRC := proc(f,a,b)
simplify((f(b)-f(a))/(b-a))
end:
Exercises 12, 18, and 20.
>
f := x -> -3*x + 5;
plot([f(x),avgRC(f,x-0.5,x+0.5),D(f)(x)],x=0..6);
> plot((avgRC(f,x-0.5,x+0.5) - D(f)(x)),x=0..6);
>
f := x -> sin(x);
plot([f(x),avgRC(f,x-0.5,x+0.5),D(f)(x)],x=0..6);
> plot((avgRC(f,x-0.5,x+0.5) - D(f)(x)),x=0..6);
>
f := x -> 2^x;
plot([f(x),avgRC(f,x-0.5,x+0.5),D(f)(x)],x=0..2);
> plot((avgRC(f,x-0.5,x+0.5) - D(f)(x)),x=0..6);
>