{VERSION 5 0 "IBM INTEL LINUX" "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 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "Load plot and linear algeb ra packages" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 178 "Define a function to produce the \+ sequence of components of a vector (evalm means: evaluate as a matrix \+ (in this case vector), op strips the brackets, colon means suppress ou tput)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "components:=x->op( convert(evalm(x),list)):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 16 "Defin e our curve" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "mycurve:=vec tor([t^2,t^3,t^4]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "cc:= components(mycurve);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Create a \+ plot of the curve to be displayed later" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "plot_curve:=spacecurve([components(mycurve),t=0..3]): " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "Differentiate the curve to g ive tangent direction at t (map applies the operation to each componen t)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "tangent_vector:=map(x ->diff(x,t),mycurve);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "Pick a p articular value of the parameter for the base point" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "t0:=2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "Substitute to find the base point and the tangent direction the re" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "u:=map(x->subs(t=t0,x ),mycurve);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "v:=map(x->su bs(t=t0,x),tangent_vector);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "Th e usual \"couch potato\" formula for the tangent line" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "tangent_line:=u+t*v;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "plot_tangent_line:=spacecurve([comp onents(tangent_line),t=0..1],color=blue):" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 51 "display(plot_curve,plot_tangent_line,axes=normal); \n" }}}}{MARK "21" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }