{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 "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 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "#################### ##########################################" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "# Generate b's, from 1 to 55, since n1=55, we " } {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "# we won't access b eyond b55" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "###################### ########################################" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "num:=50;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "b:=Arra y(0...num+1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "b[0]:=1;" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "b[1]:=1/2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "for i from 1 to num do" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 " for j from i by -1 to 0 d o" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 " b[i+1]:=b [i+1]+(-1)^(i-j+2)*b[j]/(i-j+2)!;" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 " end do;" } {TEXT -1 0 "" }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "e nd do;" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "Digits:=14 ; # set up sig figs" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "for i from 1 to num+1 do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 " printf(\"b%d= %a or %a\\n\",i-1,b[i], convert(b[i],float));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 " printf( '``');" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "end do;" }{TEXT -1 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "##########################################################" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "# Generate formulas for sums i^k wh ere k=1..55" }{TEXT -1 0 "" }{MPLTEXT 1 0 1 " " }{TEXT -1 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "################################### ######################" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "m :=50; # upper bound for power" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "to t_sum:=Array(1..m); # contains sum of b(k)*(k'th diriv)" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 61 "sum_formulas:=Array(1..m); # contains formulas for final sums" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }{MPLTEXT 1 0 59 "#Two loops used to calculate \+ several formulas for summation" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "#Inner loop finds sum(b*diriv) until diriv=0" }{TEXT -1 0 "" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "for k from 1 to m do" }{TEXT -1 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 " funct:=n^k;" }{TEXT -1 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " integral:=int(funct,n);" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 " diriv:=funct;" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " tot_sum[k]:=0;" } {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " for i from 1 by \+ 1 while (diriv<>0) do" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " diriv:=diff(diriv,n);" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 " if (diriv<>0) then" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 " tot_sum[k]:=tot_sum[k]+b[i+1]*diriv; " }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 " end if;" } {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 " end do;" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }{TEXT -1 0 "" } {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 " C:=subs(n=1, (funct/2-integral-tot_sum[k]));" }{TEXT -1 0 "" }{TEXT -1 0 "" } {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 50 " sum_formulas [k]:=C+integral+funct/2+tot_sum[k];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "end do;" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "############################ ######" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "# print out sum formulas: " }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "################ ##################" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "printf(\"\\n \\n**SUM FORMULAS**\");" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "for i fr om 1 to m do" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " f actor(sum_formulas[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 " print f(\"\\nSUM i^%d = \",i);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 " lpri nt(factor(sum_formulas[i]));" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "end do;" }}}}{MARK "7 8 0" 7 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }
Make your own free website on Tripod.com