(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 55676, 1623]*) (*NotebookOutlinePosition[ 79790, 2496]*) (* CellTagsIndexPosition[ 79746, 2492]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[{ StyleBox[ "Numerical Methods: Mathematica 3.0 Notebooks\n(c) John H. Mathews, 1998", FontSize->18, FontColor->RGBColor[1, 0, 1]], StyleBox["\n", FontSize->18], StyleBox["To accompany the text:", FontColor->RGBColor[1, 0, 0]], "\n", StyleBox[ "Numerical Methods: for Mathematics, \nScience, and Engineering, 2", FontSize->18, FontColor->RGBColor[0, 0, 1]], StyleBox["nd", FontSize->14, FontColor->RGBColor[0, 0, 1], FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox[" Ed, 1992", FontSize->18, FontColor->RGBColor[0, 0, 1]], StyleBox["\n", FontSize->18], StyleBox[ "Prentice Hall, Inc.\nSimon & Schuster, One Lake Street\nUpper Saddle \ River, New Jersey 07458 U.S.A.", FontSize->18, FontColor->RGBColor[0, 1, 1]], StyleBox["\n", FontSize->18], StyleBox[ "Prentice Hall, Inc.; USA, Canada, Mexico ISBN 0-13-624990-6\nPrentice \ Hall, International Editions: ISBN 0-13-625047-5\nwww.Prenhall.com", FontSize->14, FontColor->RGBColor[0, 1, 0]], StyleBox["\n", FontSize->14], StyleBox[ "This free software is compliments of the author.\nE-mail address: in%\ \"mathews@fullerton.edu\"", FontSize->14, FontColor->RGBColor[1, 0, 1]] }], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True], Cell[TextData[StyleBox["CONTENTS", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0, 1]]], "Text", Evaluatable->False, TextAlignment->Center, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Chapter 4. Interpolation and Polynomial Approximation", FontWeight->"Bold"], "\n\t", StyleBox["Algorithm 4.1 ", FontWeight->"Bold"], StyleBox["Evaluation of a Taylor Series", FontColor->RGBColor[1, 0, 1]], ".\n\t", StyleBox["Algorithm 4.2 ", FontWeight->"Bold"], StyleBox["Polynomial Calculus", FontColor->RGBColor[1, 0, 1]], ".\n\t", StyleBox["Algorithm 4.3 ", FontWeight->"Bold"], StyleBox["Lagrange Approximation", FontColor->RGBColor[1, 0, 1]], ".\n\t", StyleBox["Algorithm 4.4 ", FontWeight->"Bold"], StyleBox["Nested Multiplication with Multiple Centers", FontColor->RGBColor[1, 0, 1]], ".\n\t", StyleBox["Algorithm 4.5 ", FontWeight->"Bold"], StyleBox["Newton Interpolation Polynomial", FontColor->RGBColor[1, 0, 1]], ".\n\t", StyleBox["Algorithm 4.6 ", FontWeight->"Bold"], StyleBox["Chebyshev Approximation", FontColor->RGBColor[1, 0, 1]], "." }], "Text", Evaluatable->False, AspectRatioFixed->True, FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ RowBox[{ StyleBox[\(Clear["\"]\), "MR"], StyleBox[";", "MR"], "\n", \(Off[General::"\"]\), ";", "\n", "\t", \(Clear[a, A, A0, c, c0, Chebyshev, Cpolys, DiffPoly, f, f0, Horner, IntPoly, j, k, Lagrange, n, NestMult, NewtonP, p, prod, P, P0, s0, s1, sum, SumTaylor, t, term, tol, TaylorCoeff, x, x0, X, X0, Y, XY, XY0]\), ";", "\n", \(On[General::"\"]\), ";"}]], "Input", InitializationCell->True], Cell[TextData[{ StyleBox["Algorithm 4.1 ", FontWeight->"Bold"], StyleBox["Evaluation of a Taylor Series", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".", FontWeight->"Bold"], " To approximate\n", Cell[BoxData[ RowBox[{\(P \((x)\)\), " ", "=", " ", RowBox[{ RowBox[{ StyleBox[ UnderoverscriptBox["\[Sum]", StyleBox[\(k = 0\), FontSize->10], "\[Infinity]"], FontSize->18], FractionBox[ StyleBox[ RowBox[{ SuperscriptBox["f", TagBox[\((k)\), Derivative], MultilineFunction->None], \((x\_0)\), \(\((x - x\_0)\)\^k\)}], FontSize->12], StyleBox[\(k!\), FontSize->12]]}], " ", "=", " ", RowBox[{ StyleBox[ UnderoverscriptBox["\[Sum]", StyleBox[\(k = 0\), FontSize->10], "\[Infinity]"], FontSize->18], FractionBox[ StyleBox[\(D \((k)\) \((x - x\_0)\)\^k\), FontSize->12], StyleBox[\(k!\), FontSize->12]]}]}]}]]], ",\nby computing a partial sum with at most n terms. \n", StyleBox["Section 4.1 Taylor Series & Calculation of Functions Page 203", FontWeight->"Bold"] }], "Text", CellFrame->True, Evaluatable->False, AspectRatioFixed->True], Cell["\<\ Only a finite number of terms can be accumulated. Hence, the summation \ process is terminated when consecutive partial sums differ by less than the \ preassigned value Tol .\ \>", "Text", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Execute this cell to activate", FontWeight->"Bold", FontColor->RGBColor[0, 1, 0]], " ", StyleBox["Evaluation of a Taylor Series", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".\n", FontWeight->"Bold"], StyleBox[ "TaylorCoeff[f0_,x0_,n_]\nSumTaylor[c0_,x_,x0_,tol_]\nf0_ is the function \ f(x),\nx0_ is the value for the center,\nn_ is the degree of the polynomial,\n\ c0_ is the coefficient list,\nx_ is the variable for evaluating the \ polynomial,\ntol_ is the tolerance.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Off[General::"\"]; \)\), \(\(Clear[TaylorCoeff, f0, x0, n]; \)\), \(\(TaylorCoeff[f0_, x0_, n_] := \n\t Module[{f, s0, s1, X}, \n\t\tSet@@{f[x_], f0}; \n\ \ \ \ \ \ s0 = Normal[Series[f[x], {x, x0, n}]]; \n\ \ \ \ \ \ s1 = ReplaceAll[s0, x \[Rule] X + x0]; \n\ \ \ \ \ \ c = CoefficientList[s1, X]; \n\ \ \ \ \ \ Print["\"]; \n\ \ \ \ \ \ Print[f[x], "\< expanded about x = \>", x0]; \n\ \ \ \ \ \ Print[c]; ]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[BoxData[{ \(\(Clear[SumTaylor, c0, x, x0, tol]; \)\), \(SumTaylor[c0_, x_, x0_, tol_] := \n\t Module[{k, n, prod, sum}, \n\ \ \ \ \ \ c = c0; \n\t\tn = Length[c]; \n \t\tsum = 0; \n\t\tprod = 1; \n\t\t For[k = 1, k \[LessEqual] n, \(k++\), \n\t\t\t \(Module[{absval, term}, \n\t\t\t\tprod = prod\ \((x - x0)\); \n \ \ \ \ \ \ \ \ \ term = c\[LeftDoubleBracket]k\[RightDoubleBracket]\ prod; \n \ \ \ \ \ \ \ \ \ absval = N[Abs[term]]; \n\ \ \ \ \ \ \ \ \ If[0 < absval && absval \[LessEqual] tol, Break[]]; \n \ \ \ \ \ \ \ \ \ sum = sum + term]; \)]; \n\ \ \ \ \ \ \ \ \ Return[N[sum, 20]]; ]; \n\(On[General::"\"]; \)\)}], "Input",\ InitializationCell->True, AspectRatioFixed->False] }, Open ]] }, Closed]], Cell[TextData[{ "\n", StyleBox["Chapter 4, Example for Taylor polynomials, Page 203-204.", FontWeight->"Bold"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(TaylorCoeff[Sin[x], 0, 11]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(SumTaylor[c, 1.0, 0, 0.01]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(SumTaylor[c, 1.0, 0, 0.001]\)], "Input"], Cell[BoxData[ \(SumTaylor[c, 1.0, 0, 0.0001]\)], "Input"], Cell[BoxData[ \(SumTaylor[c, 1.0, 0, 0.00001]\)], "Input"], Cell[TextData[{ " The summation process was terminated s terminated when the magnitude \ of the term to be added was less than 0.001, 0.0001 and 0.0000001 \ respectively.\n If the goal it to evaluate the Taylor polynomial of a \ fixed degree, then it is easiest to use ", StyleBox["Mathematica", FontSlant->"Italic"], "'s built in procedures. For example, consider the 11-th degree Taylor \ polynomial for sin(x): " }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(f[x_]\ = \ Sin[x]; \nn\ = \ 11; \n P[x_] = Normal[Series[f[x], {x, 0, 11}]]; \nPrint["\< f[x] = \>", f[x]]; \nPrint[\*"\"\<\!\(P\_11\)[x] = \>\"", P[x]]; \n Print[\*"\"\<\!\(P\_11\)[1] = \>\"", P[1]]; \n Print[\*"\"\<\!\(P\_11\)[1] = \>\"", N[P[1], 20]]; \)], "Input", AspectRatioFixed->True], Cell["\<\ Notice that all the terms in the Taylor polynomial were added in the \ computation of P[1]. Compare this with the previous method:\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(SumTaylor[c, 1, 0, 0.000001]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(SumTaylor[c, 1, 0, 0.00000001]\)], "Input", AspectRatioFixed->True], Cell["\<\ Notice that the magnitude of the last term is smaller than 0.000001 and \ larger than 0.00000001, so that it was added in when we requested \ SumTaylor[c,1,0,0.00000001], but was not added into the previous sum.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Algorithm 4.2 ", FontWeight->"Bold"], StyleBox["Polynomial Calculus", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".", FontWeight->"Bold"], " To evaluate the polynomial ", Cell[BoxData[ \(P \((x)\)\)]], " its derivative ", Cell[BoxData[ RowBox[{ SuperscriptBox["P", "\[Prime]", MultilineFunction->None], \((x)\)}]]], ", and integral ", Cell[BoxData[ \(\[Integral]P \((x)\) \[DifferentialD]x\)]], " by performing synthetic division.\n", StyleBox["Section 4.2 Introduction to Interpolation Page 212", FontWeight->"Bold"] }], "Text", CellFrame->True, Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Execute this cell to activate", FontWeight->"Bold", FontColor->RGBColor[0, 1, 0]], " ", StyleBox["Polynomial Calculus", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".\n", FontWeight->"Bold"], StyleBox[ "Horner[P0_,t_]\nDiffPoly[P0_,t_]\nIntPoly[P0_,t_]\nP0_ is the polynomial,\n\ t_ is the variable.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Off[General::"\"]; \)\), \(\(Clear[Horner, P0, t, x]; \)\), \(\(Horner[P0_, t_] := \n\t Module[{c, P, k, n, X}, \n\t\tSet@@{P[x_], P0}; \n\t\t\ X = \(Variables[P[x]]\)\[LeftDoubleBracket]1\[RightDoubleBracket]; \n \t\t\ c = CoefficientList[P[x], X]; \n\t\t\ n = Length[c] - 1; \n \t\t\ poly = c\[LeftDoubleBracket]n + 1\[RightDoubleBracket]; \n\t\t\ For[k = n - 1, 0 \[LessEqual] k, \(k--\), \n\t\t\t poly = c\[LeftDoubleBracket]k + 1\[RightDoubleBracket] + poly\ t]; \n\t\tReturn[poly]; ]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[BoxData[{ \(\(Clear[DiffPoly, P0, t, x]; \)\), \(\(DiffPoly[P0_, t_] := \n\t Block[{c, P, k, n, X}, \n\t\tSet@@{P[x_], P0}; \n\t\t\ X = \(Variables[P[x]]\)\[LeftDoubleBracket]1\[RightDoubleBracket]; \n \t\t\ c = CoefficientList[P[x], X]; \n\t\t\ n = Length[c] - 1; \n \t\t\ diff = n\ c\[LeftDoubleBracket]n + 1\[RightDoubleBracket]; \n \t\t\ For[k = n - 1, 1 \[LessEqual] k, \(k--\), \n\t\t\t\ diff = k\ c\[LeftDoubleBracket]k + 1\[RightDoubleBracket] + diff\ t]; \n\t\tReturn[diff]; ]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[BoxData[{ \(\(Clear[IntPoly, P0, t, x]; \)\), \(IntPoly[P0_, t_] := \n\t Block[{c, P, k, n, X}, \n\t\tSet@@{P[x_], P0}; \n\t\t\ X = \(Variables[P[x]]\)\[LeftDoubleBracket]1\[RightDoubleBracket]; \n \t\t\ c = CoefficientList[P[x], X]; \n\t\t\ n = Length[c] - 1; \n \t\t\ intpol = c\[LeftDoubleBracket]n + 1\[RightDoubleBracket]\/\(n + 1\); \n\t\t\ For[k = n, 1 \[LessEqual] k, \(k--\), \n\t\t\t intpol = c\[LeftDoubleBracket]k\[RightDoubleBracket]\/k + intpol\ t]; \n \t\tintpol = intpol\ t; \n\t\t\ Return[intpol]; ]; \n \(On[General::"\"]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False] }, Open ]] }, Closed]], Cell["\<\ This example is for illustration purposes only. In practice one should \ modify the procedure to input the coefficient c. Put the following \ polynomial in nested form.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[P, Q, x]; \n\(P[x_] = 3\ x\^3 - 2\ x\^2 + 5\ x - 7; \n Q[x_] = Horner[P[x], x]; \nPrint["\", P[x]]; \n Print["\", Q[x]]; \)\)], "Input", AspectRatioFixed->False], Cell[TextData[{ " We can verify that ", StyleBox["Mathematica", FontSlant->"Italic"], " has stored the two forms of the polynomial differently by looking at them \ with FullForm." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(FullForm[P[x]]\)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(FullForm[Q[x]]\)], "Input", AspectRatioFixed->True], Cell["Evaluate the nested form Q(1) and compare with P(1).", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print["\", P[1]]; \nPrint["\", Q[1]]; \)], "Input"], Cell["\<\ Verify that the two forms of the polynomial are equivalent by expanding \ Q(x)..\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print["\", Q[x]]; \nPrint["\", Expand[Q[x]]]; \n Print["\", P[x]]; \)], "Input"], Cell["\<\ Now consider the derivative of the polynomial P(x). Put the derivative of the polynomial in nested form.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ RowBox[{ \(dP[x_] = DiffPoly[P[x], x]\), ";", "\n", \(Print["\< P[x] = \>", P[x]]\), ";", "\n", RowBox[{"Print", "[", RowBox[{"\"\<\!\( \*SuperscriptBox[\(P\), \(\[Prime]\), MultilineFunction->None]\)[x] = \>\"", ",", RowBox[{ SuperscriptBox["P", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "]"}], ";", "\n", \(Print["\", dP[x]]\), ";"}]], "Input"], Cell["Evaluate the derivative of P(x) at a specified value of x.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ RowBox[{\(Print["\", dP[1]]\), ";", "\n", RowBox[{"Print", "[", RowBox[{"\"\< \!\( \*SuperscriptBox[\(P\), \(\[Prime]\), MultilineFunction->None]\)[1] = \>\"", ",", RowBox[{ SuperscriptBox["P", "\[Prime]", MultilineFunction->None], "[", "1", "]"}]}], "]"}], ";"}]], "Input"], Cell["Verify that the two forms of the derivative are equivalent.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ RowBox[{ \(Print["\", dP[x]]\), ";", "\n", \(Print["\", Expand[dP[x]]]\), ";", "\n", RowBox[{"Print", "[", RowBox[{"\"\<\!\( \*SuperscriptBox[\(P\), \(\[Prime]\), MultilineFunction->None]\)[x] = \>\"", ",", RowBox[{ SuperscriptBox["P", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "]"}], ";"}]], "Input"], Cell["\<\ Now consider the integral of the polynomial P(x). Put the integral of the polynomial in nested form.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(\(Clear[V, x]; \)\), \(V[x_] = \[Integral]P[x] \[DifferentialD]x; \niP[x_] = IntPoly[P[x], x]; \nPrint["\< P[x] = \>", P[x]]; \n Print["\< \[Integral]P[x]\[DifferentialD]x = \>", V[x]]; \n Print["\< V[x] = \>", V[x]]; \n Print["\< \[Integral]P[x]\[DifferentialD]x = \>", iP[x]]; \n Print["\< iP[x] = \>", iP[x]]; \)}], "Input", AspectRatioFixed->False], Cell["Evaluate the integral of P(x) at x = 1.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print["\", iP[1]]; \nPrint["\< V[1] = \>", V[1]]; \)], "Input"], Cell["Verify that the two forms of the integral are equivalent.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print["\", iP[x]]; \nPrint["\", Expand[iP[x]]]; \n Print["\< V[x] = \>", V[x]]; \)], "Input"], Cell[TextData[{ StyleBox["Algorithm 4.3 ", FontWeight->"Bold"], StyleBox["Lagrange Approximation", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".", FontWeight->"Bold"], " To evaluate the Lagrange polynomial\n\t", Cell[BoxData[ RowBox[{" ", RowBox[{\(P \((x)\)\), " ", "=", " ", RowBox[{ StyleBox[ UnderoverscriptBox["\[Sum]", StyleBox[\(k = 0\), FontSize->10], StyleBox["n", FontSize->10]], FontSize->18], \(y\_k\ \(L\_\(n, k\)\) \((x)\)\)}]}]}]]], " of degree n, based on the n+1 points ", Cell[BoxData[ \(\((x\_k, y\_k)\)\)]], " for ", Cell[BoxData[ \(k = 0, 1, \[CenterEllipsis], n\)]], ".\n", StyleBox["Section 4.3 Lagrange Approximation Page 224", FontWeight->"Bold"] }], "Text", CellFrame->True, Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "The Lagrange coefficient polynomials for degree n are:\n", Cell[BoxData[ RowBox[{\(\(L\_\(n, k\)\) \((x)\)\), "=", FractionBox[ RowBox[{ StyleBox[ RowBox[{"(", RowBox[{"x", " ", "-", " ", SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], "0"]}], ")"}], FontFamily->"Monaco"], StyleBox["\[CenterEllipsis]", FontFamily->"Monaco"], StyleBox[ RowBox[{"(", RowBox[{"x", " ", "-", " ", SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], \(k - 1\)]}], ")"}], FontFamily->"Monaco"], StyleBox[ RowBox[{ StyleBox["(", FontFamily->"Monaco"], RowBox[{ StyleBox["x", FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], StyleBox["-", FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], \(k + 1\)]}], StyleBox[")", FontFamily->"Monaco"]}], FontSize->12], StyleBox["\[CenterEllipsis]", FontFamily->"Monaco"], RowBox[{ StyleBox["(", FontFamily->"Monaco", FontSize->12], StyleBox[ RowBox[{ StyleBox["x", FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], StyleBox["-", FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], "n"]}], FontSize->12], StyleBox[")", FontFamily->"Monaco", FontSize->12]}]}], RowBox[{ StyleBox[" ", FontFamily->"Monaco"], RowBox[{ StyleBox[ RowBox[{"(", RowBox[{\(x\_k\), " ", "-", " ", SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], "0"]}], ")"}], FontFamily->"Monaco", FontSize->12], StyleBox["\[CenterEllipsis]", FontFamily->"Monaco", FontSize->12], StyleBox[ RowBox[{"(", RowBox[{\(x\_k\), " ", "-", " ", SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], \(k - 1\)]}], ")"}], FontFamily->"Monaco", FontSize->12], StyleBox[ RowBox[{ StyleBox["(", FontFamily->"Monaco"], RowBox[{ StyleBox[\(x\_k\), FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], StyleBox["-", FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], \(k + 1\)]}], StyleBox[")", FontFamily->"Monaco"]}], FontSize->12], StyleBox["\[CenterEllipsis]", FontFamily->"Monaco", FontSize->12], RowBox[{ StyleBox["(", FontFamily->"Monaco", FontSize->12], StyleBox[ RowBox[{ StyleBox[\(x\_k\), FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], StyleBox["-", FontFamily->"Monaco"], StyleBox[" ", FontFamily->"Monaco"], SubscriptBox[ StyleBox["x", FontFamily->"Monaco"], "n"]}], FontSize->12], StyleBox[")", FontFamily->"Monaco", FontSize->12]}]}]}]]}]]], " for ", Cell[BoxData[ \(k = 0, 1, \[CenterEllipsis], n\)]], "." }], "Text"], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Execute this cell to activate", FontWeight->"Bold", FontColor->RGBColor[0, 1, 0]], " ", StyleBox["Lagrange Approximation", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".\n", FontWeight->"Bold"], StyleBox[ "Lagrange[XY0_,t_]\nXY0_ is the list of points,\nt_ is the variable.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[{ \(\(Off[General::"\"]; \)\), \(\(Clear[Lagrange, XY0, t]; \)\), \(Lagrange[XY0_, t_] := \n\t Block[{j, k, n, prod, sum, term, X, Y, XY}, \n\t\tXY = XY0; \n\t\t\ n = Length[XY] - 1; \n\t\t\ X = \(Transpose[XY]\)\[LeftDoubleBracket]1\[RightDoubleBracket]; \n \t\t\ Y = \(Transpose[XY]\)\[LeftDoubleBracket]2\[RightDoubleBracket]; \n \t\t\ sum = 0; \n\t\t\ Clear[P, L]; \n\t\t\ For[k = 0, k \[LessEqual] n, \(k++\), \n\t\t\tprod = 1; \n\t\t\t For[j = 0, j \[LessEqual] n, \(j++\), \n\t\t\t\t term = Which[j == k, 1, j \[NotEqual] k, \(t - X\[LeftDoubleBracket]j + 1\[RightDoubleBracket]\)\/\(X \[LeftDoubleBracket]k + 1\[RightDoubleBracket] - X\[LeftDoubleBracket]j + 1\[RightDoubleBracket]\)]; \n \t\t\t\tprod = prod\ term]; \n\t\t\tL[k, x_] = prod; \n\t\t\t sum = sum + Y\[LeftDoubleBracket]k + 1\[RightDoubleBracket]\ prod]; \n\t\tP[x_] = sum; \n\t\tReturn[P[x]]; ]; \n \(On[General::"\"]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False] }, Closed]], Cell[TextData[{ StyleBox["Chapter 4, Example 4.7, Page 215.", FontWeight->"Bold"], "\nConstruct two linear Lagrange interpolating polynomials for the function\ \nf(x) = cos(x) over [0.0, 1.2] using different interpolation nodes." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[f, P1, Q1, x]; \nf[x_] = Cos[x]; \n XY = {{0.0, f[0.0]}, {1.2, f[1.2]}}; \nP1[x_] = Lagrange[XY, x]; \n Q1[x_] = Expand[P1[x]]; \nPrint["\", f[x]]; \n Print["\", XY]; \nPrint[\*"\"\<\!\(P\_1\)[x] = \>\"", P1[x]]; \nPrint[\*"\"\<\!\(Q\_1\)[x] = \>\"", Q1[x]]; \)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(\(\ dots = ListPlot[XY, PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \n gr1 = Plot[{f[x], Q1[x]}, {x, 0.0, 1.2}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[gr1, dots, PlotRange \[Rule] {{0, 1.3}, {0.0, 1.15}}, AxesLabel \[Rule] {"\", "\"}, PlotLabel \[Rule] \*"\"\\"", DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_1\)[x] = \>\"", P1[x]]; \)\)], "Input", AspectRatioFixed->False], Cell[TextData[{ "Compare with ", StyleBox["Mathematica", FontSlant->"Italic"], "'s built in Fit procedure." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print[\*"\"\<\!\(R\_1\)[x] = \>\"", Fit[XY, {1, x}, x]]; \n Print[\*"\"\<\!\(Q\_1\)[x] = \>\"", Q1[x]]; \)], "Input", AspectRatioFixed->True], Cell["Construct the other Lagrange polynomials of degree n=1.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[f, P2, Q2, x]; \nf[x_] = Cos[x]; \n XY = {{0.2, f[0.2]}, {1.0, f[1.0]}}; \nP2[x_] = Lagrange[XY, x]; \n Q2[x_] = Expand[P2[x]]; \nPrint["\", f[x]]; \n Print["\", XY]; \nPrint[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \nPrint[\*"\"\<\!\(Q\_2\)[x] = \>\"", Q2[x]]; \)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(dots = ListPlot[XY, PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \n gr2 = Plot[{f[x], Q2[x]}, {x, 0.0, 1.2}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[gr2, dots, PlotRange \[Rule] {{0, 1.3}, {0.0, 1.15}}, AxesLabel \[Rule] {"\", "\"}, PlotLabel \[Rule] \*"\"\\"", DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \)], "Input", AspectRatioFixed->False], Cell["\<\ Notice that the two polynomials of degree n=1 were different.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print[\*"\"\<\!\(P\_1\)[x] = \>\"", P1[x]]; \n Print[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \)], "Input"], Cell[TextData[{ "\n", StyleBox["Chapter 4, Example 4.8, Page 218. ", FontWeight->"Bold"], "Form several Lagrange polynomials \nof degree n = 2 and n = 3 for the \ function f(x) = cos(x)." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["\<\ First, construct the Lagrange interpolation polynomial of degree n = 2.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[f, P2, Q2, x]; \nf[x_] = Cos[x]; \n XY = {{0.0, f[0.0]}, {0.6, f[0.6]}, {1.2, f[1.2]}}; \n P2[x_] = Lagrange[XY, x]; \nQ2[x_] = Expand[P2[x]]; \n Print["\", f[x]]; \nPrint["\", XY]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \n Print[\*"\"\<\!\(Q\_2\)[x] = \>\"", Q2[x]]; \)], "Input", AspectRatioFixed->False], Cell[TextData[{ "Compare with ", StyleBox["Mathematica", FontSlant->"Italic"], "'s Fit procedure." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print[\*"\"\<\!\(R\_2\)[x] = \>\"", Fit[XY, {1, x, x\^2}, x]]; \n Print[\*"\"\<\!\(Q\_2\)[x] = \>\"", Q2[x]]; \)], "Input", AspectRatioFixed->True], Cell[BoxData[{ \(\(dots = ListPlot[XY, PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \)\), \(\(Print["\", f[x]]; \)\), \(gr3 = Plot[{f[x], Q2[x]}, {x, \(-0.6\), 2.1}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[gr3, dots, PlotRange \[Rule] {{\(-0.6\), 2.1}, {\(-0.6\), 1.05}}, AxesLabel \[Rule] {"\", "\"}, PlotLabel \[Rule] \*"\"\\"", DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \)}], "Input", AspectRatioFixed->False], Cell["\<\ Second, construct the Lagrange interpolation polynomial of degree n = 3.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[f, P3, Q3, x]; \nf[x_] = Cos[x]; \n XY = {{0.0, f[0.0]}, {0.4, f[0.4]}, {0.8, f[0.8]}, {1.2, f[1.2]}}; \n P3[x_] = Lagrange[XY, x]; \nQ3[x_] = Expand[P3[x]]; \n Print["\", f[x]]; \nPrint["\", XY]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_3\)[x] = \>\"", P3[x]]; \n Print[\*"\"\<\!\(Q\_3\)[x] = \>\"", Q3[x]]; \)], "Input", AspectRatioFixed->False], Cell[TextData[{ "Compare with ", StyleBox["Mathematica", FontSlant->"Italic"], "'s Fit procedure." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Print[\*"\"\<\!\(R\_3\)[x] = \>\"", Fit[XY, {1, x, x\^2, x\^3}, x]]; \n Print[\*"\"\<\!\(Q\_3\)[x] = \>\"", Q3[x]]; \)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(dots = ListPlot[XY, PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \n gr4 = Plot[{f[x], Q3[x]}, {x, \(-0.6\), 2.1}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[gr4, dots, PlotRange \[Rule] {{\(-0.6\), 2.1}, {\(-0.6\), 1.05}}, AxesLabel \[Rule] {"\", "\"}, PlotLabel \[Rule] \*"\"\\"", DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_3\)[x] = \>\"", P3[x]]; \)], "Input", AspectRatioFixed->False], Cell[TextData[{ StyleBox["Algorithm 4.4 ", FontWeight->"Bold"], StyleBox["Nested Multiplication with Multiple Centers", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".", FontWeight->"Bold"], " \nTo evaluate the Newton form of a polynomial\n", Cell[BoxData[ \(P \((x)\)\ = \ a\_0 + \(a\_1\) \((x - x\_0)\) + \(a\_2\) \((x - x\_0)\)\ \((x - x\_1)\) + \(a\_3\) \((x - x\_0)\)\ \((x - x\_1)\)\ \((x - x\_2)\)\n \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ + \[CenterEllipsis] + \(a\_n\) \((x - x\_0)\)\ \((x - x\_1)\)\ \((x - x\_2)\)\ \[CenterEllipsis] \((x - x\_\(n - 1\))\)\)]], "\nwith multiple centers ", Cell[BoxData[ \(x\_0, x\_1, x\_2, \ \[CenterEllipsis], x\_\(n - 1\)\)]], ".\n", StyleBox["Section 4.4 Newton Polynomials Page 233", FontWeight->"Bold"] }], "Text", CellFrame->True, Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Execute this cell to activate", FontWeight->"Bold", FontColor->RGBColor[0, 1, 0]], " ", StyleBox["Nested Multiplication with Multiple Centers", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".", FontWeight->"Bold"], " \n", StyleBox[ "NestMult[A0_,X0_,n_,t_]\nA0_ is the list of coefficients,\nX0_ is the list \ of centers,\nn_ is the degree,\nt_ is the variable.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[{ \(\(Off[General::"\"]; \)\), \(\(Clear[NestMult, A0, X0, n, t]; \)\), \(NestMult[A0_, X0_, n_, t_] := \n\t Block[{A, X, k}, \n\t\tA = A0; \n\t\tX = X0; sum = A\[LeftDoubleBracket]n + 1\[RightDoubleBracket]; \n\t\t For[k = n, 1 \[LessEqual] k, \(k--\), \n\t\t\t sum = sum\ \((t - X\[LeftDoubleBracket]k\[RightDoubleBracket])\) + A\[LeftDoubleBracket]k\[RightDoubleBracket]]; \n\t\t Return[sum]; ]; \n\(On[General::"\"]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False] }, Closed]], Cell["What is nested multiplication? See Page 228.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(\(Clear[A, X, a, x]; \)\), \(A = Table[a[i], {i, 5}]\), \(X = Table[x[i], {i, 4}]\)}], "Input", AspectRatioFixed->False], Cell[BoxData[ \(NestMult[A, X, 1, x]\)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(NestMult[A, X, 2, x]\)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(NestMult[A, X, 3, x]\)], "Input", AspectRatioFixed->False], Cell[TextData[{ "\n", StyleBox["Chapter 4, Example 4.11, Page 228. ", FontWeight->"Bold"], "Using nested multiplication, evaluate\n", Cell[BoxData[ \(\(P\_3\) \((x)\)\ = \ \((\((\(-0.1\) \((x - 4)\) + 0.5)\) \((x\ - 3)\) - 2)\) \((x - 1)\) + 5\)]], "." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(Clear[A, P, x, X]; \n\(A = {5, \(-2\), 0.5, \(-0.1\)}; \)\), \(X = {1, 3, 4}; \nP[x_]\ = \ NestMult[A, X, 3, x]; \n Print["\< P[x] = \>", P[x]]; \nPrint["\", P[2.5]]; \)}], "Input", AspectRatioFixed->False], Cell[TextData[{ StyleBox["Algorithm 4.5 ", FontWeight->"Bold"], StyleBox["Newton Interpolation Polynomial", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".", FontWeight->"Bold"], " To construct and evaluate the \nNewton polynomial of degree ", StyleBox["\[LessEqual]", FontFamily->"Times"], " n that passes through ", Cell[BoxData[ \(\((x\_k, y\_k)\)\ = \ \((x\_k, f \((x\_k)\))\)\)]], ",\nfor ", Cell[BoxData[ \(k = 0, 1, \[CenterEllipsis], n\)]], ": \n", Cell[BoxData[ \(P \((x)\)\ = \ d\_\(0, 0\) + \(a\_1\) \((x - x\_0)\) + \(d\_\(1, 1\)\) \((x - x\_0)\)\ \((x - x\_1)\) + \(d\_\(2, 2\)\) \((x - x\_0)\)\ \((x - x\_1)\)\ \((x - x\_2)\)\n \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ + \[CenterEllipsis] + \(d\_\(n, n\)\) \((x - x\_0)\)\ \((x - x\_1)\)\ \((x - x\_2)\)\ \[CenterEllipsis] \((x - x\_\(n - 1\))\)\)]], "\nwhere d", StyleBox["k,0", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], " = y", StyleBox["k", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], " and d", StyleBox["k,j", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], " = (d", StyleBox["k,j-1", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], " - d", StyleBox["k-1,j-1", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], ")/(x", StyleBox["k", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], " - x", StyleBox["k-j", FontSize->9, FontVariations->{"CompatibilityType"->"Subscript"}], "). \n", StyleBox["Section 4.4 Newton Polynomials Page 234", FontWeight->"Bold"] }], "Text", CellFrame->True, Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ "The next loop will construct the divided difference table for f(x) based \ on the n points \n", Cell[BoxData[ \(x\_1, x\_2, \[CenterEllipsis], x\_\(n + 1\)\)]], ". Then it will simplify the diagonal coefficients. Then it will take the \ \nlimit to get derivatives ", Cell[BoxData[ RowBox[{ SuperscriptBox["f", "\[Prime]", MultilineFunction->None], \((x\_1)\)}]]], ".\n\nIn ", StyleBox["Mathematica", FontSlant->"Italic"], ", the coefficients are stored as \"function\" values x[k]. The following \ \nversion is part of the Tangent Curves paper and it uses equally spaced \ abscissas." }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell["\<\ Remark: This is not the general Newton polynomial where the abscissas are \ arbitrary, i.e. not necessarily equally spaced.\ \>", "Text", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Execute this cell to activate", FontWeight->"Bold", FontColor->RGBColor[0, 1, 0]], " ", StyleBox["Newton Interpolation Polynomial", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".\n", FontWeight->"Bold"], StyleBox["NewtonP[XY0_]\nXY0_ is the list of points.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[{ \(\(Off[General::"\"]; \)\), \(Clear[NewtonP]; \n NewtonP[XY0_] := \n\t Block[{j, k, n, a, p, sum, X, Y}, \n\t\t X = \(Transpose[XY0]\)\[LeftDoubleBracket]1\[RightDoubleBracket]; \n \t\tY = \(Transpose[XY0]\)\[LeftDoubleBracket]2\[RightDoubleBracket]; \n\t\tn = Length[XY0] - 1; \n\t\td = Table[0, {n + 1}, {n + 1}]; \n \t\ta = Table[0, {n + 1}]; \n\t\tp = Table[0, {n + 1}]; \n\t\t For[k = 0, k \[LessEqual] n, \(k++\), \(d\[LeftDoubleBracket]k + 1, 1\[RightDoubleBracket] = Y\[LeftDoubleBracket]k + 1\[RightDoubleBracket]; \)]; \n\t\t For[j = 1, j \[LessEqual] n, \(j++\), \n\t\t\t \(For[k = j, k \[LessEqual] n, \(k++\), \n\t\t\t\t d\[LeftDoubleBracket]k + 1, j + 1\[RightDoubleBracket] = \(d\[LeftDoubleBracket]k + 1, j\[RightDoubleBracket] - d\[LeftDoubleBracket]k, j\[RightDoubleBracket]\)\/\(X \[LeftDoubleBracket]k + 1\[RightDoubleBracket] - X\[LeftDoubleBracket]k - j + 1\[RightDoubleBracket]\)]; \)]; \n\t\t For[k = 0, k \[LessEqual] n, \(k++\), \n\t\t\t \(a\[LeftDoubleBracket]k + 1\[RightDoubleBracket] = Together[d\[LeftDoubleBracket]k + 1, k + 1\[RightDoubleBracket]]; \)]; \n\t\tp\[LeftDoubleBracket]1\[RightDoubleBracket] = 1; \n\t\t For[k = 1, k \[LessEqual] n, \(k++\), \n\t\t\t p\[LeftDoubleBracket]k + 1\[RightDoubleBracket] = p\[LeftDoubleBracket]k\[RightDoubleBracket]\ \((x - X\[LeftDoubleBracket]k\[RightDoubleBracket])\)]; \n\t\t sum = 0; \n\t\t For[k = 0, k \[LessEqual] n, \(k++\), \n\t\t\t \(sum = sum + a\[LeftDoubleBracket]k + 1\[RightDoubleBracket]\ p\[LeftDoubleBracket]k + 1\[RightDoubleBracket]; \)]; \n\t\t sum = ReplaceAll[sum, h \[Rule] H]; \n\t\tReturn[sum]; ]; \n \(On[General::"\"]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False] }, Closed]], Cell[TextData[{ "\n", StyleBox["Chapter 4, Exercise 7, Page 235.", FontWeight->"Bold"], "\nFind the Newton polynomial of degree n=4, and evaluate it at x = 2.5, \ \nfor the data points (1, 3.6), (2, 1.8), (3, 1.2), (4, 0.9), (5, 0.72)" }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[P4, x, xy]; \n xy = {{1, 3.6}, {2, 1.8}, {3, 1.2}, {4, 0.9}, {5, 0.72}}; \n Print["\", xy]; \nPrint["\"]; \n P4[x_] = NewtonP[xy]; \nPrint[\*"\"\<\!\(P\_4\)[x] = \>\"", P4[x]]; \n Print[\*"\"\<\!\(P\_4\)[2.5] = \>\"", P4[2.5]]; \)], "Input", AspectRatioFixed->True], Cell["The divided difference table for this example is:", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(TableForm[d]\)], "Input", AspectRatioFixed->False], Cell[TextData[{ "\n", StyleBox["Chapter 4, Example 4.13, Page 231.", FontWeight->"Bold"], "\nConstruct Netwon polynomials of degree n = 1,2,3 for f(x) = cos(x)." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Clear[f, P1, i, x, xy]; \nf[x_] = Cos[x]; \n xy = Table[{i, N[f[i]]}, {i, 0, 1}]; \nPrint["\", f[x]]; \n Print["\", xy]; \nPrint["\"]; \n P1[x_] = NewtonP[xy]; \nPrint[\*"\"\<\!\(P\_1\)[x] = \>\"", P1[x]]; \)], "Input"], Cell[BoxData[ \(dots = ListPlot[xy, PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \n g1 = Plot[{f[x], P1[x]}, {x, 0, 3.4}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[g1, dots, PlotRange \[Rule] {{0, 3.4}, {\(-1.1\), 1.1}}, PlotLabel \[Rule] \*"\"\\"", AxesLabel \[Rule] {"\", "\"}, DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_1\)[x] = \>\"", P1[x]]; \)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(Clear[f, P2, i, x, xy]; \nf[x_] = Cos[x]; \n xy = Table[{i, N[f[i]]}, {i, 0, 2}]; \nPrint["\", f[x]]; \n Print["\", xy]; \nPrint["\"]; \n P2[x_] = NewtonP[xy]; \nPrint[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \)], "Input"], Cell[BoxData[ \(dots = ListPlot[xy, PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \n g2 = Plot[{f[x], P2[x]}, {x, 0, 3.4}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[g2, dots, PlotRange \[Rule] {{0, 3.4}, {\(-1.1\), 1.1}}, PlotLabel \[Rule] \*"\"\\"", AxesLabel \[Rule] {"\", "\"}, DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(Clear[f, P3, i, x, xy]; \nf[x_] = Cos[x]; \n xy = Table[{i, N[f[i]]}, {i, 0, 3}]; \nPrint["\", f[x]]; \n Print["\", xy]; \nPrint["\"]; \n P3[x_] = NewtonP[xy]; \nPrint[\*"\"\<\!\(P\_3\)[x] = \>\"", P3[x]]; \)], "Input"], Cell[BoxData[{ \(\(dots = ListPlot[xy, PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \)\), \(\(pointset = Point/@xy; \)\), \(\(graphset = Prepend[pointset, PointSize[0.02]]; \)\), \(dots = Graphics[graphset]; \n g3 = Plot[{f[x], P3[x]}, {x, 0, 3.4}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[g3, dots, PlotRange \[Rule] {{0, 3.4}, {\(-1.1\), 1.1}}, PlotLabel \[Rule] \*"\"\\"", AxesLabel \[Rule] {"\", "\"}, DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_3\)[x] = \>\"", P3[x]]; \)}], "Input", AspectRatioFixed->False], Cell[TextData[{ StyleBox["Algorithm 4.6 ", FontWeight->"Bold"], StyleBox["Chebyshev Approximation", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".", FontWeight->"Bold"], " To construct and evaluate the Chebyshev interpolating polynomial of \ degree n over the interval ", Cell[BoxData[ \(\([\(-1\), 1]\)\)]], ", where ", Cell[BoxData[ RowBox[{\(P \((x)\)\), " ", "=", " ", RowBox[{ UnderoverscriptBox[ StyleBox["\[Sum]", FontSize->18], StyleBox[\(j = 0\), FontSize->10], StyleBox["n", FontSize->10]], \(c\_j\ \(T\_j\) \((x)\)\)}]}]]], " is based on the nodes ", Cell[BoxData[ \(x\_k\ = \ cos \((\(\((2 k + 1)\) \[Pi]\)\/\(2 n + 2\))\)\)]], ".\n", StyleBox["Section 4.5 Chebyshev Polynomials Page 246", FontWeight->"Bold"] }], "Text", CellFrame->True, Evaluatable->False, AspectRatioFixed->True], Cell["First, execute the following group of cells:", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Execute this cell to activate", FontWeight->"Bold", FontColor->RGBColor[0, 1, 0]], " ", StyleBox["Chebyshev Approximation", FontWeight->"Bold", FontColor->RGBColor[1, 0, 1]], StyleBox[".\n", FontWeight->"Bold"], StyleBox[ "Cpolys[n_]\nChebyshev[f0_,n_]\nChebyshevPoly[f0_,n_]\nf0_ is the function \ f(x),\nn_ is the degree.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(Off[General::"\"]; \)\), \(\(Clear[Cpolys, n]; \)\), \(\(Cpolys[n_] := \n\t Block[{j}, \n\t\tT[0, x_] = 1; \n\t\tT[1, x_] = x; \n\t\t For[j = 1, j \[LessEqual] n - 1, \(j++\), \n\t\t\t Tj1x = 2\ x\ T[j, x] - T[j - 1, x]; \n\t\t\t T[j + 1, x_] = Simplify[Tj1x]]; \n\t\t For[j = 0, j \[LessEqual] n, \(j++\), \n\t\t\t \(Print["\"\_j, "\<(x) = \>", T[j, x]]; \)]; ]; \)\)}], "Input",\ InitializationCell->True, AspectRatioFixed->False], Cell[BoxData[ \(Clear[Chebyshev, f0, n]; \n Chebyshev[f0_, n_] := \n\t Block[{f, j, k, sum}, \n\t\tSet@@{f[x_], f0}; \n\t\tClear[X, Y, c, T]; \n\t\tX = Table[0, {n + 1}]; \n\t\tY = Table[0, {n + 1}]; \n\t\t h = \[Pi]\/\(2\ n + 2\); \n\t\t For[k = 0, k \[LessEqual] n, \(k++\), \n\t\t\t X\[LeftDoubleBracket]k + 1\[RightDoubleBracket] = Cos[\((2\ k + 1)\)\ h]; \n\t\t\t Y\[LeftDoubleBracket]k + 1\[RightDoubleBracket] = f[X\[LeftDoubleBracket]k + 1\[RightDoubleBracket]]; \n\t\t\t c[k] = 0]; \n\t\t For[k = 0, k \[LessEqual] n, \(k++\), \n\t\t\tZ = \((2\ k + 1)\)\ h; \n\t\t\tFor[j = 0, j \[LessEqual] n, \(j++\), \n\t\t\t\t c[j] = c[j] + Y\[LeftDoubleBracket]k + 1\[RightDoubleBracket]\ Cos[j\ Z]]]; \n\t\tc[0] = c[0]\/\(n + 1\); \n\t\t For[j = 1, j \[LessEqual] n, \(j++\), \n\t\t\t c[j] = \(2\ c[j]\)\/\(n + 1\)]; \n\t\tsum = 0; \n\t\tT[0, x_] = 1; \n\t\tT[1, x_] = x; \n\t\t For[j = 1, j \[LessEqual] n - 1, \(j++\), \n\t\t\t Tj1x = 2\ x\ T[j, x] - T[j - 1, x]; \n\t\t\t T[j + 1, x_] = Simplify[Tj1x]]; \n\t\t For[j = 0, j \[LessEqual] n, \(j++\), \n\t\t\t sum = sum + c[j]\ T[j, x]]; \n\t\tsum = Expand[sum]; \n\t\t Return[N[sum]]; ]; \n\(On[General::"\"]; \)\)], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[{ "The subroutine given above uses our recursive formulas for the Chebyshev \ polynomials. The following version uses ", StyleBox["Mathematica", FontSlant->"Italic"], "'s built-in functions. Both give the same results." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(\(Clear[ChebyshevPoly, f0, n]; \)\), \(\(ChebyshevPoly[f0_, n_] := Block[{f, h, j, k}, \n\ \ \ Set@@{f[x_], f0}; \n\ \ \ Clear[X, Y, c]; \n \ \ \ h = N[\[Pi]\/\(2\ n + 2\)]; \n\ \ \ X = Table[Cos[\((2\ k + 1)\)\ h], {k, 0, n}]; \n\ \ \ Y = f[X]; \n \ \ \ c = Table[0, {k, 0, n}]; \n\ \ \ For[k = 0, k \[LessEqual] n, \(k++\), \n\ \ \ \ \ \ Z = \((2\ k + 1)\)\ h; \n\ \ \ \ \ \ cosZ = Table[Cos[\((j - 1)\)\ Z], {j, 1, n + 1}]; \n\ \ \ c = c + Y\[LeftDoubleBracket]k + 1\[RightDoubleBracket]\ cosZ]; \n \ \ \ c\[LeftDoubleBracket]0 + 1\[RightDoubleBracket] = 1\/2\ c\[LeftDoubleBracket]0 + 1\[RightDoubleBracket]; \n\ \ \ c = \(2\ c\)\/\(n + 1\); \n\ \ \ CP = Expand[ \[Sum]\+\(j = 0\)\%n c\[LeftDoubleBracket]j + 1\[RightDoubleBracket]\ ChebyshevT[j, x]]; \n\ \ \ Return[CP]]; \)\)}], "Input", InitializationCell->True, AspectRatioFixed->False] }, Open ]] }, Closed]], Cell["First, generate some Chebyshev polynomials.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(Cpolys[5]\)], "Input", AspectRatioFixed->False], Cell[TextData[{ "Compare with ", StyleBox["Mathematica", FontSlant->"Italic"], "'s built in function." }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(\(Print[\*"\"\<\!\(T\_5\)(x) = \>\"", ChebyshevT[5, x]]; \)\)], "Input"], Cell[TextData[{ "\n", StyleBox["Example 4.12, Page 205. ", FontWeight->"Bold"], "Investigate a Chebyshev polynomial for ", Cell[BoxData[ \(\[ExponentialE]\^x\)]], "." }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[BoxData[ \(Clear[f, P2, T2, x]; \nf[x_] = Exp[x]; \nP2[x_] = Chebyshev[f[x], 2]; \n Print["\< f[x] = \>", f[x]]; \nPrint["\"]; \nPrint[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \n Print[\*"\"\<\!\(P\_2\)[x] = \>\"", ChebyshevPoly[f[x], 2]]; \)], "Input",\ AspectRatioFixed->True], Cell[BoxData[ \(dots = ListPlot[Transpose[{X, Y}], PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \n g2 = Plot[{f[x], P2[x]}, {x, \(-1\), 1}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[g2, dots, AxesLabel \[Rule] {"\", "\"}, DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(P\_2\)[x] = \>\"", P2[x]]; \)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(e[x_] = Exp[x] - P2[x]; \n gr = Plot[e[x], {x, \(-1\), 1}, PlotStyle \[Rule] {RGBColor[0, 0, 1]}]; \n Print["\"]; \n Print[\*"\"\\"", e[x]]; \)], "Input", AspectRatioFixed->False], Cell["\<\ Find the error bound for the Chebyshev approximation. The error at the right endpoint.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(xr\ = \ 1.0; \nyr\ = \ e[xr]; \n Print["\", xr, \*"\"\<] - \!\(P\_2\)[\>\"", xr, "\<] = \>", yr]; \)], "Input"], Cell["The error at the local minimum.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(sol = FindMinimum[e[x], {x, 0.5}]; \n xm\ = \ sol\[LeftDoubleBracket]2, 1, 2\[RightDoubleBracket]; \n ym\ = \ sol\[LeftDoubleBracket]1\[RightDoubleBracket]; \n Print["\", xm, \*"\"\<] - \!\(P\_2\)[\>\"", xm, "\<] = \>", ym]; \)], "Input", AspectRatioFixed->True], Cell["The error bound for the Chebyshev polynomial is:", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(eset\ = \ {Abs[ym], Abs[yr]}; \nbdd\ = \ Max[Abs[ym], Abs[yr]]; \n Print["\"]; \n Print["\", eset]; \n Print["\", bdd]; \)], "Input", AspectRatioFixed->True], Cell["\<\ Compare with the Taylor polynomial approximation, and compare the error \ bounds.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(T2[x_] = Normal[Series[Exp[x], {x, 0, 2}]]; \n Print["\< f[x] = \>", f[x]]; \nPrint["\"]; \n Print[\*"\"\<\!\(T\_2\)[x] = \>\"", T2[x]]; \)], "Input", AspectRatioFixed->True], Cell[BoxData[ \(dots = ListPlot[Transpose[{X, Y}], PlotStyle \[Rule] {PointSize[0.02]}, DisplayFunction \[Rule] Identity]; \n g2 = Plot[{f[x], T2[x]}, {x, \(-1\), 1}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}, DisplayFunction \[Rule] Identity]; \n Show[g2, dots, AxesLabel \[Rule] {"\", "\"}, DisplayFunction \[Rule] $DisplayFunction]; \n Print["\", f[x]]; \n Print["\"]; \n Print[\*"\"\<\!\(T\_2\)[x] = \>\"", T2[x]]; \)], "Input", AspectRatioFixed->False], Cell[BoxData[ \(e[x_] = Exp[x] - T2[x]; \n gr = Plot[e[x], {x, \(-1\), 1}, PlotStyle \[Rule] {RGBColor[0, 0, 1]}, PlotRange \[Rule] {{\(-1\), 1}, {\(-0.15\), 0.25}}]; \n Print["\"]; \n Print[\*"\"\\"", e[x]]; \)], "Input", AspectRatioFixed->False], Cell["\<\ Find the error bound for the Chebyshev approximation. The error at the left endpoint.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(xl\ = \ \(-1.0\); \nyl\ = \ e[xl]; \n Print["\", xl, \*"\"\<] - \!\(T\_2\)[\>\"", xl, "\<] = \>", yl]; \)], "Input"], Cell["The error at the right endpoint.", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(xr\ = \ 1.0; \nyr\ = \ e[xr]; \n Print["\", xr, \*"\"\<] - \!\(T\_2\)[\>\"", xr, "\<] = \>", yr]; \)], "Input"], Cell["The error bound for the Taylor polynomial is:", "Text", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[ \(eset\ = \ {Abs[yl], Abs[yr]}; \nbdd\ = \ Max[Abs[yl], Abs[yr]]; \n Print["\"]; \n Print["\", eset]; \n Print["\", bdd]; \)], "Input", AspectRatioFixed->True], Cell["\<\ The error the Chebyshev polynomial is less than the error for the Taylor \ polynomial.\ \>", "Text", Evaluatable->False, AspectRatioFixed->True] }, FrontEndVersion->"Microsoft Windows 3.0", ScreenRectangle->{{0, 640}, {0, 452}}, AutoGeneratedPackage->None, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{594, 354}, WindowMargins->{{2, Automatic}, {Automatic, -2}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, 128}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, CharacterEncoding->"MacintoshAutomaticEncoding", StyleDefinitions -> Notebook[{ Cell[CellGroupData[{ Cell["Style Definitions", "Subtitle"], Cell["\<\ Modify the definitions below to change the default appearance of all cells in \ a given style. Make modifications to any definition using commands in the \ Format menu.\ \>", "Text"], Cell[CellGroupData[{ Cell["Style Environment Names", "Section"], Cell[StyleData[All, "Working"], PageWidth->WindowWidth, ScriptMinSize->9], Cell[StyleData[All, "Presentation"], PageWidth->WindowWidth, ScriptMinSize->12, FontSize->16], Cell[StyleData[All, "Condensed"], PageWidth->WindowWidth, CellBracketOptions->{"Margins"->{1, 1}, "Widths"->{0, 5}}, ScriptMinSize->8, FontSize->11], Cell[StyleData[All, "Printout"], PageWidth->PaperWidth, ScriptMinSize->5, FontSize->10, PrivateFontOptions->{"FontType"->"Outline"}] }, Closed]], Cell[CellGroupData[{ Cell["Notebook Options", "Section"], Cell["\<\ The options defined for the style below will be used at the Notebook level.\ \>", "Text"], Cell[StyleData["Notebook"], PageHeaders->{{Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"], None, Cell[ TextData[ { ValueBox[ "FileName"]}], "Header"]}, {Cell[ TextData[ { ValueBox[ "FileName"]}], "Header"], None, Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"]}}, CellFrameLabelMargins->6, StyleMenuListing->None] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Headings", "Section"], Cell[CellGroupData[{ Cell[StyleData["Title"], CellMargins->{{12, Inherited}, {20, 40}}, CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False, CounterIncrements->"Title", CounterAssignments->{{"Section", 0}, {"Equation", 0}, {"Figure", 0}, { "Subtitle", 0}, {"Subsubtitle", 0}}, FontFamily->"Helvetica", FontSize->36, FontWeight->"Bold"], Cell[StyleData["Title", "Presentation"], CellMargins->{{24, 10}, {20, 40}}, LineSpacing->{1, 0}, FontSize->44], Cell[StyleData["Title", "Condensed"], CellMargins->{{8, 10}, {4, 8}}, FontSize->20], Cell[StyleData["Title", "Printout"], CellMargins->{{2, 10}, {15, 30}}, FontSize->24] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subtitle"], CellMargins->{{12, Inherited}, {10, 15}}, CellGroupingRules->{"TitleGrouping", 10}, PageBreakBelow->False, CounterIncrements->"Subtitle", CounterAssignments->{{"Section", 0}, {"Equation", 0}, {"Figure", 0}, { "Subsubtitle", 0}}, FontFamily->"Helvetica", FontSize->24], Cell[StyleData["Subtitle", "Presentation"], CellMargins->{{24, 10}, {15, 20}}, LineSpacing->{1, 0}, FontSize->36], Cell[StyleData["Subtitle", "Condensed"], CellMargins->{{8, 10}, {4, 4}}, FontSize->14], Cell[StyleData["Subtitle", "Printout"], CellMargins->{{2, 10}, {10, 15}}, FontSize->18] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subsubtitle"], CellMargins->{{12, Inherited}, {10, 20}}, CellGroupingRules->{"TitleGrouping", 20}, PageBreakBelow->False, CounterIncrements->"Subsubtitle", CounterAssignments->{{"Section", 0}, {"Equation", 0}, {"Figure", 0}}, FontFamily->"Helvetica", FontSize->14, FontSlant->"Italic"], Cell[StyleData["Subsubtitle", "Presentation"], CellMargins->{{24, 10}, {10, 20}}, LineSpacing->{1, 0}, FontSize->24], Cell[StyleData["Subsubtitle", "Condensed"], CellMargins->{{8, 10}, {8, 12}}, FontSize->12], Cell[StyleData["Subsubtitle", "Printout"], CellMargins->{{2, 10}, {8, 10}}, FontSize->14] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Section"], CellDingbat->"\[FilledSquare]", CellMargins->{{25, Inherited}, {8, 24}}, CellGroupingRules->{"SectionGrouping", 30}, PageBreakBelow->False, CounterIncrements->"Section", CounterAssignments->{{"Subsection", 0}, {"Subsubsection", 0}}, FontFamily->"Helvetica", FontSize->16, FontWeight->"Bold"], Cell[StyleData["Section", "Presentation"], CellMargins->{{40, 10}, {11, 32}}, LineSpacing->{1, 0}, FontSize->24], Cell[StyleData["Section", "Condensed"], CellMargins->{{18, Inherited}, {6, 12}}, FontSize->12], Cell[StyleData["Section", "Printout"], CellMargins->{{13, 0}, {7, 22}}, FontSize->14] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subsection"], CellDingbat->"\[FilledSmallSquare]", CellMargins->{{22, Inherited}, {8, 20}}, CellGroupingRules->{"SectionGrouping", 40}, PageBreakBelow->False, CounterIncrements->"Subsection", CounterAssignments->{{"Subsubsection", 0}}, FontSize->14, FontWeight->"Bold"], Cell[StyleData["Subsection", "Presentation"], CellMargins->{{36, 10}, {11, 32}}, LineSpacing->{1, 0}, FontSize->22], Cell[StyleData["Subsection", "Condensed"], CellMargins->{{16, Inherited}, {6, 12}}, FontSize->12], Cell[StyleData["Subsection", "Printout"], CellMargins->{{9, 0}, {7, 22}}, FontSize->12] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Subsubsection"], CellDingbat->"\[FilledSmallSquare]", CellMargins->{{22, Inherited}, {8, 18}}, CellGroupingRules->{"SectionGrouping", 50}, PageBreakBelow->False, CounterIncrements->"Subsubsection", FontWeight->"Bold"], Cell[StyleData["Subsubsection", "Presentation"], CellMargins->{{34, 10}, {11, 26}}, LineSpacing->{1, 0}, FontSize->18], Cell[StyleData["Subsubsection", "Condensed"], CellMargins->{{17, Inherited}, {6, 12}}, FontSize->10], Cell[StyleData["Subsubsection", "Printout"], CellMargins->{{9, 0}, {7, 14}}, FontSize->11] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Body Text", "Section"], Cell[CellGroupData[{ Cell[StyleData["Text"], CellMargins->{{12, 10}, {7, 7}}, LineSpacing->{1, 3}, CounterIncrements->"Text"], Cell[StyleData["Text", "Presentation"], CellMargins->{{24, 10}, {10, 10}}, LineSpacing->{1, 5}], Cell[StyleData["Text", "Condensed"], CellMargins->{{8, 10}, {6, 6}}, LineSpacing->{1, 1}], Cell[StyleData["Text", "Printout"], CellMargins->{{2, 2}, {6, 6}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["SmallText"], CellMargins->{{12, 10}, {6, 6}}, LineSpacing->{1, 3}, CounterIncrements->"SmallText", FontFamily->"Helvetica", FontSize->9], Cell[StyleData["SmallText", "Presentation"], CellMargins->{{24, 10}, {8, 8}}, LineSpacing->{1, 5}, FontSize->12], Cell[StyleData["SmallText", "Condensed"], CellMargins->{{8, 10}, {5, 5}}, LineSpacing->{1, 2}, FontSize->9], Cell[StyleData["SmallText", "Printout"], CellMargins->{{2, 2}, {5, 5}}, FontSize->7] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Input/Output", "Section"], Cell["\<\ The cells in this section define styles used for input and output to the \ kernel. Be careful when modifying, renaming, or removing these styles, \ because the front end associates special meanings with these style names.\ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Input"], CellMargins->{{45, 10}, {5, 7}}, Evaluatable->True, CellGroupingRules->"InputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, CellLabelMargins->{{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultInputFormatType, AutoItalicWords->{}, FormatType->InputForm, ShowStringCharacters->True, NumberMarks->True, CounterIncrements->"Input", FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], Cell[StyleData["Input", "Presentation"], CellMargins->{{72, Inherited}, {8, 10}}, LineSpacing->{1, 0}], Cell[StyleData["Input", "Condensed"], CellMargins->{{40, 10}, {2, 3}}], Cell[StyleData["Input", "Printout"], CellMargins->{{39, 0}, {4, 6}}, FontSize->9] }, Closed]], Cell[StyleData["InputOnly"], Evaluatable->True, CellGroupingRules->"InputGrouping", CellHorizontalScrolling->True, DefaultFormatType->DefaultInputFormatType, AutoItalicWords->{}, FormatType->InputForm, ShowStringCharacters->True, NumberMarks->True, CounterIncrements->"Input", StyleMenuListing->None, FontWeight->"Bold"], Cell[CellGroupData[{ Cell[StyleData["Output"], CellMargins->{{47, 10}, {7, 5}}, CellEditDuplicate->True, CellGroupingRules->"OutputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, CellLabelMargins->{{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, AutoItalicWords->{}, FormatType->InputForm, CounterIncrements->"Output", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Output", "Presentation"], CellMargins->{{72, Inherited}, {10, 8}}, LineSpacing->{1, 0}], Cell[StyleData["Output", "Condensed"], CellMargins->{{41, Inherited}, {3, 2}}], Cell[StyleData["Output", "Printout"], CellMargins->{{39, 0}, {6, 4}}, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Message"], CellMargins->{{45, Inherited}, {Inherited, Inherited}}, CellGroupingRules->"OutputGrouping", PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, CellLabelMargins->{{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, AutoItalicWords->{}, FormatType->InputForm, CounterIncrements->"Message", StyleMenuListing->None, FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Message", "Presentation"], CellMargins->{{72, Inherited}, {Inherited, Inherited}}, LineSpacing->{1, 0}], Cell[StyleData["Message", "Condensed"], CellMargins->{{41, Inherited}, {Inherited, Inherited}}], Cell[StyleData["Message", "Printout"], CellMargins->{{39, Inherited}, {Inherited, Inherited}}, FontSize->8, FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Print"], CellMargins->{{45, Inherited}, {Inherited, Inherited}}, CellGroupingRules->"OutputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, CellLabelMargins->{{11, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, AutoItalicWords->{}, FormatType->InputForm, CounterIncrements->"Print", StyleMenuListing->None, FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Print", "Presentation"], CellMargins->{{72, Inherited}, {Inherited, Inherited}}, LineSpacing->{1, 0}], Cell[StyleData["Print", "Condensed"], CellMargins->{{41, Inherited}, {Inherited, Inherited}}], Cell[StyleData["Print", "Printout"], CellMargins->{{39, Inherited}, {Inherited, Inherited}}, FontSize->8] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Graphics"], CellMargins->{{4, Inherited}, {Inherited, Inherited}}, CellGroupingRules->"GraphicsGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, DefaultFormatType->DefaultOutputFormatType, FormatType->InputForm, CounterIncrements->"Graphics", ImageMargins->{{43, Inherited}, {Inherited, 0}}, StyleMenuListing->None], Cell[StyleData["Graphics", "Presentation"], ImageMargins->{{62, Inherited}, {Inherited, 0}}], Cell[StyleData["Graphics", "Condensed"], ImageSize->{175, 175}, ImageMargins->{{38, Inherited}, {Inherited, 0}}], Cell[StyleData["Graphics", "Printout"], ImageSize->{250, 250}, ImageMargins->{{30, Inherited}, {Inherited, 0}}, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["CellLabel"], StyleMenuListing->None, FontFamily->"Helvetica", FontSize->9, FontColor->RGBColor[0, 0, 1]], Cell[StyleData["CellLabel", "Presentation"], FontSize->12], Cell[StyleData["CellLabel", "Condensed"], FontSize->9], Cell[StyleData["CellLabel", "Printout"], FontFamily->"Courier", FontSize->8, FontSlant->"Italic", FontColor->GrayLevel[0]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Formulas and Programming", "Section"], Cell[CellGroupData[{ Cell[StyleData["InlineFormula"], CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, ScriptLevel->1, SingleLetterItalics->True], Cell[StyleData["InlineFormula", "Presentation"], CellMargins->{{24, 10}, {10, 10}}, LineSpacing->{1, 5}], Cell[StyleData["InlineFormula", "Condensed"], CellMargins->{{8, 10}, {6, 6}}, LineSpacing->{1, 1}], Cell[StyleData["InlineFormula", "Printout"], CellMargins->{{2, 0}, {6, 6}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DisplayFormula"], CellMargins->{{42, Inherited}, {Inherited, Inherited}}, CellHorizontalScrolling->True, ScriptLevel->0, SingleLetterItalics->True, StyleMenuListing->None, UnderoverscriptBoxOptions->{LimitsPositioning->True}], Cell[StyleData["DisplayFormula", "Presentation"], LineSpacing->{1, 5}], Cell[StyleData["DisplayFormula", "Condensed"], LineSpacing->{1, 1}], Cell[StyleData["DisplayFormula", "Printout"]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Styles for Headers and Footers", "Section"], Cell[StyleData["Header"], CellMargins->{{0, 0}, {4, 1}}, StyleMenuListing->None, FontSize->10, FontSlant->"Italic"], Cell[StyleData["Footer"], CellMargins->{{0, 0}, {0, 4}}, StyleMenuListing->None, FontSize->9, FontSlant->"Italic"], Cell[StyleData["PageNumber"], CellMargins->{{0, 0}, {4, 1}}, StyleMenuListing->None, FontFamily->"Times", FontSize->10] }, Closed]], Cell[CellGroupData[{ Cell["Palette Styles", "Section"], Cell["\<\ The cells below define styles that define standard ButtonFunctions, for use \ in palette buttons.\ \>", "Text"], Cell[StyleData["Paste"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, After]}]&)}], Cell[StyleData["Evaluate"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], SelectionEvaluate[ FrontEnd`InputNotebook[ ], All]}]&)}], Cell[StyleData["EvaluateCell"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], FrontEnd`SelectionMove[ FrontEnd`InputNotebook[ ], All, Cell, 1], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[ ], All]}]&)}], Cell[StyleData["CopyEvaluate"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[ ], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], FrontEnd`SelectionEvaluate[ FrontEnd`InputNotebook[ ], All]}]&)}], Cell[StyleData["CopyEvaluateCell"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[ ], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[ ], #, All], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[ ], All]}]&)}] }, Closed]], Cell[CellGroupData[{ Cell["Hyperlink Styles", "Section"], Cell["\<\ The cells below define styles useful for making hypertext ButtonBoxes. The \ \"Hyperlink\" style is for links within the same Notebook, or between \ Notebooks.\ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Hyperlink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookLocate[ #2]}]&), Active->True, ButtonNote->ButtonData}], Cell[StyleData["Hyperlink", "Presentation"]], Cell[StyleData["Hyperlink", "Condensed"]], Cell[StyleData["Hyperlink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell["\<\ The following styles are for linking automatically to the on-line help \ system.\ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["MainBookLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "MainBook", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["MainBookLink", "Presentation"]], Cell[StyleData["MainBookLink", "Condensed"]], Cell[StyleData["MainBookLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["AddOnsLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontFamily->"Courier", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "AddOns", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["AddOnsLink", "Presentation"]], Cell[StyleData["AddOnsLink", "Condensed"]], Cell[StyleData["AddOnLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["RefGuideLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontFamily->"Courier", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "RefGuideLink", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["RefGuideLink", "Presentation"]], Cell[StyleData["RefGuideLink", "Condensed"]], Cell[StyleData["RefGuideLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["GettingStartedLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "GettingStarted", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["GettingStartedLink", "Presentation"]], Cell[StyleData["GettingStartedLink", "Condensed"]], Cell[StyleData["GettingStartedLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["OtherInformationLink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "OtherInformation", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["OtherInformationLink", "Presentation"]], Cell[StyleData["OtherInformationLink", "Condensed"]], Cell[StyleData["OtherInformationLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Placeholder Styles", "Section"], Cell["\<\ The cells below define styles useful for making placeholder objects in \ palette templates.\ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Placeholder"], Editable->False, Selectable->False, StyleBoxAutoDelete->True, Placeholder->True, StyleMenuListing->None], Cell[StyleData["Placeholder", "Presentation"]], Cell[StyleData["Placeholder", "Condensed"]], Cell[StyleData["Placeholder", "Printout"]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["SelectionPlaceholder"], Editable->False, Selectable->False, StyleBoxAutoDelete->True, Placeholder->Primary, StyleMenuListing->None, DrawHighlighted->True], Cell[StyleData["SelectionPlaceholder", "Presentation"]], Cell[StyleData["SelectionPlaceholder", "Condensed"]], Cell[StyleData["SelectionPlaceholder", "Printout"]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["FormatType Styles", "Section"], Cell["\<\ The cells below define styles that are mixed in with the styles of most \ cells. If a cell's FormatType matches the name of one of the styles defined \ below, then that style is applied between the cell's style and its own \ options.\ \>", "Text"], Cell[StyleData["CellExpression"], PageWidth->Infinity, CellMargins->{{6, Inherited}, {Inherited, Inherited}}, ShowCellLabel->False, ShowSpecialCharacters->False, AllowInlineCells->False, AutoItalicWords->{}, StyleMenuListing->None, FontFamily->"Courier", Background->GrayLevel[1]], Cell[StyleData["InputForm"], AllowInlineCells->False, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["OutputForm"], PageWidth->Infinity, TextAlignment->Left, LineSpacing->{1, -5}, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["StandardForm"], LineSpacing->{1.25, 0}, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["TraditionalForm"], LineSpacing->{1.25, 0}, SingleLetterItalics->True, TraditionalFunctionNotation->True, DelimiterMatching->None, StyleMenuListing->None], Cell["\<\ The style defined below is mixed in to any cell that is in an inline cell \ within another.\ \>", "Text"], Cell[StyleData["InlineCell"], TextAlignment->Left, ScriptLevel->1, StyleMenuListing->None], Cell[StyleData["InlineCellEditing"], StyleMenuListing->None, Background->RGBColor[1, 0.749996, 0.8]] }, Closed]] }, Open ]] }] ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1709, 49, 1367, 45, 307, "Text"], Cell[3079, 96, 187, 6, 38, "Text"], Cell[3269, 104, 1070, 37, 147, "Text"], Cell[4342, 143, 507, 10, 130, "Input", InitializationCell->True], Cell[4852, 155, 1542, 46, 132, "Text"], Cell[6397, 203, 248, 6, 52, "Text"], Cell[CellGroupData[{ Cell[6670, 213, 595, 16, 185, "Text"], Cell[CellGroupData[{ Cell[7290, 233, 621, 12, 230, "Input", InitializationCell->True], Cell[7914, 247, 815, 15, 330, "Input", InitializationCell->True] }, Open ]] }, Closed]], Cell[8756, 266, 178, 6, 49, "Text"], Cell[8937, 274, 85, 2, 30, "Input"], Cell[9025, 278, 85, 2, 30, "Input"], Cell[9113, 282, 60, 1, 30, "Input"], Cell[9176, 285, 61, 1, 30, "Input"], Cell[9240, 288, 62, 1, 30, "Input"], Cell[9305, 291, 500, 11, 90, "Text"], Cell[9808, 304, 334, 6, 150, "Input"], Cell[10145, 312, 204, 5, 52, "Text"], Cell[10352, 319, 87, 2, 30, "Input"], Cell[10442, 323, 89, 2, 30, "Input"], Cell[10534, 327, 288, 6, 52, "Text"], Cell[10825, 335, 730, 25, 87, "Text"], Cell[CellGroupData[{ Cell[11580, 364, 421, 14, 128, "Text"], Cell[CellGroupData[{ Cell[12026, 382, 663, 12, 250, "Input", InitializationCell->True], Cell[12692, 396, 637, 11, 230, "Input", InitializationCell->True], Cell[13332, 409, 721, 14, 301, "Input", InitializationCell->True] }, Open ]] }, Closed]], Cell[14080, 427, 248, 6, 49, "Text"], Cell[14331, 435, 217, 4, 110, "Input"], Cell[14551, 441, 253, 8, 52, "Text"], Cell[14807, 451, 73, 2, 30, "Input"], Cell[14883, 455, 73, 2, 30, "Input"], Cell[14959, 459, 116, 2, 33, "Text"], Cell[15078, 463, 91, 1, 50, "Input"], Cell[15172, 466, 152, 5, 33, "Text"], Cell[15327, 473, 134, 2, 70, "Input"], Cell[15464, 477, 176, 5, 52, "Text"], Cell[15643, 484, 462, 11, 90, "Input"], Cell[16108, 497, 122, 2, 33, "Text"], Cell[16233, 501, 360, 9, 50, "Input"], Cell[16596, 512, 123, 2, 33, "Text"], Cell[16722, 516, 424, 11, 70, "Input"], Cell[17149, 529, 172, 5, 52, "Text"], Cell[17324, 536, 409, 8, 185, "Input"], Cell[17736, 546, 104, 2, 33, "Text"], Cell[17843, 550, 97, 2, 50, "Input"], Cell[17943, 554, 121, 2, 33, "Text"], Cell[18067, 558, 139, 2, 70, "Input"], Cell[18209, 562, 973, 32, 106, "Text"], Cell[19185, 596, 4810, 134, 59, "Text"], Cell[CellGroupData[{ Cell[24020, 734, 395, 13, 90, "Text"], Cell[24418, 749, 1185, 21, 432, "Input", InitializationCell->True] }, Closed]], Cell[25618, 773, 300, 7, 68, "Text"], Cell[25921, 782, 363, 6, 190, "Input"], Cell[26287, 790, 706, 14, 190, "Input"], Cell[26996, 806, 177, 7, 33, "Text"], Cell[27176, 815, 167, 3, 50, "Input"], Cell[27346, 820, 119, 2, 33, "Text"], Cell[27468, 824, 363, 6, 190, "Input"], Cell[27834, 832, 700, 14, 190, "Input"], Cell[28537, 848, 133, 4, 33, "Text"], Cell[28673, 854, 128, 2, 50, "Input"], Cell[28804, 858, 266, 8, 71, "Text"], Cell[29073, 868, 143, 4, 33, "Text"], Cell[29219, 874, 432, 8, 210, "Input"], Cell[29654, 884, 168, 7, 33, "Text"], Cell[29825, 893, 173, 3, 51, "Input"], Cell[30001, 898, 793, 16, 230, "Input"], Cell[30797, 916, 144, 4, 33, "Text"], Cell[30944, 922, 447, 8, 210, "Input"], Cell[31394, 932, 168, 7, 33, "Text"], Cell[31565, 941, 179, 3, 51, "Input"], Cell[31747, 946, 717, 14, 210, "Input"], Cell[32467, 962, 959, 26, 140, "Text"], Cell[CellGroupData[{ Cell[33451, 992, 484, 15, 128, "Text"], Cell[33938, 1009, 593, 11, 210, "Input", InitializationCell->True] }, Closed]], Cell[34546, 1023, 109, 2, 30, "Text"], Cell[34658, 1027, 153, 4, 70, "Input"], Cell[34814, 1033, 80, 2, 30, "Input"], Cell[34897, 1037, 80, 2, 30, "Input"], Cell[34980, 1041, 80, 2, 30, "Input"], Cell[35063, 1045, 358, 12, 71, "Text"], Cell[35424, 1059, 255, 5, 130, "Input"], Cell[35682, 1066, 1863, 60, 162, "Text"], Cell[37548, 1128, 718, 19, 128, "Text"], Cell[38269, 1149, 197, 5, 52, "Text"], Cell[CellGroupData[{ Cell[38491, 1158, 376, 12, 71, "Text"], Cell[38870, 1172, 2083, 36, 530, "Input", InitializationCell->True] }, Closed]], Cell[40968, 1211, 310, 8, 87, "Text"], Cell[41281, 1221, 349, 6, 150, "Input"], Cell[41633, 1229, 113, 2, 33, "Text"], Cell[41749, 1233, 72, 2, 30, "Input"], Cell[41824, 1237, 233, 7, 71, "Text"], Cell[42060, 1246, 304, 5, 170, "Input"], Cell[42367, 1253, 698, 14, 210, "Input"], Cell[43068, 1269, 304, 5, 170, "Input"], Cell[43375, 1276, 698, 14, 210, "Input"], Cell[44076, 1292, 304, 5, 170, "Input"], Cell[44383, 1299, 841, 17, 270, "Input"], Cell[45227, 1318, 993, 32, 112, "Text"], Cell[46223, 1352, 108, 2, 33, "Text"], Cell[CellGroupData[{ Cell[46356, 1358, 429, 14, 128, "Text"], Cell[CellGroupData[{ Cell[46810, 1376, 535, 12, 230, "Input", InitializationCell->True], Cell[47348, 1390, 1473, 27, 653, "Input", InitializationCell->True], Cell[48824, 1419, 305, 8, 52, "Text"], Cell[49132, 1429, 1031, 19, 397, "Input", InitializationCell->True] }, Open ]] }, Closed]], Cell[50190, 1452, 107, 2, 30, "Text"], Cell[50300, 1456, 69, 2, 30, "Input"], Cell[50372, 1460, 172, 7, 33, "Text"], Cell[50547, 1469, 92, 1, 30, "Input"], Cell[50642, 1472, 250, 10, 52, "Text"], Cell[50895, 1484, 331, 6, 150, "Input"], Cell[51229, 1492, 604, 12, 170, "Input"], Cell[51836, 1506, 278, 5, 90, "Input"], Cell[52117, 1513, 158, 5, 52, "Text"], Cell[52278, 1520, 145, 3, 70, "Input"], Cell[52426, 1525, 95, 2, 33, "Text"], Cell[52524, 1529, 306, 6, 90, "Input"], Cell[52833, 1537, 112, 2, 33, "Text"], Cell[52948, 1541, 278, 5, 110, "Input"], Cell[53229, 1548, 154, 6, 52, "Text"], Cell[53386, 1556, 232, 4, 90, "Input"], Cell[53621, 1562, 601, 12, 170, "Input"], Cell[54225, 1576, 336, 6, 110, "Input"], Cell[54564, 1584, 157, 5, 52, "Text"], Cell[54724, 1591, 150, 3, 70, "Input"], Cell[54877, 1596, 96, 2, 33, "Text"], Cell[54976, 1600, 145, 3, 70, "Input"], Cell[55124, 1605, 109, 2, 33, "Text"], Cell[55236, 1609, 275, 5, 110, "Input"], Cell[55514, 1616, 158, 5, 33, "Text"] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)