(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing 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[ 10284, 382]*) (*NotebookOutlinePosition[ 11307, 416]*) (* CellTagsIndexPosition[ 11263, 412]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Lecture 02", "Title", CellMargins->{{Inherited, 30.75}, {Inherited, Inherited}}, TextAlignment->Center, TextJustification->0], Cell["Summer 2001 ", "Text", CellMargins->{{Inherited, 30.75}, {Inherited, Inherited}}, TextAlignment->Center, FontSize->16], Cell["Victor Adamchik", "Text", CellMargins->{{Inherited, 30.75}, {Inherited, Inherited}}, TextAlignment->Center, TextJustification->0, FontSize->16], Cell[CellGroupData[{ Cell["Symbolic Computations", "Section"], Cell[TextData[{ "In this section I will give a short overview on the ", StyleBox["Mathematica", FontSlant->"Italic"], " possibilities to do symbolic computations. The division into numerics and \ symbolics does not reflect the structure of ", StyleBox["Mathematica", FontSlant->"Italic"], ". Also, this division is not precise: in most cases the efficient \ numerical methods need symbolic techniques and vice versa." }], "Text"], Cell["Simple indefinite integration", "Text"], Cell[BoxData[ \(Integrate[1\/\(1 + x\^2\), \ x]\)], "Input", CellLabel->"In[261]:="], Cell["that can be verified by differentiation", "Text"], Cell[BoxData[ \(D[%, x]\)], "Input", CellLabel->"In[262]:="], Cell["Multiple indefinite integration", "Text"], Cell[BoxData[ \(Integrate[1\/\(1 + x\^2\), \ x, x, x]\)], "Input", CellLabel->"In[264]:="], Cell["Differentiating the result three times brings us back ", "Text"], Cell[BoxData[ \(D[%, {x, 3}]\)], "Input", CellLabel->"In[265]:="], Cell[BoxData[ \(Simplify[%]\)], "Input", CellLabel->"In[266]:="], Cell["Here is the definite integral", "Text"], Cell[BoxData[ \(Integrate[1\/\(x\^2 + 1\), \ {x, \ 0, \ 1}]\)], "Input", CellLabel->"In[263]:="], Cell["the improper integral", "Text"], Cell[BoxData[ \(Integrate[Sin[x]\^10\/x\^10, \ {x, \ 0, \ Infinity}]\)], "Input", CellLabel->"In[269]:="], Cell["that can be verified only numerically", "Text"], Cell[BoxData[ \(N[%]\)], "Input", CellLabel->"In[270]:="], Cell[BoxData[ \(NIntegrate[Sin[x]\^10\/x\^10, \ {x, \ 0, \ Infinity}]\)], "Input", CellLabel->"In[271]:="], Cell["\<\ A system of nonlinear equations (exercise 3 from the previous lab)\ \>", "Text"], Cell[BoxData[ StyleBox[\(Solve[{x^2\ + \ y^2\ == \ a, \ y\ == \ x^2}, \ {x, y}]\), FormatType->StandardForm]], "Input", CellLabel->"In[276]:="], Cell[TextData[{ "The function ", StyleBox["Eliminate", "MR"], " eliminates variables from a system of polynomial equations." }], "Text"], Cell[BoxData[ \(Eliminate[{x^6 + y^6 \[Equal] 6, x^8 + y^8 \[Equal] 8}, {y}]\)], "Input",\ CellLabel->"In[275]:="], Cell[TextData[{ "Solving high order equations, ", StyleBox["Mathematica", FontSlant->"Italic"], " can return a result containing the ", StyleBox["Root", "MR"], " function" }], "Text"], Cell[BoxData[ \(Solve[x^5 - x\ - 1 \[Equal] 0, x]\)], "Input", CellLabel->"In[278]:="], Cell["which can be numerically computed", "Text"], Cell[BoxData[ \(N[%]\)], "Input", CellLabel->"In[279]:="], Cell["The following solves a transcendental equation", "Text"], Cell[BoxData[ \(Solve[Log[x]\ + \ Log[2\ x]\ \[Equal] \ 1\ , x]\)], "Input", CellLabel->"In[303]:="] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Exercise 1. ", FontSize->17, FontWeight->"Bold"]], "Section", CellMargins->{{18, Inherited}, {Inherited, Inherited}}], Cell[TextData[{ StyleBox["\tUse Mathematica to convert this trigonometric expression into \ radicals:\n\n\t\t", FontSlant->"Italic"], Cell[BoxData[ \(Cos[\(2\ \[Pi]\)\/9]\^\(1/3\) + Cos[\(4\ \[Pi]\)\/9]\^\(1/3\) - Cos[\[Pi]\/9]\^\(1/3\)\)]] }], "Text", CellMargins->{{18, Inherited}, {Inherited, Inherited}}, Background->RGBColor[0.621103, 0.875013, 0.996109]], Cell["By converting I mean the following", "Text"], Cell[BoxData[ \(Cos[\[Pi]\/5]\)], "Input", CellLabel->"In[304]:="], Cell[TextData[{ "Commands: ", ButtonBox["TrigToExp", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["RootReduce", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["ToRadicals", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["Together", ButtonStyle->"RefGuideLink"] }], "Text", Evaluatable->False], Cell["\<\ Look up the explanations for the commands above in the help browser, and you \ will see that the following commands solve the stated problems. \ \>", "Text"], Cell[TextData[StyleBox["Solution", FontSize->15, FontWeight->"Bold"]], "Subsection", CellMargins->{{18, Inherited}, {Inherited, Inherited}}] }, Closed]], Cell[CellGroupData[{ Cell["", "Section"], Cell[TextData[{ "You should realize (if you studied the Galois group theory) that there are \ some cases in which a reduction to radicals is in principle possible, but ", StyleBox["Mathematica", "TI"], " cannot find it. This is an example of solvable in radicals quintic:" }], "Text"], Cell[BoxData[ \(Solve[x\^5 + 20\ x\ + \ 32 \[Equal] 0, x]\)], "Input", CellLabel->"In[317]:="], Cell[BoxData[ \(ToRadicals[%]\)], "Input", CellLabel->"In[318]:="] }, Closed]], Cell["Help on Assignment 1 (Calculus of Variations)", "Section"], Cell[CellGroupData[{ Cell[TextData[StyleBox["Exercise 2. ", FontSize->17, FontWeight->"Bold"]], "Section", CellMargins->{{18, Inherited}, {Inherited, Inherited}}], Cell[TextData[{ StyleBox["\t", FontSlant->"Italic"], "Generate a table of first 50 primes and extract the primes between 30 and \ 40." }], "Text", CellMargins->{{18, Inherited}, {Inherited, Inherited}}, Background->RGBColor[0.621103, 0.875013, 0.996109]], Cell[TextData[{ "Commands: ", ButtonBox["Prime", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["Range", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["Select", ButtonStyle->"RefGuideLink"] }], "Text", Evaluatable->False], Cell["\<\ Look up the explanations for the commands above in the help browser, and you \ will see that the following commands solve the stated problems. \ \>", "Text"], Cell[TextData[StyleBox["Solution", FontSize->15, FontWeight->"Bold"]], "Subsection", CellMargins->{{18, Inherited}, {Inherited, Inherited}}] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Exercise 3. ", FontSize->17, FontWeight->"Bold"]], "Section", CellMargins->{{18, Inherited}, {Inherited, Inherited}}], Cell[TextData[{ StyleBox["\t", FontSlant->"Italic"], "Write a function to reverse a given integer. For example, 1024->4201." }], "Text", CellMargins->{{18, Inherited}, {Inherited, Inherited}}, Background->RGBColor[0.621103, 0.875013, 0.996109]], Cell[TextData[{ "Commands: ", ButtonBox["IntegerDigits", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["FromDigits", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["Reverse", ButtonStyle->"RefGuideLink"] }], "Text", Evaluatable->False], Cell["\<\ Look up the explanations for the commands above in the help browser, and you \ will see that the following commands solve the stated problems. \ \>", "Text"], Cell[TextData[StyleBox["Solution", FontSize->15, FontWeight->"Bold"]], "Subsection", CellMargins->{{18, Inherited}, {Inherited, Inherited}}] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Exercise 4. ", FontSize->17, FontWeight->"Bold"]], "Section", CellMargins->{{18, Inherited}, {Inherited, Inherited}}], Cell[TextData[{ StyleBox["\t", FontSlant->"Italic"], "Find an integer in the range ", Cell[BoxData[ \(TraditionalForm\`\([1, 10000]\)\)]], " for which multiplication by 4 has the same \t\teffect as reversing the \ digit sequence." }], "Text", CellMargins->{{18, Inherited}, {Inherited, Inherited}}, Background->RGBColor[0.621103, 0.875013, 0.996109]], Cell[TextData[{ "Commands: ", " ", ButtonBox["IntegerDigits", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["FromDigits", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["Select", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["Range", ButtonStyle->"RefGuideLink"], ", ", ButtonBox["Reverse", ButtonStyle->"RefGuideLink"] }], "Text", Evaluatable->False], Cell["\<\ Look up the explanations for the commands above in the help browser, and you \ will see that the following commands solve the stated problems. \ \>", "Text"], Cell[TextData[StyleBox["Solution", FontSize->15, FontWeight->"Bold"]], "Subsection", CellMargins->{{18, Inherited}, {Inherited, Inherited}}] }, Open ]] }, Open ]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowToolbars->{"RulerBar", "EditBar"}, WindowSize->{621, 641}, WindowMargins->{{Automatic, 145}, {Automatic, 8}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, 128}}, ShowCellLabel->False, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, CharacterEncoding->Automatic, Magnification->1.25, StyleDefinitions -> "ArticleClassic.nb" ] (*********************************************************************** 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[CellGroupData[{ Cell[1739, 51, 137, 3, 105, "Title"], Cell[1879, 56, 130, 3, 38, "Text"], Cell[2012, 61, 157, 4, 38, "Text"], Cell[CellGroupData[{ Cell[2194, 69, 40, 0, 69, "Section"], Cell[2237, 71, 447, 10, 96, "Text"], Cell[2687, 83, 45, 0, 33, "Text"], Cell[2735, 85, 90, 2, 50, "Input"], Cell[2828, 89, 55, 0, 33, "Text"], Cell[2886, 91, 66, 2, 36, "Input"], Cell[2955, 95, 47, 0, 33, "Text"], Cell[3005, 97, 96, 2, 50, "Input"], Cell[3104, 101, 70, 0, 33, "Text"], Cell[3177, 103, 71, 2, 36, "Input"], Cell[3251, 107, 70, 2, 36, "Input"], Cell[3324, 111, 45, 0, 33, "Text"], Cell[3372, 113, 102, 2, 50, "Input"], Cell[3477, 117, 37, 0, 33, "Text"], Cell[3517, 119, 111, 2, 53, "Input"], Cell[3631, 123, 53, 0, 33, "Text"], Cell[3687, 125, 63, 2, 36, "Input"], Cell[3753, 129, 112, 2, 53, "Input"], Cell[3868, 133, 90, 2, 33, "Text"], Cell[3961, 137, 158, 3, 36, "Input"], Cell[4122, 142, 142, 4, 33, "Text"], Cell[4267, 148, 121, 3, 36, "Input"], Cell[4391, 153, 197, 7, 33, "Text"], Cell[4591, 162, 93, 2, 36, "Input"], Cell[4687, 166, 49, 0, 33, "Text"], Cell[4739, 168, 63, 2, 36, "Input"], Cell[4805, 172, 62, 0, 33, "Text"], Cell[4870, 174, 108, 2, 36, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[5015, 181, 147, 3, 35, "Section"], Cell[5165, 186, 387, 9, 97, "Text"], Cell[5555, 197, 50, 0, 33, "Text"], Cell[5608, 199, 72, 2, 47, "Input"], Cell[5683, 203, 328, 14, 33, "Text", Evaluatable->False], Cell[6014, 219, 167, 3, 54, "Text"], Cell[6184, 224, 146, 3, 54, "Subsection"] }, Closed]], Cell[CellGroupData[{ Cell[6367, 232, 19, 0, 36, "Section"], Cell[6389, 234, 290, 5, 75, "Text"], Cell[6682, 241, 101, 2, 37, "Input"], Cell[6786, 245, 72, 2, 36, "Input"] }, Closed]], Cell[6873, 250, 64, 0, 36, "Section"], Cell[CellGroupData[{ Cell[6962, 254, 147, 3, 68, "Section"], Cell[7112, 259, 266, 7, 53, "Text"], Cell[7381, 268, 248, 11, 33, "Text", Evaluatable->False], Cell[7632, 281, 167, 3, 54, "Text"], Cell[7802, 286, 146, 3, 54, "Subsection"] }, Closed]], Cell[CellGroupData[{ Cell[7985, 294, 147, 3, 35, "Section"], Cell[8135, 299, 256, 6, 53, "Text"], Cell[8394, 307, 262, 11, 33, "Text", Evaluatable->False], Cell[8659, 320, 167, 3, 54, "Text"], Cell[8829, 325, 146, 3, 54, "Subsection"] }, Closed]], Cell[CellGroupData[{ Cell[9012, 333, 147, 3, 35, "Section"], Cell[9162, 338, 374, 10, 74, "Text"], Cell[9539, 350, 398, 18, 33, "Text", Evaluatable->False], Cell[9940, 370, 167, 3, 54, "Text"], Cell[10110, 375, 146, 3, 54, "Subsection"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)