Docsity

Calculating Tangent and Secant Lines of a Function using Maple, Assignments of Analytical Geometry and Calculus

Partial preview of the text

Download Calculating Tangent and Secant Lines of a Function using Maple and more Assignments Analytical Geometry and Calculus in PDF only on Docsity!

MAPLE demo 2-13-

Look at tangent and secant lines.

Example f(x)=x^3+5/x^2 at x_0=2.

> f^ :=^ x^ /^ x^3 C^

x^2

f := x/x^3 C

x^2

> plot^ (^ f^ (^ x^ ) ,^ x^ =.5 ..6 )

>

Define the difference quotient for f(x) at x=2.

> q := h /

( f ( 2 C h ) K f ( 2 ) ) h

q := h/

f ( 2 C h ) K f ( 2 ) h

> q ( 3. )

> s1 := x / f ( 2 ) C q ( 3. ) $ ( xK 2 )

s1 := x/f ( 2 ) C q ( 3. ) ( x K 2 )

> plot ( [ f ( x ) , s1 ( x ) ] , x =.5 ..6 )

> q ( .1 )

> limit ( q ( h ) , h = 0 )

43 4

>

Plot the tangent line.

> t := x / f ( 2 ) C 0

$ ( x K 2 )

t := x/f ( 2 ) C

x K

> plot ( [ f ( x ) , t ( x ) ] , x =.5 ..3 )

>

Define some graphs of secant lines.

> s2 := x / f ( 2 ) C q ( .5 ) $ ( xK 2 )

s2 := x/f ( 2 ) C q ( 0.5 ) ( x K 2 )

> s3 := x / f ( 2 ) C q ( .2 ) $ ( xK2 )

s3 := x/f ( 2 ) C q ( 0.2 ) ( x K 2 )

> s4 := x / f ( 2 ) C q ( .05 ) $ ( xK2 )

s4 := x/f ( 2 ) C q ( 0.05 ) ( x K 2 )

> plot ( [ f ( x ) , s2 ( x ) , s3 ( x ) , s4 ( x ) , t ( x ) ] , x = 1.5 ..3 )

>

Look at tangent line as best linear approximation.

> plot ( f ( x ) , x = 1.75 ..2.25 )

> plot ( f ( x ) , x = 1.9 ..2.1 )

> plot ( [ f ( x ) , t ( x ) ] , x = 1 ..3 )

> plot ( [ f ( x ) , t ( x ) ] , x = 1.75 ..2.25 )

> plot ( [ f ( x ) , t ( x ) ] , x = 1.95 ..2.05 )

> plot ( [ f ( x ) , t ( x ) ] , x = 1.99 ..2.01 )