Math3-S2-Demo1_tangents.mw

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)

> f := x -> x / (1 + x^2);

f := proc (x) options operator, arrow; x/(1+x^2) end proc

    Plot this function

> plot(f(x), x = 0..10, y = 0..0.6);

[Plot]

     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;

Px := 3

Qx := .5

     Compute the slope of the secant

> mpq:= (f(Qx) - f(Px)) / (Qx - Px);

mpq := -0.4000000000e-1

     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}));

[Plot]

>