{VERSION 6 0 "IBM INTEL NT" "6.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 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title " -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 } 3 1 0 0 12 12 1 0 1 0 2 2 19 1 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 30 "CalcLabs Section 2.5 Cubi c Fit" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 146 "For your convenience he re is the corrected (statplots for statplot2d, and with(plots) from th e beginning of the chapter) input for this cubic fit:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "with(plots):\nwith(stats): with(sta tplots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "tvals:=[0,1,2,3 ,4,5,6,7,8,9,9.6];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "Pvals :=[1.65,1.75,1.86,2.07,2.30,2.52,3.02,3.70,4.45,5.30,5.77];" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "p1:=scatterplot(tvals,Pvals) :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "fit[leastsquare[[t,P], P=a*t^3+b*t^2+c*t+d]]([tvals,Pvals]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "f:=rhs(%); \nF:=unapply(f,t); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "p2:=plot(F(t),t=0..10):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "display([p1,p2],view=[0..10,0..7]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 155 "For your convenience I have also made a MAPLE \+ function out of the cubic fit, so you have a choice of two ways to eva luate the first and second derivatives:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "diff(f,t);\ndiff(f,t,t);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 22 "D(F)(t);\n(D@@2)(F)(t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "Note that either solve or fsolve will work with polynomi als like this for finding where they are zero:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 24 "solve((D@@2)(F)(t)=0,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 386 "Now \+ edit this data and change P to v (for velocity) to fit the Stewart Pro blem 4.1.72 shuttle velocity data. Then compute the acceleration and e stimate its maximum and minimum values during the specified time inter val (find critical numbers for acceleration function, where second der ivative of velocity equals zero). Remove my comments and put your own \+ in explaining your calculations." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 304 "Here we plot the first derivative of the curve fit function to compare. This would be the acceleration \+ curve in the shuttle problem. For some reason (BUG?) the combined plot will not display the third plot unless we manually enlarge the vertic al window beyond the value chosen by MAPLE for the first two:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "p3:=plot(D(F)(t),t=0..10,col or=blue):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "display([p1,p2,p3],vie w=[0..10,0..7]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }