Math 3 Winter 2004
Introduction to Calculus
Class Demo for the Tangent Problem
January 5, 2004
Load additional plotting functions
> | with(plots): |
Warning, the name changecoords has been redefined
First we define the function under investigation
> | f := x -> x / (1 + x^2); |
Plot this function
> | plot(f(x), x = 0..10, y = 0..0.6); |
Set the point P we would like to find the tangent line at
and a helping point Q to draw a secant through.
We need to know only their x-coordinates, of course.
> | Px := 3; |
> | Qx := 0.5; |
Compute the slope of the secant
> | mpq:= (f(Qx) - f(Px)) / (Qx - Px); |
Draw the secant line through P with splope mpq
> | display(plot([f(x), mpq * (x - Px) + f(Px)], x = 0..10, y = 0..0.6), textplot({[Px, f(Px), `P`], [Qx, f(Qx), `Q`]}, align={BELOW, LEFT})); |
> |