{VERSION 5 0 "IBM INTEL NT" "5.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Title"
0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }3 0 0 -1
12 12 0 0 0 0 0 0 19 0 }}
{SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 77 "File: depart\\math\\maple
\\misc\\seqptplt.mws Date: 14-jan-1997 By: bob jantzen" }}{PARA 0 "
" 0 "" {TEXT -1 103 "Hint from: \"lopez@rose-hulman.edu\" \"Ro
bert Lopez\" Maple User Group discussion list 13-jan-1997" }}{PARA
18 "" 0 "" {TEXT -1 52 "Generating Sequences of Pairs of Points for Pl
otting" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 ""
{TEXT -1 271 "This example shows how combining seq command with advanc
ed MAPLE experience leads to two useful lists of points from an initia
l list of input values for a function of one variable, both useful in \+
plotting certain piecewise straight line curves which pop up in calcul
us. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 319
"The first example creates sawtooth curve which starts at the first in
put value on the horizontal axis, rises vertically to the function gra
ph and then returns to the next input value in the sequence on the hor
izontal axis. This is useful for illustrating the sequence of tangent \+
lines in Newton's method of rootfinding." }}{PARA 0 "" 0 "" {TEXT -1
0 "" }}{PARA 0 "" 0 "" {TEXT -1 176 "The second example creates a set \+
of vertical lines connecting the sequence of input values to the funct
ion graph, which can be useful in illustrating calculus concepts as we
ll." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 237 "I
n each case a slightly sophistocated combination of syntax allows one \+
to create these results. If only there were a discussion of many of th
ese tricks so that we elementary users could benefit from the experien
ce of more advanced users!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
10 "f:=x->x^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "X := [1,2
,3,4,5];\nXY_jag:=seq(op([[x,0],[x,f(x)]]),x=X);\nXY_vert:=seq(([[x,0]
,[x,f(x)]]),x=X);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot(
\{XY_vert\}); verts:=%:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(plots): " }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "display(\{plot(f(x),x=0..5,color=re
d),verts\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "plot([XY_ja
g]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 30 "Another alternative using
zip:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "X0 := [ seq( [x,0]
, x=X )]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "X1 := [ seq( \+
[x,f(x)], x=X )]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "XY3 :
= zip( (a,b)-> op([a,b]), X0, X1 ); " }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}
{MARK "0 0 0" 77 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1
2 33 1 1 }