{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 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{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 "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times " 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 } {PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {SECT 0 {PARA 3 "" 0 "" {TEXT -1 16 "Approximating Pi" }} {PARA 256 "" 0 "" {TEXT -1 232 "Let us show you a quick way using a fe w commands to approximate pi. We are going to find the Taylor series \+ expansion of a trig function. Let us look at tan(pi/4)=1. We are goi ng to solve this for pi so we can get a taylor series:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "solve(tan(pi/4)=x,pi);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 394 "So, it seems t his is what we want a Taylor series for. To do this in Maple, we use \+ the command \"taylor(..)\". Taylor takes three arguements. The first is your function, the second is what the series will be centered at ( for our purposes, zero), and the third is the highest power you want t he series to go to. You can change this third parameter to add more t erms to your series if you wish." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "taylor(4*arctan(x), x=0, 8);" }}}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 256 "" 0 "" {TEXT -1 646 "Once you have the series you wish to l ook at, you can use it begin approximating pi. We use a complicated s tring of commands that starts with evalf(...) to numerically evaluate \+ our series. The parameter this command takes is the expression to be \+ evaluated. Our expression will be our series with a value substitued \+ for x. What value should we substitute for x? In our situation, we w ant to use x = 1 since 4arctan(1)=pi. We now have to use the mtaylor( ...) command. This takes three commands: your expression, the point \+ your series will be centered at (once again, zero for us), and the num ber of terms we will be using to approximate pi." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "evalf(subs(x =1, mtaylor(4*arctan(x), x=0, 8)));" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } {TEXT 264 331 "How close was your approximation to pi? Can you make i t closer? Sure! Increase the number of terms in your series and the \+ approximation will approach pi. Try to do so on the lines below (you \+ can copy and paste to make this easier). Compare your results to peop le that used different expressions or a different number of terms:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } {TEXT 265 130 "For all real applications we really only need pi correc t to about 10 places. Try to get one of your approximations that accu rate?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }{TEXT 266 296 "You can compare your answer to the actual value of p i by by calculating a percent error or check the number of correct dig its by subtracting your value from the actual value. Try some of thes e comparisons in Maple. Remember the actual value of pi is built in a nd is stored in the variable \"Pi\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "evalf(((Pi-(copy and paste result here))/Pi)*100);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{MARK "0 1 0" 6 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }