(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 4.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. 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[ 30818, 1005]*) (*NotebookOutlinePosition[ 31457, 1027]*) (* CellTagsIndexPosition[ 31413, 1023]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Solutions to Mathematica Lab Exercise #1", "Subtitle"], Cell["\<\ Problem 1. Compute the first 768 digits of \[Pi]. Anything \ remarkable? Try a few more digits for good measure.\ \>", "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Pi, 768]\)], "Input"], Cell[BoxData[ \(3.1415926535897932384626433832795028841971693993751058209749445923078164\ 062862089986280348253421170679821480865132823066470938446095505822317253594081\ 284811174502841027019385211055596446229489549303819644288109756659334461284756\ 482337867831652712019091456485669234603486104543266482133936072602491412737245\ 870066063155881748815209209628292540917153643678925903600113305305488204665213\ 841469519415116094330572703657595919530921861173819326117931051185480744623799\ 627495673518857527248912279381830119491298336733624406566430860213949463952247\ 371907021798609437027705392171762931767523846748184676694051320005681271452635\ 608277857713427577896091736371787214684409012249534301465495853710507922796892\ 589235420199561121290219608640344181598136297747713099605187072113499999983729\ 78049951`768\)], "Output"] }, Open ]], Cell["Wait, what's up? Could it be?", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[Pi, 868]\)], "Input"], Cell[BoxData[ \(3.1415926535897932384626433832795028841971693993751058209749445923078164\ 062862089986280348253421170679821480865132823066470938446095505822317253594081\ 284811174502841027019385211055596446229489549303819644288109756659334461284756\ 482337867831652712019091456485669234603486104543266482133936072602491412737245\ 870066063155881748815209209628292540917153643678925903600113305305488204665213\ 841469519415116094330572703657595919530921861173819326117931051185480744623799\ 627495673518857527248912279381830119491298336733624406566430860213949463952247\ 371907021798609437027705392171762931767523846748184676694051320005681271452635\ 608277857713427577896091736371787214684409012249534301465495853710507922796892\ 589235420199561121290219608640344181598136297747713099605187072113499999983729\ 780499510597317328160963185950244594553469083026425223082533446850352619311881\ 7101000313783875288658753320838`868\)], "Output"] }, Open ]], Cell["\<\ As an extra credit exercise, let me know what is the longest string \ of zeroes found in \[Pi].\ \>", "Text"], Cell[TextData[{ "Problem 2. Compute ", Cell[BoxData[ \(TraditionalForm\`\((2143/22)\)\^\(1/4\)\)]], "." }], "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ \(\((2143/22)\)^\((1/4)\)\)], "Input"], Cell[BoxData[ \(\((2143\/22)\)\^\(1/4\)\)], "Output"] }, Open ]], Cell["Perhaps this is not what was wanted.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[\((2143/22)\)^\((1/4)\)]\)], "Input"], Cell[BoxData[ \(3.1415926525826463`\)], "Output"] }, Open ]], Cell["Hold it. Could it be?", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[\((2143/22)\)^\((1/4)\), 15]\)], "Input"], Cell[BoxData[ \(3.1415926525826463`\)], "Output"] }, Open ]], Cell["Why is this not giving 15 digits?", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[\((2143/22)\)^\((1/4)\), 17]\)], "Input"], Cell[BoxData[ \(3.1415926525826461252060371796`17\)], "Output"] }, Open ]], Cell["\<\ Now it's working! And it is not the same as \[Pi].\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[Pi - \((2143.0/22.0)\)^\((0.25)\)]\)], "Input"], Cell[BoxData[ \(1.007146810394488`*^-9\)], "Output"] }, Open ]], Cell[TextData[{ "Problem 3. The masses of the electron and proton are ", Cell[BoxData[ \(TraditionalForm\`m\_e\)]], "= 0.51109991(15) MeV and ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["m", FontSlant->"Italic"], "p"], TraditionalForm]]], "= 938.2723(3) MeV. Find an approximation of the form\n\n\t\t\t\t", Cell[BoxData[ FormBox[ RowBox[{ FractionBox[ StyleBox[ SubscriptBox[ StyleBox["m", FontSize->14, FontSlant->"Italic"], "p"], FontSize->14], StyleBox[\(m\_e\), FontSize->14]], " "}], TraditionalForm]]], "~ ", Cell[BoxData[ FormBox[ StyleBox[\(2\^n\), FontSize->16], TraditionalForm]]], Cell[BoxData[ FormBox[ StyleBox[\(3\^m\), FontSize->16], TraditionalForm]]], Cell[BoxData[ FormBox[ StyleBox[\(\[Pi]\^p\), FontSize->16], TraditionalForm]]], "\n\t\t\t\t\nwith positive integers ", StyleBox["n, m", FontSlant->"Italic"], " and ", StyleBox["p", FontSlant->"Italic"], ". There is a solution good to 4 digits." }], "Text", CellFrame->True, TextAlignment->Left, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ \(ratio\ = \ 938.2723/0.51109991\)], "Input"], Cell[BoxData[ \(1835.7903839192616`\)], "Output"] }, Open ]], Cell[BoxData[ \(f[n_, m_, p_]\ := \ N[2^n\ 3^m\ Pi^p]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(f[2, 2, 3]\)], "Input"], Cell[BoxData[ \(1116.2259604907933`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(f[2, 1, 4]\)], "Input"], Cell[BoxData[ \(1168.9090924080292`\)], "Output"] }, Open ]], Cell["This is tedious!", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Table[f[n, m, 1], {n, 0, 5}, {m, 0, 5}]\)], "Input"], Cell[BoxData[ \({{3.141592653589793`, 9.42477796076938`, 28.274333882308138`, 84.82300164692441`, 254.46900494077323`, 763.4070148223198`}, {6.283185307179586`, 18.84955592153876`, 56.548667764616276`, 169.64600329384882`, 508.93800988154646`, 1526.8140296446395`}, {12.566370614359172`, 37.69911184307752`, 113.09733552923255`, 339.29200658769764`, 1017.8760197630929`, 3053.628059289279`}, {25.132741228718345`, 75.39822368615503`, 226.1946710584651`, 678.5840131753953`, 2035.7520395261859`, 6107.256118578558`}, {50.26548245743669`, 150.79644737231007`, 452.3893421169302`, 1357.1680263507906`, 4071.5040790523717`, 12214.512237157116`}, {100.53096491487338`, 301.59289474462014`, 904.7786842338604`, 2714.336052701581`, 8143.008158104743`, 24429.024474314232`}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[f[n, m, 2], {n, 0, 5}, {m, 0, 5}]\)], "Input"], Cell[BoxData[ \({{9.869604401089358`, 29.608813203268074`, 88.82643960980423`, 266.47931882941265`, 799.437956488238`, 2398.313869464714`}, {19.739208802178716`, 59.21762640653615`, 177.65287921960845`, 532.9586376588253`, 1598.875912976476`, 4796.627738929428`}, {39.47841760435743`, 118.4352528130723`, 355.3057584392169`, 1065.9172753176506`, 3197.751825952952`, 9593.255477858856`}, {78.95683520871486`, 236.8705056261446`, 710.6115168784338`, 2131.834550635301`, 6395.503651905904`, 19186.510955717713`}, {157.91367041742973`, 473.7410112522892`, 1421.2230337568676`, 4263.669101270602`, 12791.007303811808`, 38373.021911435426`}, {315.82734083485946`, 947.4820225045784`, 2842.446067513735`, 8527.338202541205`, 25582.014607623616`, 76746.04382287085`}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[f[n, m, 3], {n, 0, 5}, {m, 0, 5}]\)], "Input"], Cell[BoxData[ \({{31.006276680299816`, 93.01883004089945`, 279.05649012269834`, 837.1694703680951`, 2511.508411104285`, 7534.525233312856`}, {62.01255336059963`, 186.0376600817989`, 558.1129802453967`, 1674.3389407361901`, 5023.01682220857`, 15069.050466625711`}, {124.02510672119926`, 372.0753201635978`, 1116.2259604907933`, 3348.6778814723802`, 10046.03364441714`, 30138.100933251422`}, {248.05021344239853`, 744.1506403271956`, 2232.4519209815867`, 6697.3557629447605`, 20092.06728883428`, 60276.201866502844`}, {496.10042688479706`, 1488.3012806543911`, 4464.903841963173`, 13394.711525889521`, 40184.13457766856`, 120552.40373300569`}, {992.2008537695941`, 2976.6025613087822`, 8929.807683926347`, 26789.423051779042`, 80368.26915533713`, 241104.80746601138`}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[f[n, m, 4], {n, 0, 5}, {m, 0, 5}]\)], "Input"], Cell[BoxData[ \({{97.40909103400243`, 292.2272731020073`, 876.6818193060219`, 2630.0454579180655`, 7890.136373754197`, 23670.40912126259`}, {194.81818206800486`, 584.4545462040146`, 1753.3636386120438`, 5260.090915836131`, 15780.272747508394`, 47340.81824252518`}, {389.6363641360097`, 1168.9090924080292`, 3506.7272772240876`, 10520.181831672262`, 31560.545495016788`, 94681.63648505036`}, {779.2727282720194`, 2337.8181848160584`, 7013.454554448175`, 21040.363663344524`, 63121.090990033576`, 189363.27297010072`}, {1558.5454565440389`, 4675.636369632117`, 14026.90910889635`, 42080.72732668905`, 126242.18198006715`, 378726.54594020144`}, {3117.0909130880777`, 9351.272739264234`, 28053.8182177927`, 84161.4546533781`, 252484.3639601343`, 757453.0918804029`}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[f[n, m, 5], {n, 0, 5}, {m, 0, 5}]\)], "Input"], Cell[BoxData[ \({{306.0196847852814`, 918.0590543558442`, 2754.1771630675325`, 8262.531489202598`, 24787.594467607796`, 74362.78340282338`}, {612.0393695705628`, 1836.1181087116884`, 5508.354326135065`, 16525.062978405196`, 49575.18893521559`, 148725.56680564675`}, {1224.0787391411257`, 3672.2362174233767`, 11016.70865227013`, 33050.12595681039`, 99150.37787043118`, 297451.1336112935`}, {2448.1574782822513`, 7344.4724348467535`, 22033.41730454026`, 66100.25191362078`, 198300.75574086237`, 594902.267222587`}, {4896.314956564503`, 14688.944869693507`, 44066.83460908052`, 132200.50382724157`, 396601.51148172474`, 1.189804534445174`*^6}, {9792.629913129005`, 29377.889739387014`, 88133.66921816104`, 264401.00765448314`, 793203.0229634495`, 2.379609068890348`*^6}}\)], "Output"] }, Open ]], Cell["There it is: n=1, m=1, p=5.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(f[1, 1, 5]\)], "Input"], Cell[BoxData[ \(1836.1181087116884`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Min[ Table[Abs[938.2723/0.51109991 - f[n, m, p]], {n, 0, 5}, {m, 0, 5}, {p, 0, 6}]]\)], "Input"], Cell[BoxData[ \(0.32772479242680674`\)], "Output"] }, Open ]], Cell["\<\ It clearly found the solution this way. So how do I get it to tell \ me the values of n,m, and p at the miniumum?\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{\(Problem\ 4. \ The\ electron' s\ magnetic\ moment\ is\ \[Mu]\), "=", RowBox[{"1.00115965219", \((1)\), " ", StyleBox[\(e\[HBar]/2\), FontSlant->"Italic"], \(m\_e . \ A\), " ", "certain", " ", "crank", " ", "who", " ", "posts", " ", "to", " ", "the", " ", "Usenet", " ", "\<\"predicts\"\>", " ", "that", " ", "the", " ", "dimensionless", " ", "constant", " ", "which", " ", "appears", " ", "there", " ", "should", " ", "be"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ " ", \(1 + \(1\/2\) \((\[Alpha]\/\[Pi])\) - \(1\/3\) \ \((\[Alpha]\/\[Pi])\)\^2 + \(1\/4\) \((\[Alpha]\/\[Pi])\)\^3 - \(1\/5\) \((\ \[Alpha]\/\[Pi])\)\^4 + \(1\/6\) \((\[Alpha]\/\[Pi])\)\^5, \ \[IndentingNewLine]\[IndentingNewLine]where\ the\ fine\ structure\ constant\ \ is\ \[Alpha]\ = 1/137.0359895 \((61)\) . \ Could\ he\ be\ \(\(right\)\(?\)\)\)}]}], "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ \(\[Alpha] = N[1.0/137.0359895, 100]\)], "Input"], Cell[BoxData[ \(0.007297353079644819`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(1 + \(1\/2\) \((\[Alpha]\/\[Pi])\) - \(1\/3\) \((\[Alpha]\/\[Pi])\)\^2 \ + \(1\/4\) \((\[Alpha]\/\[Pi])\)\^3 - \(1\/5\) \((\[Alpha]\/\[Pi])\)\^4 + \(1\ \/6\) \((\[Alpha]\/\[Pi])\)\^5\)], "Input"], Cell[BoxData[ \(1.0011596144444812`\)], "Output"] }, Open ]], Cell["We're going to have to do better than this.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[1 + \(1\/2\) \((\[Alpha]\/\[Pi])\) - \(1\/3\) \ \((\[Alpha]\/\[Pi])\)\^2 + \(1\/4\) \((\[Alpha]\/\[Pi])\)\^3 - \(1\/5\) \((\ \[Alpha]\/\[Pi])\)\^4 + \(1\/6\) \((\[Alpha]\/\[Pi])\)\^5, 20]\)], "Input"], Cell[BoxData[ \(1.0011596144444812`\)], "Output"] }, Open ]], Cell["There seems to be a problem with precision!", "Text"], Cell[BoxData[{ \(Problem\ 5. \ One\ way\ of\ getting\ \[Pi]\ is\ via\ the\ identity\ \ \[Pi] = 4\ \(tan\^\(-1\)\) \((1)\), \ where\ the\ arctan\ can\ be\ developed\ in\ a\ \ series\[IndentingNewLine]\), "\[IndentingNewLine]", \(\ \(tan\^\(-1\)\) \((x)\) = \(\((1 - 1\/3 + 1\/5 - ... )\) = \[Sum]\+\(n = 0\)\%\[Infinity]\ \ \(\((\(-1\))\)\^n\/\(2 n + 1\)\) x\^\(2 n + 1\) . \[IndentingNewLine]\[IndentingNewLine]How\ many\ \ terms\ do\ you\ need\ to\ get\ 3\ digits\ of\ \(\(\[Pi]\)\(.\)\)\)\)}], \ "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[BoxData[ \(f[m_] := 4*NSum[\((\(-1\))\)^n/\((2\ n + 1)\)\ , {n, 0, m}]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(f[2]\)], "Input"], Cell[BoxData[ \(3.466666666666667`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(f[10]\)], "Input"], Cell[BoxData[ \(3.232315809405593`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(f[50]\)], "Input"], Cell[BoxData[ \(3.1611986129870484`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(f[100]\)], "Input"], Cell[BoxData[ \(3.15149340107099`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(f[75]\)], "Input"], Cell[BoxData[ \(3.1284353282369826`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[f[m], {m, 50, 100}]\)], "Input"], Cell[BoxData[ \({3.1611986129870484`, 3.1223636615307373`, 3.1604588996259757`, 3.1230757220558822`, 3.159772969762304`, 3.123736933726268`, 3.1591351638147636`, 3.1243525551191116`, 3.1585405893071457`, 3.1249271439289945`, 3.157984995168664`, 3.1254646699654116`, 3.1574646699654116`, 3.1259686069732857`, 3.1569763589112703`, 3.126442007766232`, 3.156517195736157`, 3.1268875661065274`, 3.156084646398498`, 3.127307667981232`, 3.155676462307473`, 3.127704434335445`, 3.1552906412319968`, 3.1280797568782552`, 3.154925394462148`, 3.1284353282369826`, 3.154579119086649`, 3.1287726674737457`, 3.154250374480128`, 3.1290931417757135`, 3.153937862272619`, 3.1293979849719955`, 3.153640409214429`, 3.129688313406037`, 3.1533569524592995`, 3.129965139593795`, 3.153086526877039`, 3.1302293840198896`, 3.1528282540763928`, 3.1304818853613035`, 3.152581332875121`, 3.130723409377848`, 3.1523450309994745`, 3.130954656667919`, 3.1521186778319445`, 3.1311762694549774`, 3.151901658056017`, 3.1313888375431933`, 3.1516934060711153`, 3.1315929035585492`, 3.15149340107099`}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(f[74]\)], "Input"], Cell[BoxData[ \(3.154925394462148`\)], "Output"] }, Open ]], Cell[BoxData[{ \(Problem\ 6. \ Another\ such\ identity\ is\[IndentingNewLine]\), "\ \[IndentingNewLine]", \(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[Pi] = 12\ \(tan\^\(-1\)\) \((1\/5)\) - 4\ \(tan\^\(-1\)\) \((1\/239)\) . \[IndentingNewLine]\ \[IndentingNewLine]How\ many\ terms\ in\ the\ Taylor\ series\ do\ you\ need\ \ to\ get\ 20\ digits\ of\ \(\(\[Pi]\)\(?\)\)\)}], "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[BoxData[ \(err[m_] := \ 16*Sum[\((\(-1\))\)^n/\((2\ n + 1)\)*0.2^\((2\ n + 1)\)\ , {n, 0, m}] - \[IndentingNewLine]4* Sum[\((\(-1\))\)^n/\((2\ n + 1)\)*\((1/239)\)^\((2\ n + 1)\)\ , {n, 0, m}] - Pi\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(err[5]\)], "Input"], Cell[BoxData[ \(\(-9.744844930992258`*^-10\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Table[err[m], {m, 6, 50}]\)], "Input"], Cell[BoxData[ \({3.376188217885101`*^-11, \(-1.1906031716080179`*^-12\), 4.3076653355456074`*^-14, \(-8.881784197001252`*^-16\), 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16, 8.881784197001252`*^-16}\)], "Output"] }, Open ]], Cell["Another problem with precision!", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ "Problem", " ", "7.", " ", "One", " ", "last", " ", "numerical", " ", \(accident . \ How\), " ", "close", " ", "is", " ", "exp", \((\[Pi] \@ 163)\), " ", "to", " ", "an", " ", \(integer?\ You\), " ", "may", " ", "find", " ", "the", " ", "following", " ", "incantation", " ", "of", " ", RowBox[{"help", ":", "\[IndentingNewLine]", "\[IndentingNewLine]", StyleBox[\(In[1]\), FontSlant->"Italic"]}]}], ":=", " ", \(NumberForm[%, ExponentStep \[Rule] 33]\)}]], "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Exp[Pi*Sqrt[163]]]\)], "Input"], Cell[BoxData[ \(2.625374126407677`*^17\)], "Output"] }, Open ]], Cell["That doesn't work.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(NumberForm[%, ExponentStep \[Rule] 33]\)], "Input"], Cell[BoxData[ \(NumberForm::"sigz" \(\(:\)\(\ \)\) "In addition to the number of digits requested, one or more zeros will \ appear as placeholders."\)], "Message"], Cell[BoxData[ TagBox[ InterpretationBox["\<\"262537412640767700.\"\>", 2.6253741264076771*^+17, AutoDelete->True], (NumberForm[ #, ExponentStep -> 33]&)]], "Output"] }, Open ]], Cell["Yet more trouble!", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(NumberForm[Exp[Pi*Sqrt[163]], ExponentStep \[Rule] 33]\)], "Input"], Cell[BoxData[ TagBox[ SuperscriptBox["\[ExponentialE]", RowBox[{ SqrtBox[ InterpretationBox["\<\"163\"\>", 163, Editable->False]], " ", "\[Pi]"}]], (NumberForm[ #, ExponentStep -> 33]&)]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Exp[Pi*Sqrt[163]], 20]\)], "Input"], Cell[BoxData[ \(2.625374126407687439999999999984732629`20*^17\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(NumberForm[%, ExponentStep \[Rule] 33]\)], "Input"], Cell[BoxData[ TagBox[ InterpretationBox["\<\"262537412640768744.00\"\>", 2.62537412640768744`20*^17, AutoDelete->True], (NumberForm[ #, ExponentStep -> 33]&)]], "Output"] }, Open ]], Cell["The problems with precision become stranger!", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[Exp[Pi*Sqrt[163]], 25]\)], "Input"], Cell[BoxData[ \(2.62537412640768743999999999999250069877666`25*^17\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Exp[Pi*Sqrt[163]], 30]\)], "Input"], Cell[BoxData[ \(2.625374126407687439999999999992500725971980222`30*^17\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Exp[Pi*Sqrt[163]], 35]\)], "Input"], Cell[BoxData[ \(2.62537412640768743999999999999250072597198185573109`35*^17\)], "Output"] }, Open ]], Cell["Finally!!!", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(NumberForm[%, ExponentStep \[Rule] 33]\)], "Input"], Cell[BoxData[ TagBox[ InterpretationBox["\<\"262537412640768743.99999999999925007\"\>", 2.6253741264076874399999999999925007`35*^17, AutoDelete->True], (NumberForm[ #, ExponentStep -> 33]&)]], "Output"] }, Open ]], Cell["Somebody had way too much time on their hands!", "Text"], Cell[BoxData[{ \(Problem\ 8. \ Find\ the\ roots\ of\ the\ equation\[IndentingNewLine]\), \ "\[IndentingNewLine]", \(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x\^5 + 8 x\^4 - 72 x\^3 - 382 x\^2 + 727 x + 2310 = 0. \[IndentingNewLine]\), "\[IndentingNewLine]", \(Do\ this\ \((a)\)\ with\ Solve[]\ and\ \((b)\)\ with\ \(\(Factor[]\)\(.\ \)\)\)}], "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ \(Solve[x\^5 + 8 x\^4 - 72 x\^3 - 382 x\^2 + 727 x + 2310 = 0, x]\)], "Input"], Cell[BoxData[ \(Set::"write" \(\(:\)\(\ \)\) "Tag \!\(Plus\) in \!\(2310 + \(\(727\\ x\)\) - \(\(382\\ x\^2\)\) - \(\ \(72\\ x\^3\)\) + \(\(8\\ x\^4\)\) + x\^5\) is Protected."\)], "Message"], Cell[BoxData[ \(Solve::"eqf" \(\(:\)\(\ \)\) "\!\(0\) is not a well-formed equation."\)], "Message"], Cell[BoxData[ \(Solve[0, x]\)], "Output"] }, Open ]], Cell["You have to be careful with those = signs!", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Solve[x\^5 + 8 x\^4 - 72 x\^3 - 382 x\^2 + 727 x + 2310 == 0, x]\)], "Input"], Cell[BoxData[ \({{x \[Rule] \(-11\)}, {x \[Rule] \(-5\)}, {x \[Rule] \(-2\)}, {x \ \[Rule] 3}, {x \[Rule] 7}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Factor[ x\^5 + 8 x\^4 - 72 x\^3 - 382 x\^2 + 727 x + 2310]\)], "Input"], Cell[BoxData[ \(\((\(-7\) + x)\)\ \((\(-3\) + x)\)\ \((2 + x)\)\ \((5 + x)\)\ \((11 + x)\)\)], "Output"] }, Open ]], Cell["\<\ Problem 9. Solve the equations exp(x)=x and exp(x)=-x.\ \>", "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ \(Solve[Exp[x] \[Equal] x, x]\)], "Input"], Cell[BoxData[ \(InverseFunction::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used. Values may be lost for multivalued \ inverses."\)], "Message"], Cell[BoxData[ \(Solve::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used by \!\(Solve\), so some solutions may \ not be found."\)], "Message"], Cell[BoxData[ \({{x \[Rule] \(-ProductLog[\(-1\)]\)}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Solve[Exp[x] \[Equal] x, x]]\)], "Input"], Cell[BoxData[ \(InverseFunction::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used. Values may be lost for multivalued \ inverses."\)], "Message"], Cell[BoxData[ \(Solve::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used by \!\(Solve\), so some solutions may \ not be found."\)], "Message"], Cell[BoxData[ \({{x \[Rule] \(\(0.3181315052047641`\)\(\[InvisibleSpace]\)\) - 1.3372357014306895`\ \[ImaginaryI]}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Exp[0.3181315052047641 - 1.3372357014306895*\ \[ImaginaryI]], 20]\)], "Input"], Cell[BoxData[ \(\(\(0.318131505204764`\)\(\[InvisibleSpace]\)\) - 1.3372357014306895`\ \[ImaginaryI]\)], "Output"] }, Open ]], Cell["\<\ What it actually has stored and for some reason is not showing: 0.318131505204764\[InvisibleSpace]-1.3372357014306895 \[ImaginaryI] Use copy and paste to see more digits, or:\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(N[Solve[Exp[x] \[Equal] x, x], 20]\)], "Input"], Cell[BoxData[ \(InverseFunction::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used. Values may be lost for multivalued \ inverses."\)], "Message"], Cell[BoxData[ \(Solve::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used by \!\(Solve\), so some solutions may \ not be found."\)], "Message"], Cell[BoxData[ \({{x \[Rule] 0.318131505204764135312654251587664`20 - 1.337235701430689408901162143193711`20\ \[ImaginaryI]}}\)], \ "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Solve[Exp[x] \[Equal] \(-x\), x]\)], "Input"], Cell[BoxData[ \(InverseFunction::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used. Values may be lost for multivalued \ inverses."\)], "Message"], Cell[BoxData[ \(Solve::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used by \!\(Solve\), so some solutions may \ not be found."\)], "Message"], Cell[BoxData[ \({{x \[Rule] \(-ProductLog[1]\)}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(N[Solve[Exp[x] \[Equal] \(-x\), x], 20]\)], "Input"], Cell[BoxData[ \(InverseFunction::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used. Values may be lost for multivalued \ inverses."\)], "Message"], Cell[BoxData[ \(Solve::"ifun" \(\(:\)\(\ \)\) "Inverse functions are being used by \!\(Solve\), so some solutions may \ not be found."\)], "Message"], Cell[BoxData[ \({{x \[Rule] \(-0.567143290409783872999968662210353`20\)}}\)], "Output"] }, Open ]], Cell[TextData[{ "Problem 10. Here are a set of linear equations which might arise, eg. in a \ multi-loop circuit problem.\n \n \ 2", Cell[BoxData[ \(TraditionalForm\`I\_1\)]], "+3", Cell[BoxData[ \(TraditionalForm\`I\_2\)]], "-4", Cell[BoxData[ \(TraditionalForm\`I\_3\)]], "=5\n 3", Cell[BoxData[ \(TraditionalForm\`I\_1\)]], "-2", Cell[BoxData[ \(TraditionalForm\`I\_2\)]], "+4", Cell[BoxData[ \(TraditionalForm\`I\_3\)]], "=6\n 4", Cell[BoxData[ \(TraditionalForm\`I\_1\)]], "+1", Cell[BoxData[ \(TraditionalForm\`I\_2\)]], "-4", Cell[BoxData[ \(TraditionalForm\`I\_3\)]], "=7\n \n Solve for the currents ", Cell[BoxData[ \(TraditionalForm\`I\_1\)]], ", ", Cell[BoxData[ \(TraditionalForm\`I\_2\)]], " and ", Cell[BoxData[ \(TraditionalForm\`I\_3\)]], " using Solve[]." }], "Text", CellFrame->True, Background->GrayLevel[0.833326]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"2", FormBox[\(\(\ \)\(I\_1\)\), "TraditionalForm"]}], "+", RowBox[{"3", " ", FormBox[\(I\_2\), "TraditionalForm"]}], "-", RowBox[{"4", " ", FormBox[\(I\_3\), "TraditionalForm"]}]}], "==", "5"}], ",", RowBox[{ RowBox[{ RowBox[{"3", FormBox[\(\(\ \)\(I\_1\)\), "TraditionalForm"]}], "-", RowBox[{"2", " ", FormBox[\(I\_2\), "TraditionalForm"]}], "+", RowBox[{"4", " ", FormBox[\(I\_3\), "TraditionalForm"]}]}], "==", "6"}], ",", RowBox[{ RowBox[{ RowBox[{"4", " ", FormBox[\(I\_1\), "TraditionalForm"]}], "+", RowBox[{"1", " ", FormBox[\(I\_2\), "TraditionalForm"]}], "-", RowBox[{"4", " ", FormBox[\(I\_3\), "TraditionalForm"]}]}], "==", "7"}]}], "}"}], ",", \({I\_1, I\_2\ \ , I\_3}\)}], "]"}]], "Input"], Cell[BoxData[ \({{\[ImaginaryI]\_1 \[Rule] 2, \[ImaginaryI]\_2 \[Rule] 1, \[ImaginaryI]\_3 \[Rule] 1\/2}}\)], "Output"] }, Open ]] }, Open ]] }, FrontEndVersion->"4.2 for Macintosh", ScreenRectangle->{{0, 1280}, {0, 998}}, WindowSize->{525, 742}, WindowMargins->{{-625, Automatic}, {-2, Automatic}} ] (******************************************************************* 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[1776, 53, 60, 0, 65, "Subtitle"], Cell[1839, 55, 190, 5, 66, "Text"], Cell[CellGroupData[{ Cell[2054, 64, 43, 1, 27, "Input"], Cell[2100, 67, 840, 11, 235, "Output"] }, Open ]], Cell[2955, 81, 45, 0, 32, "Text"], Cell[CellGroupData[{ Cell[3025, 85, 43, 1, 27, "Input"], Cell[3071, 88, 943, 12, 251, "Output"] }, Open ]], Cell[4029, 103, 119, 3, 32, "Text"], Cell[4151, 108, 181, 7, 48, "Text"], Cell[CellGroupData[{ Cell[4357, 119, 56, 1, 27, "Input"], Cell[4416, 122, 57, 1, 43, "Output"] }, Open ]], Cell[4488, 126, 52, 0, 32, "Text"], Cell[CellGroupData[{ Cell[4565, 130, 59, 1, 27, "Input"], Cell[4627, 133, 53, 1, 27, "Output"] }, Open ]], Cell[4695, 137, 37, 0, 32, "Text"], Cell[CellGroupData[{ Cell[4757, 141, 63, 1, 27, "Input"], Cell[4823, 144, 53, 1, 27, "Output"] }, Open ]], Cell[4891, 148, 49, 0, 32, "Text"], Cell[CellGroupData[{ Cell[4965, 152, 63, 1, 27, "Input"], Cell[5031, 155, 67, 1, 27, "Output"] }, Open ]], Cell[5113, 159, 74, 2, 32, "Text"], Cell[CellGroupData[{ Cell[5212, 165, 69, 1, 27, "Input"], Cell[5284, 168, 56, 1, 29, "Output"] }, Open ]], Cell[5355, 172, 1303, 46, 148, "Text"], Cell[CellGroupData[{ Cell[6683, 222, 64, 1, 27, "Input"], Cell[6750, 225, 53, 1, 27, "Output"] }, Open ]], Cell[6818, 229, 71, 1, 27, "Input"], Cell[CellGroupData[{ Cell[6914, 234, 43, 1, 27, "Input"], Cell[6960, 237, 53, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7050, 243, 43, 1, 27, "Input"], Cell[7096, 246, 53, 1, 27, "Output"] }, Open ]], Cell[7164, 250, 32, 0, 32, "Text"], Cell[CellGroupData[{ Cell[7221, 254, 72, 1, 27, "Input"], Cell[7296, 257, 892, 13, 107, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8225, 275, 72, 1, 27, "Input"], Cell[8300, 278, 885, 13, 107, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9222, 296, 72, 1, 27, "Input"], Cell[9297, 299, 892, 13, 107, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10226, 317, 72, 1, 27, "Input"], Cell[10301, 320, 888, 13, 107, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[11226, 338, 72, 1, 27, "Input"], Cell[11301, 341, 894, 13, 111, "Output"] }, Open ]], Cell[12210, 357, 43, 0, 32, "Text"], Cell[CellGroupData[{ Cell[12278, 361, 43, 1, 27, "Input"], Cell[12324, 364, 53, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[12414, 370, 133, 3, 43, "Input"], Cell[12550, 375, 54, 1, 27, "Output"] }, Open ]], Cell[12619, 379, 137, 3, 50, "Text"], Cell[12759, 384, 1077, 21, 192, "Text"], Cell[CellGroupData[{ Cell[13861, 409, 67, 1, 27, "Input"], Cell[13931, 412, 55, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14023, 418, 215, 3, 42, "Input"], Cell[14241, 423, 53, 1, 27, "Output"] }, Open ]], Cell[14309, 427, 59, 0, 32, "Text"], Cell[CellGroupData[{ Cell[14393, 431, 222, 3, 62, "Input"], Cell[14618, 436, 53, 1, 27, "Output"] }, Open ]], Cell[14686, 440, 59, 0, 32, "Text"], Cell[14748, 442, 604, 12, 154, "Text"], Cell[15355, 456, 92, 1, 27, "Input"], Cell[CellGroupData[{ Cell[15472, 461, 37, 1, 27, "Input"], Cell[15512, 464, 52, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15601, 470, 38, 1, 27, "Input"], Cell[15642, 473, 52, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15731, 479, 38, 1, 27, "Input"], Cell[15772, 482, 53, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15862, 488, 39, 1, 27, "Input"], Cell[15904, 491, 51, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15992, 497, 38, 1, 27, "Input"], Cell[16033, 500, 53, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[16123, 506, 58, 1, 27, "Input"], Cell[16184, 509, 1201, 18, 139, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[17422, 532, 38, 1, 27, "Input"], Cell[17463, 535, 52, 1, 27, "Output"] }, Open ]], Cell[17530, 539, 448, 9, 144, "Text"], Cell[17981, 550, 266, 5, 59, "Input"], Cell[CellGroupData[{ Cell[18272, 559, 39, 1, 27, "Input"], Cell[18314, 562, 62, 1, 29, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18413, 568, 58, 1, 27, "Input"], Cell[18474, 571, 1325, 23, 227, "Output"] }, Open ]], Cell[19814, 597, 47, 0, 32, "Text"], Cell[19864, 599, 643, 13, 99, "Text"], Cell[CellGroupData[{ Cell[20532, 616, 53, 1, 27, "Input"], Cell[20588, 619, 56, 1, 29, "Output"] }, Open ]], Cell[20659, 623, 34, 0, 32, "Text"], Cell[CellGroupData[{ Cell[20718, 627, 71, 1, 27, "Input"], Cell[20792, 630, 174, 3, 49, "Message"], Cell[20969, 635, 197, 5, 39, "Output"] }, Open ]], Cell[21181, 643, 33, 0, 32, "Text"], Cell[CellGroupData[{ Cell[21239, 647, 87, 1, 27, "Input"], Cell[21329, 650, 273, 8, 47, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[21639, 663, 57, 1, 27, "Input"], Cell[21699, 666, 79, 1, 29, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[21815, 672, 71, 1, 27, "Input"], Cell[21889, 675, 202, 5, 39, "Output"] }, Open ]], Cell[22106, 683, 60, 0, 32, "Text"], Cell[CellGroupData[{ Cell[22191, 687, 57, 1, 27, "Input"], Cell[22251, 690, 84, 1, 29, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22372, 696, 57, 1, 27, "Input"], Cell[22432, 699, 88, 1, 29, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22557, 705, 57, 1, 27, "Input"], Cell[22617, 708, 93, 1, 29, "Output"] }, Open ]], Cell[22725, 712, 26, 0, 32, "Text"], Cell[CellGroupData[{ Cell[22776, 716, 71, 1, 27, "Input"], Cell[22850, 719, 234, 5, 39, "Output"] }, Open ]], Cell[23099, 727, 62, 0, 32, "Text"], Cell[23164, 729, 441, 9, 111, "Text"], Cell[CellGroupData[{ Cell[23630, 742, 107, 2, 31, "Input"], Cell[23740, 746, 202, 3, 38, "Message"], Cell[23945, 751, 111, 2, 21, "Message"], Cell[24059, 755, 45, 1, 27, "Output"] }, Open ]], Cell[24119, 759, 58, 0, 32, "Text"], Cell[CellGroupData[{ Cell[24202, 763, 108, 2, 31, "Input"], Cell[24313, 767, 127, 2, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[24477, 774, 101, 2, 31, "Input"], Cell[24581, 778, 119, 2, 27, "Output"] }, Open ]], Cell[24715, 783, 183, 10, 156, "Text"], Cell[CellGroupData[{ Cell[24923, 797, 60, 1, 27, "Input"], Cell[24986, 800, 164, 3, 49, "Message"], Cell[25153, 805, 160, 3, 35, "Message"], Cell[25316, 810, 71, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[25424, 816, 63, 1, 27, "Input"], Cell[25490, 819, 164, 3, 49, "Message"], Cell[25657, 824, 160, 3, 35, "Message"], Cell[25820, 829, 146, 2, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[26003, 836, 107, 2, 43, "Input"], Cell[26113, 840, 125, 2, 27, "Output"] }, Open ]], Cell[26253, 845, 216, 6, 104, "Text"], Cell[CellGroupData[{ Cell[26494, 855, 67, 1, 27, "Input"], Cell[26564, 858, 164, 3, 49, "Message"], Cell[26731, 863, 160, 3, 35, "Message"], Cell[26894, 868, 168, 4, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[27099, 877, 65, 1, 27, "Input"], Cell[27167, 880, 164, 3, 49, "Message"], Cell[27334, 885, 160, 3, 35, "Message"], Cell[27497, 890, 66, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[27600, 896, 72, 1, 27, "Input"], Cell[27675, 899, 164, 3, 49, "Message"], Cell[27842, 904, 160, 3, 35, "Message"], Cell[28005, 909, 91, 1, 27, "Output"] }, Open ]], Cell[28111, 913, 1099, 42, 174, "Text"], Cell[CellGroupData[{ Cell[29235, 959, 1418, 38, 43, "Input"], Cell[30656, 999, 134, 2, 42, "Output"] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)