(*********************************************************************** 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[ 10999, 373]*) (*NotebookOutlinePosition[ 11853, 403]*) (* CellTagsIndexPosition[ 11809, 399]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Complex Numbers in ", StyleBox["Mathematica", FontSlant->"Italic"] }], "Title", ImageRegion->{{0, 1}, {0, 1}}], Cell[BoxData[{ StyleBox[\(Author : \ Thomas\ Shores\), FontFamily->"Helvetica", FontSize->14, FontWeight->"Plain", FontVariations->{ "CompatibilityType"-> 0}], "\[IndentingNewLine]", \(University\ of\ Nebraska\), "\ \[IndentingNewLine]", \(Send\ comments\ \(to : \ tshores@math . unl . edu\)\)}], "Input"], Cell[CellGroupData[{ Cell["Arithmetic", "Subsection", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["Mathematica", FontWeight->"Bold", FontSlant->"Italic"], " will automatically do complex arithmetic for you. The important point \ to remember is that the number \"i\" is denoted by \"I\" in ", StyleBox["Mathematica", FontSlant->"Italic"], ". For example, try the following cell:" }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["(2 + 3 I) - (7 - 6 I)", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ "Now consider the following problem: Solve for the unknown z in the \ equation:\n\n\t(3 - 2 i) z = (2 + 4 i).\n\t\nClearly, the answer is z = (3 - \ 2 i) / (2 + 4 i). But this isn't satisfactory. (Why?) ", StyleBox["Mathematica", FontSlant->"Italic"], " knows the answer. Activate the following cell:" }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["z = (2 + 4 I ) / (3 - 2 I)", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[StyleBox["How could you get this answer by hand ?? ", FontFamily->"Times", FontWeight->"Plain"]], "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["Mathematica", FontWeight->"Bold", FontSlant->"Italic"], " will even do some exotic stuff like the following:" }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Sin[z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["N[Sin[z]]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["z^3-2 z^2 + 2 + 3 I", "Input", ImageRegion->{{-0, 1}, {0, 1}}] }, Open ]], Cell[CellGroupData[{ Cell["More handles on complex numbers", "Subsection", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ "Here are two good tools to apply to the complex number \n\n\tz = x + y i \ , where x, y are reals.\n\nThe ", StyleBox["absolute value", FontSlant->"Italic"], " or ", StyleBox["modulus", FontSlant->"Italic"], " of z is the non-negative real number\n\n\t| z | = Sqrt [x", StyleBox["2", FontVariations->{"CompatibilityType"->"Superscript"}], " + y", StyleBox["2", FontVariations->{"CompatibilityType"->"Superscript"}], "].\n\t\n", StyleBox["Mathematica", FontSlant->"Italic"], " is aware of this idea, as well as the idea of real and imaginary parts \ of z ..." }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["z = 3 + 4 I", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Abs[z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Re[z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Im[z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ "Here is another important concept:: the (", StyleBox["complex", FontSlant->"Italic"], ") ", StyleBox["conjugate", FontSlant->"Italic"], " of a complex number z is given by\n\t_\n\tz = x - y i.\n\nAgain, ", StyleBox["Mathematica", FontSlant->"Italic"], " knows about this..." }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Conjugate[z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ "There are a few useful laws of arithmetic that these operations satisfy. \ Let z, z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " and z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], " be any three complex numbers. Then:\n\n\t| z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], " | = | z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " | | z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], " |\n\t| z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " + z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], " | ", "\[LessEqual]", " | z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " | + | z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], " |\n\t 2 _\n\t | z | = z z \n\t_______ \ __ __\n\t z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " + z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], " z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " + z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], "\n\t\n\t_____ __ __\n\tz", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " z", StyleBox["2", FontVariations->{"CompatibilityType"->"Subscript"}], " = z", StyleBox["1", FontVariations->{"CompatibilityType"->"Subscript"}], " z", StyleBox["2\n\t\nWe can check these laws with ", FontVariations->{"CompatibilityType"->"Subscript"}], StyleBox["Mathematica", FontSlant->"Italic", FontVariations->{"CompatibilityType"->"Subscript"}], StyleBox[" in specific examples. Here is one law. Try the others \ yourself.", FontVariations->{"CompatibilityType"->"Subscript"}] }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["z1 = 4 - 7 I", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["z2 = 3 + 2 I", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Conjugate[z1 z2]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Conjugate[z1] Conjugate[z2]", "Input", ImageRegion->{{-0, 1}, {0, 1}}] }, Closed]], Cell[CellGroupData[{ Cell["About the Fundamental Theorem of Algebra (FTOA) ...", "Subsection", ImageRegion->{{-0, 1}, {0, 1}}], Cell["\<\ Remember what it says: FTOA: Any non-constant polynomial in the variable z with complex \ coefficients has a root in the (field of) complex numbers.\ \>", "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ "Try solving this polynomial equation:\n\t\t\n\t\tz", StyleBox["2 ", FontVariations->{"CompatibilityType"->"Superscript"}], "+ z + 1 + i = 0.\n\n", StyleBox["Mathematica", FontSlant->"Italic"], " knows how ... but actually, you can do better by hand." }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Clear[z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Solve[z^2 + z + 1 + I == 0, z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ "Let's consider the problem of solving a fairly simple high degree \ polynomial equation of the form\n\t\t\tz", StyleBox["n", FontVariations->{"CompatibilityType"->"Superscript"}], " = a, \nwhere a is a given complex number. ", StyleBox["Mathematica", FontSlant->"Italic"], " already knows how. For example:" }], "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell["Clear[z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["n=3", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["solns = Solve[z^n == 1, z]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["rules = N[solns]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[StyleBox["Just to see what these points look like, let's graph \ them and then do a dot-to-dot::", FontFamily->"Times", FontWeight->"Plain"]], "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["\<\ roots = Table[{Re[z /. rules[[ii]]], Im[z /. rules[[ii]]]}, {ii,1,n}]\ \>", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["roots=Append[roots,First[roots]]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["ListPlot[roots,PlotJoined->True,AspectRatio->1]", "Input", ImageRegion->{{-0, 1}, {0, 1}}], Cell["\<\ Now go back and experiment with this sequence of cells a bit.. \ Change the degree.\ \>", "Text", ImageRegion->{{-0, 1}, {0, 1}}], Cell[TextData[{ "Actually, we can get a little more satisfying answer by hand if we use a \ tool known as the ", StyleBox["polar form", FontSlant->"Italic"], " of a complex number. Write, for a real number t, \n\t\n\t\t\te ", StyleBox["it", FontVariations->{"CompatibilityType"->"Superscript"}], " = cos t + i sin t\n\nso that every complex number z = x + i y can be \ written in the form\n\t\t\tz = r e ", StyleBox["it", FontVariations->{"CompatibilityType"->"Superscript"}], ",\n", StyleBox["where r = | z | and t is really the polar angle for the point \ z in the plane. We'll continue discussion of this in class, where I will \ give serveral assignments to be done on the computer (most easily done by \ recycling some cells in this notebook).", FontVariations->{"CompatibilityType"->"Subscript"}], "\n" }], "Text", ImageRegion->{{-0, 1}, {0, 1}}] }, Closed]], Cell[CellGroupData[{ Cell["Exercises", "Subsection", ImageRegion->{{-0, 1}, {0, 1}}], Cell["1. (fill in later)", "Text", ImageRegion->{{-0, 1}, {0, 1}}] }, Closed]] }, Open ]] }, FrontEndVersion->"4.0 for X", ScreenRectangle->{{0, 1152}, {0, 864}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 600}, WindowMargins->{{Automatic, 308}, {104, Automatic}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False} ] (*********************************************************************** 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, 5, 154, "Title"], Cell[1879, 58, 356, 9, 70, "Input"], Cell[CellGroupData[{ Cell[2260, 71, 66, 1, 45, "Subsection"], Cell[2329, 74, 378, 10, 68, "Text"], Cell[2710, 86, 72, 1, 27, "Input"], Cell[2785, 89, 382, 8, 122, "Text"], Cell[3170, 99, 77, 1, 27, "Input"], Cell[3250, 102, 157, 3, 28, "Input"], Cell[3410, 107, 193, 6, 32, "Text"], Cell[3606, 115, 57, 1, 27, "Input"], Cell[3666, 118, 60, 1, 27, "Input"], Cell[3729, 121, 70, 1, 27, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[3836, 127, 87, 1, 45, "Subsection"], Cell[3926, 130, 677, 20, 70, "Text"], Cell[4606, 152, 62, 1, 70, "Input"], Cell[4671, 155, 57, 1, 70, "Input"], Cell[4731, 158, 56, 1, 70, "Input"], Cell[4790, 161, 56, 1, 70, "Input"], Cell[4849, 164, 370, 12, 70, "Text"], Cell[5222, 178, 63, 1, 70, "Input"], Cell[5288, 181, 2141, 66, 70, "Text"], Cell[7432, 249, 63, 1, 70, "Input"], Cell[7498, 252, 63, 1, 70, "Input"], Cell[7564, 255, 67, 1, 70, "Input"], Cell[7634, 258, 78, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[7749, 264, 107, 1, 29, "Subsection"], Cell[7859, 267, 226, 6, 70, "Text"], Cell[8088, 275, 331, 9, 70, "Text"], Cell[8422, 286, 59, 1, 70, "Input"], Cell[8484, 289, 81, 1, 70, "Input"], Cell[8568, 292, 392, 10, 70, "Text"], Cell[8963, 304, 59, 1, 70, "Input"], Cell[9025, 307, 54, 1, 70, "Input"], Cell[9082, 310, 77, 1, 70, "Input"], Cell[9162, 313, 67, 1, 70, "Input"], Cell[9232, 316, 203, 4, 70, "Input"], Cell[9438, 322, 128, 4, 70, "Input"], Cell[9569, 328, 83, 1, 70, "Input"], Cell[9655, 331, 98, 1, 70, "Input"], Cell[9756, 334, 142, 4, 70, "Text"], Cell[9901, 340, 897, 20, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[10835, 365, 65, 1, 29, "Subsection"], Cell[10903, 368, 68, 1, 70, "Text"] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)