{VERSION 5 0 "Windows XP" "5.0" } {USTYLETAB {PSTYLE "Heading 4" -1 20 1 {CSTYLE "" -1 -1 "Times" 1 10 0 0 0 1 1 1 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Ord ered List 5" -1 200 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 144 2 0 2 2 -1 1 }{PSTYLE "Ordered List 1" -1 201 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Bullet Item" -1 15 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 }{PSTYLE "Lef t Justified Maple Output" -1 12 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Help" -1 10 1 {CSTYLE "" -1 -1 "Courier" 1 9 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Heading 1256" -1 202 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }3 1 0 0 8 4 2 0 2 0 2 2 -1 1 }{PSTYLE "Author" -1 19 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 8 8 2 0 2 0 2 2 -1 1 }{PSTYLE "Diagnost ic" -1 9 1 {CSTYLE "" -1 -1 "Courier" 1 10 64 128 64 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 8 2 2 0 2 0 2 2 -1 1 }{PSTYLE "Ordered List 3" -1 203 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 72 2 0 2 2 -1 1 } {PSTYLE "Maple Plot" -1 13 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Dash Item" -1 16 1 {CSTYLE "" -1 -1 "Tim es" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 } {PSTYLE "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Ordered List 4" -1 204 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 108 2 0 2 2 -1 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Line Printed Output" -1 6 1 {CSTYLE "" -1 -1 "Cour ier" 1 10 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "List Item" -1 14 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 }{PSTYLE "Warning" -1 7 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Error" -1 8 1 {CSTYLE "" -1 -1 "Cou rier" 1 10 255 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Fixed Width" -1 17 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Headin g 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 8 4 2 0 2 0 2 2 -1 1 }{PSTYLE "Title" -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 0 0 1 }3 1 0 0 12 12 2 0 2 0 2 2 -1 1 }{PSTYLE "Ordered List 2" -1 205 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 36 2 0 2 2 -1 1 }{CSTYLE " Help Variable" -1 25 "Courier" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "Text" -1 200 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "Help Bold" -1 39 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "Page Number" -1 33 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "2D Math Italic Small" -1 201 "Times" 1 1 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Nonterminal" -1 24 "Courier" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Default" -1 38 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Maple Comment" -1 21 "Courier" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Maple Input" -1 0 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "2D Math Small" -1 7 "Times" 1 1 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Fixed" -1 23 "Courier" 1 10 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Popup" -1 31 "Times" 1 12 0 128 128 1 1 2 1 2 2 2 0 0 0 1 }{CSTYLE "Plot Title" -1 27 "Times" 1 10 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D Input" -1 19 "Times" 1 12 255 0 0 1 2 2 2 2 1 2 0 0 0 1 }{CSTYLE "Copyright" -1 34 "Times" 1 10 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Maple Input Placeholder" -1 202 "Courier" 1 12 200 0 200 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "2D Math Bold Small" -1 10 "T imes" 1 1 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Notes" -1 37 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Help Underlined Bold" -1 41 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 0 0 0 1 }{CSTYLE "Hyperlink" -1 17 "T imes" 1 12 0 128 128 1 2 2 1 2 2 2 0 0 0 1 }{CSTYLE "2D Math Symbol 2" -1 16 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Plot Text" -1 28 "Times" 1 8 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Italic" -1 42 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "Output Labels " -1 29 "Times" 1 8 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Heading " -1 26 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Help Normal " -1 30 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "2D Comment" -1 18 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Maple N ame" -1 35 "Times" 1 12 104 64 92 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D O utput" -1 20 "Times" 1 12 0 0 255 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Dict ionary Hyperlink" -1 45 "Times" 1 12 147 0 15 1 2 2 1 2 2 2 0 0 0 1 } {CSTYLE "Help Emphasized" -1 22 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Italic Bold" -1 40 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "LaTeX" -1 32 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Menus" -1 36 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Prompt" -1 1 "Courier" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "Help Underlined" -1 44 "Times" 1 12 0 0 0 1 2 2 1 2 2 2 0 0 0 1 }{CSTYLE "Help Underlined Italic" -1 43 "Times" 1 12 0 0 0 1 1 2 1 2 2 2 0 0 0 1 }{CSTYLE "2D Math Bold" -1 5 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D Math Italic" -1 3 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{PSTYLE "" -1 206 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 8 4 2 0 2 0 2 2 -1 1 }{PSTYLE "" -1 207 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 8 4 2 0 2 0 2 2 -1 1 }{PSTYLE "" -1 208 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 8 4 2 0 2 0 2 2 -1 1 }} {SECT 0 {PARA 202 "" 0 "" {TEXT 203 15 "Runge's Example" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "restart;\n" }{MPLTEXT 1 0 12 "with( plots):" }}}{SECT 1 {PARA 206 "" 0 "" {TEXT 200 16 "Runge's Function" }}{EXCHG {PARA 0 "" 0 "" {TEXT 204 52 "Definition of Runge's function, and graph on [-1,1]." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "f := x -> \+ 1/(1+(5*x)^2);\n" }{MPLTEXT 1 0 54 "pf := plot(f(x), x=-1..1, color=gr een, thickness=2):\n" }{MPLTEXT 1 0 12 "display(pf);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 207 "" 0 "" {TEXT 200 46 "Polynomial Interpolation at Equidistant Points" }}{EXCHG {PARA 0 " " 0 "" {TEXT 204 7 "Define " }{XPPEDIT 18 0 "Typesetting:-mrow(Typeset ting:-mi(\"n\"));" "-I%mrowG6#/I+modulenameG6\"I,TypesettingGI(_syslib GF'6#-I#miGF$6#Q\"nF'" }{TEXT 204 49 ", the degree of the polynomial t o be used (i.e., " }{XPPEDIT 18 0 "Typesetting:-mrow(Typesetting:-mi( \"\"), Typesetting:-mrow(Typesetting:-mi(\"n\"), Typesetting:-mo(\"+\" , form = \"infix\", fence = \"false\", separator = \"false\", lspace = \"mediummathspace\", rspace = \"mediummathspace\", stretchy = \"false \", symmetric = \"false\", maxsize = \"infinity\", minsize = \"1\", la rgeop = \"false\", movablelimits = \"false\", accent = \"false\", font _style_name = \"2D Comment\", size = \"12\", foreground = \"[0,0,0]\", background = \"[255,255,255]\"), Typesetting:-mn(\"1\")), Typesetting :-mi(\"\"));" "-I%mrowG6#/I+modulenameG6\"I,TypesettingGI(_syslibGF'6% -I#miGF$6#Q!F'-F#6%-F,6#Q\"nF'-I#moGF$63Q\"+F'/%%formGQ&infixF'/%&fenc eGQ&falseF'/%*separatorGF=/%'lspaceGQ0mediummathspaceF'/%'rspaceGFB/%) stretchyGF=/%*symmetricGF=/%(maxsizeGQ)infinityF'/%(minsizeGQ\"1F'/%(l argeopGF=/%.movablelimitsGF=/%'accentGF=/%0font_style_nameGQ+2D~Commen tF'/%%sizeGQ#12F'/%+foregroundGQ([0,0,0]F'/%+backgroundGQ.[255,255,255 ]F'-I#mnGF$6#FNF+" }{TEXT 204 35 " distinct points are interpolated)." }}{PARA 0 "" 0 "" {TEXT 204 34 "Also define 2 arrays needed below." } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "n := 15;\n" }{MPLTEXT 1 0 26 "data _x := array(1..n+1):\n" }{MPLTEXT 1 0 24 "data_y := array(1..n+1):" }} }{EXCHG {PARA 0 "" 0 "" {TEXT 204 55 "Compute interpolation points (eq ually spaced in [-1,1])" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "for i fr om 0 to n do\n" }{MPLTEXT 1 0 31 " data_x[i+1] := -1 + i*2/n;\n" } {MPLTEXT 1 0 3 "od:" }{TEXT 204 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 204 52 "Generate data, i.e., sample Runge's function at the " } {XPPEDIT 18 0 "Typesetting:-mrow(Typesetting:-mi(\"\"), Typesetting:-m row(Typesetting:-mi(\"n\"), Typesetting:-mo(\"+\", form = \"infix\", f ence = \"false\", separator = \"false\", lspace = \"mediummathspace\", rspace = \"mediummathspace\", stretchy = \"false\", symmetric = \"fal se\", maxsize = \"infinity\", minsize = \"1\", largeop = \"false\", mo vablelimits = \"false\", accent = \"false\", font_style_name = \"2D Co mment\", size = \"12\", foreground = \"[0,0,0]\", background = \"[255, 255,255]\"), Typesetting:-mn(\"1\")), Typesetting:-mi(\"\"));" "-I%mro wG6#/I+modulenameG6\"I,TypesettingGI(_syslibGF'6%-I#miGF$6#Q!F'-F#6%-F ,6#Q\"nF'-I#moGF$63Q\"+F'/%%formGQ&infixF'/%&fenceGQ&falseF'/%*separat orGF=/%'lspaceGQ0mediummathspaceF'/%'rspaceGFB/%)stretchyGF=/%*symmetr icGF=/%(maxsizeGQ)infinityF'/%(minsizeGQ\"1F'/%(largeopGF=/%.movableli mitsGF=/%'accentGF=/%0font_style_nameGQ+2D~CommentF'/%%sizeGQ#12F'/%+f oregroundGQ([0,0,0]F'/%+backgroundGQ.[255,255,255]F'-I#mnGF$6#FNF+" } {TEXT 204 18 " points of data_x." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "for i from 1 to n+1 do\n" }{MPLTEXT 1 0 31 " data_y[i] := f(data_x[ i]);\n" }{MPLTEXT 1 0 4 "od: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT 204 12 "Use Maple's " }{HYPERLNK 17 "interp" 2 "interp" "" }{TEXT 204 47 " co mmand to compute the polynomial interpolant." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "p := x -> interp(data_x, data_y, x):\n" }{MPLTEXT 1 0 12 "'p(x)'=p(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 204 55 "Plot inter polant together with original Runge function " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 126 "points := plot([seq([data_x[i],data_y[i]], i=1..n+1) ], style=point, symbol=diamond, symbolsize=20, color=blue, thickness=2 ):\n" }{MPLTEXT 1 0 52 "pp := plot(p(x), x=-1..1, color=red, thickness =2):\n" }{MPLTEXT 1 0 24 "display(points, pp, pf);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 208 "" 0 "" {TEXT 200 44 "Polynomial Interpolation at Chebyshev Points" }{TEXT 205 0 "" }} {EXCHG {PARA 0 "" 0 "" {TEXT 204 24 "Compute Chebyshev points" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "for i from 0 to n do\n" }{MPLTEXT 1 0 51 " data_x[i+1] := evalf(cos((2*i+1)/(2*n+2)*Pi));\n" }{MPLTEXT 1 0 3 "od:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 204 62 "Generate data, i. e., sample Runge function at Chebyshev points" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "for i from 1 to n+1 do\n" }{MPLTEXT 1 0 31 " data_y [i] := f(data_x[i]);\n" }{MPLTEXT 1 0 3 "od:" }}}{EXCHG {PARA 0 "" 0 " " {TEXT 204 30 "Compute polynomial interpolant" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "p := x -> interp(data_x, data_y, x):\n" }{MPLTEXT 1 0 14 "'p(x)' = p(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 204 55 "Plot int erpolant together with original Runge function " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 126 "points := plot([seq([data_x[i],data_y[i]], i=1..n+1) ], style=point, symbol=diamond, symbolsize=20, color=blue, thickness=2 ):\n" }{MPLTEXT 1 0 52 "pp := plot(p(x), x=-1..1, color=red, thickness =2):\n" }{MPLTEXT 1 0 24 "display(points, pp, pf);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}} {MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 15 10 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }