12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

206 • Chapter 6: Examples from Calculus> p0 := [ x0, f(x0) ];p0 := [1, e sin(1) ]> p1 := [ x0+h, f(x0+h) ];p1 := [1 + h, e sin(1+h) ]The NewtonQuotient command from the Student package finds theslope of the secant line through p 0 and p 1 .> with(Student[Calculus1]):Use NewtonQuotient command to find the expression for the slope.> m := NewtonQuotient(f(x), x=x0, h=h);m := esin(1+h) − e sin(1)hIf h = 1, the slope is> eval(%, h=1);e sin(2) − e sin(1)The evalf command gives a floating-point approximation.> evalf( % );0.162800903As h tends to zero, the secant slope values seem to converge.> h_values := seq( NewtonQuotient( f(x), x=1.0, h=1.0/i^2 ),> i=1..20);h_values := 0.1628009030, 1.053234748, 1.174305789,1.210917616, 1.226806975, 1.235154852, 1.240091510,1.243256512, 1.245408615, 1.246939100, 1.248066842,1.248921648, 1.249585493, 1.250111128, 1.250534250,1.250880512, 1.251167122, 1.251406908, 1.251609743,1.251782800

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!