Lab2solutions

# Lab2solutions - 1 Problem 3: Use MAPLE to estimate the...

This preview shows pages 1–2. Sign up to view the full content.

MATH 138 Calculus 2, Solutions to MAPLE Lab Assignment 2 Problem 1: Use MAPLE to list the ﬁrst 5 Taylor polynomials T 1 ( x ) ,T 2 ( x ) , ··· ,T 5 ( x ) centered at 0 for the function f ( x ) = 2 x +1 4 - x 2 . Solution: The MAPLE commands f:=(2*x+1)/sqrt(4-x^2): n:=5: for i from 1 to n do; T[i]:=convert(taylor(f,x,i+1),polynom); od; produce the following output. T 1 := x + 1 2 T 2 := 1 2 + x + 1 16 x 2 T 3 := 1 2 + x + 1 16 x 2 + 1 8 x 3 T 4 := 1 2 + x + 1 16 x 2 + 1 8 x 3 + 3 256 x 4 T 5 := 1 2 + x + 1 16 x 2 + 1 8 x 3 + 3 256 x 4 + 3 128 x 5 Problem 2: Use MAPLE to plot the graphs of each of these 5 Taylor polynomials alongside the graph of f ( x ) = 2 x +1 4 - x 2 in the viewing rectangle - 2 x 2, - 5 y 5. Solution: The MAPLE commands with(plots): f:=(2*x+1)/sqrt(4-x^2): n:=5: P[0]:=plot(f,x=-2. .2,view=-5. .5,color=blue): for i from 1 to n do: T[i]:=convert(taylor(f,x,i+1),polynom): P[i]:=plot(T[i],x=-2. .2,color=COLOR(RGB,1,1-i/n,0)): od: display(seq(P[i],i=0. .n)); produce the following output.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Problem 3: Use MAPLE to estimate the maximum value of f ( x )-T 5 ( x ) for 0 x 1 (one way to do this is to plot the function f ( x )-T 5 ( x ) in a suitable viewing rectangle). Solution: The MAPLE command plot(f-T[5],x=0. .1); produces the following output. From the graph is appears that for 0 x 1, the function f ( x )-T 5 ( x ) is positive and increasing with maximum value f (1)-T 5 (1) = . 0095. We also remark that we can use MAPLE to nd the exact value of f (1)-T 5 (1), along with an accurate approximate value, using the commands subs(x=1,f-T[5]); evalf(%); which produce the output 3-441 256 . 009394558 2...
View Full Document

## This note was uploaded on 03/16/2011 for the course MATH 138 taught by Professor Anoymous during the Winter '07 term at Waterloo.

### Page1 / 2

Lab2solutions - 1 Problem 3: Use MAPLE to estimate the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online