Our first demo

Here are the commands we executed on Tuesday, Oct. 26 1999, in the computer lab in BH 406. I have edited and re-organized a bit of it, for clarity, and added a few things here an there. This is not intended as a tutorial, but just as a set of examples that give you the ideas.

Please send me your suggestions for further examples at any time.

Note: to execute a command, you must hit the Shift-Enter key combination, not just the Enter key. This is to allow commands to have multiple lines at the user's discretion. The input is always in an Input Cell, marked by a Cell Label of the form In[ ]:=.

You can execute multiple cells by highlighting the cell brackets and then hitting Shift-Enter. You can execute all the cells in a notebook by using the menu command
Kernel/Evaluation/Evaluate Notebook, or by highlighting all the cells using ctrl-A, then hitting Shift-Enter.

Incidentally, you can get quite fancy with formatting Mathematica Notebooks, but we won't get into that here.

Plotting

Here is a basic plot of a basic function.

[Graphics:Images/index_gr_1.gif]

[Graphics:Images/index_gr_2.gif]

[Graphics:Images/index_gr_3.gif]

The default aspect ratio for a plot is [Graphics:Images/index_gr_4.gif], where [Graphics:Images/index_gr_5.gif] is the golden ratio. By the way, Matt knows the golden ratio:

[Graphics:Images/index_gr_6.gif]
[Graphics:Images/index_gr_7.gif]

We can get any aspect ratio we want. E.g.,

[Graphics:Images/index_gr_8.gif]

[Graphics:Images/index_gr_9.gif]

[Graphics:Images/index_gr_10.gif]

We can insist upon a true aspect ratio, but the results aren't always nice.

[Graphics:Images/index_gr_11.gif]

[Graphics:Images/index_gr_12.gif]

[Graphics:Images/index_gr_13.gif]

In the above case, we have a true aspect ratio but aren't shown the entire plot. We can insist on that too.

[Graphics:Images/index_gr_14.gif]

[Graphics:Images/index_gr_15.gif]

[Graphics:Images/index_gr_16.gif]

But that has other undesirable effects. (Good thing we didn't try that with [Graphics:Images/index_gr_17.gif] in place of [Graphics:Images/index_gr_18.gif].) We can look at a portion of the plot. PlotRange can be used to set the range of [Graphics:Images/index_gr_19.gif]-values, as in the next two examples...

[Graphics:Images/index_gr_20.gif]

[Graphics:Images/index_gr_21.gif]

[Graphics:Images/index_gr_22.gif]
[Graphics:Images/index_gr_23.gif]

[Graphics:Images/index_gr_24.gif]

[Graphics:Images/index_gr_25.gif]

... or you can set the horizontal and vertical ranges independently. Notice that the PlotRange is independent of the actual range of values plotted!

[Graphics:Images/index_gr_26.gif]

[Graphics:Images/index_gr_27.gif]

[Graphics:Images/index_gr_28.gif]

We can plot many functions simultaneously. Here is the function [Graphics:Images/index_gr_29.gif] along with the function [Graphics:Images/index_gr_30.gif], which we calculated as the tangent line to the first function when [Graphics:Images/index_gr_31.gif].

[Graphics:Images/index_gr_32.gif]

[Graphics:Images/index_gr_33.gif]

[Graphics:Images/index_gr_34.gif]

It looks okay, but the slope doesn't look like 3. Let's go with the natural aspect ratio again.

[Graphics:Images/index_gr_35.gif]

[Graphics:Images/index_gr_36.gif]

[Graphics:Images/index_gr_37.gif]

And oh yes, we can use different colors.

[Graphics:Images/index_gr_38.gif]

[Graphics:Images/index_gr_39.gif]

[Graphics:Images/index_gr_40.gif]

There are a many Options for the Plot command. We cannot look at all of them now, but just to give you an idea, ...

[Graphics:Images/index_gr_41.gif]
[Graphics:Images/index_gr_42.gif]

Other plotting

There are many kinds of plotting that Matt knows. Some are built in, others can be loaded from "Standard Packages" which are included. Here is the bifolium. The first command loads the ImplicitPlot package.

Needs["Graphics`ImplicitPlot`"]
ImplicitPlot[(x^2+y^2)^2==4x^2 y, {x, -2, 2}]

[Graphics:Images/index_gr_43.gif]

[Graphics:Images/index_gr_44.gif]

3D Plotting

Later, in Calc II, you'll plot stuff in two dimensions. (And did I mention derivatives in two dimensions?)

[Graphics:Images/index_gr_45.gif]

[Graphics:Images/index_gr_46.gif]

[Graphics:Images/index_gr_47.gif]

Ugh. I have always found that the default number of points used for ploting is far too few in Matt's two-dimensional routine.

[Graphics:Images/index_gr_48.gif]
[Graphics:Images/index_gr_49.gif]

So let's increase it to 50 (in each direction).

[Graphics:Images/index_gr_50.gif]

[Graphics:Images/index_gr_51.gif]

[Graphics:Images/index_gr_52.gif]

We can change the ViewPoint. (For this, the menu command Input/3d ViewPoint Selector can be used.)

[Graphics:Images/index_gr_53.gif]

[Graphics:Images/index_gr_54.gif]

[Graphics:Images/index_gr_55.gif]

This was not discussed in the live demo, but I'll mention it anyway, to give you a glimpse of what might be part of your mathematical future. Another way of representing two-dimensional data is the DensityPlot.

[Graphics:Images/index_gr_56.gif]

[Graphics:Images/index_gr_57.gif]

[Graphics:Images/index_gr_58.gif]

Here's another, called ContourPlot.

[Graphics:Images/index_gr_59.gif]

[Graphics:Images/index_gr_60.gif]

[Graphics:Images/index_gr_61.gif]

You can mess with colors, etc.

[Graphics:Images/index_gr_62.gif]

[Graphics:Images/index_gr_63.gif]

[Graphics:Images/index_gr_64.gif]

While we are at it, here's another way to view the bifolium. I'm giving it a name for future use.

[Graphics:Images/index_gr_65.gif]

[Graphics:Images/index_gr_66.gif]

[Graphics:Images/index_gr_67.gif]

Hey, I don't see any bifolium. Try again, but notice that the bifolium is the solution to [Graphics:Images/index_gr_68.gif]. So I'll plot the previous along with a plot of zero.

[Graphics:Images/index_gr_69.gif]

[Graphics:Images/index_gr_70.gif]

[Graphics:Images/index_gr_71.gif]

Now look at them together. See it?

[Graphics:Images/index_gr_72.gif]

[Graphics:Images/index_gr_73.gif]

[Graphics:Images/index_gr_74.gif]

That's just for fun. Here's a similar view using ContourPlot, but showing three contours. (Looks like we found a "bug" in the program.)

[Graphics:Images/index_gr_75.gif]

[Graphics:Images/index_gr_76.gif]

[Graphics:Images/index_gr_77.gif]
[Graphics:Images/index_gr_78.gif]

[Graphics:Images/index_gr_79.gif]

[Graphics:Images/index_gr_80.gif]

That bird looks hungry.

Functions, derivatives, and all that

Basic stuff

First of all, recall that the underscore_ is used to denote the dummy variable in a function's definition. More about that later.

Here is the function you all gave me.

[Graphics:Images/index_gr_81.gif]
[Graphics:Images/index_gr_82.gif]

Here's the derivative. It's pretty easy. Notice, however, that it isn't necessarily expressed  the way you might want.

[Graphics:Images/index_gr_83.gif]
[Graphics:Images/index_gr_84.gif]

The Simplify command can sometimes get you something nicer, but not always. Notice the use of  %, which refers to the previous Output.

[Graphics:Images/index_gr_85.gif]
[Graphics:Images/index_gr_86.gif]

Second (and third and fourth, etc.) derivatives are just as easy to enter.

[Graphics:Images/index_gr_87.gif]
[Graphics:Images/index_gr_88.gif]

(I don't want to play with that function anymore. )

Speaking of functions, let's mention now the use of delimiters by Mathematica. It is very strict and very consistent: use brackets [ ] as you would to delimit functions. So, f[x] instead of [Graphics:Images/index_gr_89.gif]. All Mathematica commands, such as Plot, Simplify, etc., are functions. There are other symbols in Mathematica that aren't functions, e.g., numerical constants (GoldenRatio, Pi, E), options to functions (PlotRange, AspectRatio, etc.), and some other things, but commands are functions. The next set of delimiters is the braces {}, which delimit lists. Lists are integral to Mathematica and there are many, many list processing commands. No time for that now, but think of the lists as you might finite sets, vectors, etc. Finally, there are the parentheses (), which are used exclusively for grouping.

About the underscore on variables when defining functions. If you don't use one, Matt assumes you literally mean what you say.  Suppose you want to define the function [Graphics:Images/index_gr_90.gif].

[Graphics:Images/index_gr_91.gif]
[Graphics:Images/index_gr_92.gif]

Now you want to compute [Graphics:Images/index_gr_93.gif], which should be [Graphics:Images/index_gr_94.gif]. But instead, we get

[Graphics:Images/index_gr_95.gif]
[Graphics:Images/index_gr_96.gif]

as the value of r[1] is unknown (except as r[1]).

What we really did was tell Matt that the function [Graphics:Images/index_gr_97.gif] should return [Graphics:Images/index_gr_98.gif] in the event that it receives the Symbol s. This is certainly useful for applying functions to various sets. But if we want to tell Matt that [Graphics:Images/index_gr_99.gif] where [Graphics:Images/index_gr_100.gif] is a dummy variable, then we use the underscore. Let's actually define  [Graphics:Images/index_gr_101.gif]

[Graphics:Images/index_gr_102.gif]
[Graphics:Images/index_gr_103.gif]
[Graphics:Images/index_gr_104.gif]
[Graphics:Images/index_gr_105.gif]
[Graphics:Images/index_gr_106.gif]
[Graphics:Images/index_gr_107.gif]

But notice that it still remembers the original definition.

[Graphics:Images/index_gr_108.gif]
[Graphics:Images/index_gr_109.gif]

So, to be safe, Clear the old values first.

[Graphics:Images/index_gr_110.gif]
[Graphics:Images/index_gr_111.gif]
[Graphics:Images/index_gr_112.gif]
[Graphics:Images/index_gr_113.gif]
Piecewise-defined functions

The following is probably self-explanatory, at least after you look at the graph below.

[Graphics:Images/index_gr_114.gif]
[Graphics:Images/index_gr_115.gif]

[Graphics:Images/index_gr_116.gif]

[Graphics:Images/index_gr_117.gif]

Unfortunately, Matt won't attempt the derivative of such a function.

[Graphics:Images/index_gr_118.gif]
[Graphics:Images/index_gr_119.gif]
Miscellaneous algebra commands
[Graphics:Images/index_gr_120.gif]
[Graphics:Images/index_gr_121.gif]
[Graphics:Images/index_gr_122.gif]
[Graphics:Images/index_gr_123.gif]
[Graphics:Images/index_gr_124.gif]
[Graphics:Images/index_gr_125.gif]
[Graphics:Images/index_gr_126.gif]
[Graphics:Images/index_gr_127.gif]
[Graphics:Images/index_gr_128.gif]
[Graphics:Images/index_gr_129.gif]
From the live demo: Kids, DON'T type stuff like Sin^2[x] instead of Sin[x]^2, as I did by mistake. (Open up this cell for more trivia.)
Limits

Matt knows limits.

[Graphics:Images/index_gr_144.gif]

Of course, [Graphics:Images/index_gr_145.gif] is undefined.:

[Graphics:Images/index_gr_146.gif]
[Graphics:Images/index_gr_147.gif]
[Graphics:Images/index_gr_148.gif]
[Graphics:Images/index_gr_149.gif]

We can plot this and probably won't get yelled at, even though [Graphics:Images/index_gr_150.gif] is undefined at [Graphics:Images/index_gr_151.gif].

[Graphics:Images/index_gr_152.gif]

[Graphics:Images/index_gr_153.gif]

[Graphics:Images/index_gr_154.gif]

Okay, here's the limit. (Of course,we know how to compute this one with ease.)

[Graphics:Images/index_gr_155.gif]
[Graphics:Images/index_gr_156.gif]

The graph certainly agrees with the limit.

We can also look at one-sided limits. Here are two limits, one as [Graphics:Images/index_gr_157.gif] and one where [Graphics:Images/index_gr_158.gif].

[Graphics:Images/index_gr_159.gif]
[Graphics:Images/index_gr_160.gif]
[Graphics:Images/index_gr_161.gif]
[Graphics:Images/index_gr_162.gif]
[Graphics:Images/index_gr_163.gif]

These might appear to be backwards,but think about it this way: from zero, the  Direction toward 1 is from the left, while the Direction toward -1 is from the right.

Wow, the following is disappointing:

[Graphics:Images/index_gr_164.gif]
[Graphics:Images/index_gr_165.gif]

It seems that the default direction is from the right. (See section 3.6.8, Finding Limits, in the Help.) We'll have to handle this ourselves.

If you must, you could do things your own way.

[Graphics:Images/index_gr_166.gif]
[Graphics:Images/index_gr_167.gif]
[Graphics:Images/index_gr_168.gif]
[Graphics:Images/index_gr_169.gif]
[Graphics:Images/index_gr_170.gif]
[Graphics:Images/index_gr_171.gif]
[Graphics:Images/index_gr_172.gif]
Solving equations

But suppose we need to now where [Graphics:Images/index_gr_173.gif], for the function above. There is a function called Solve that is extremely useful. For instance, it can solve polynomial equations in a heartbeat. We'll look at that in a moment. We try it on  [Graphics:Images/index_gr_174.gif].

[Graphics:Images/index_gr_175.gif]
[Graphics:Images/index_gr_176.gif]
[Graphics:Images/index_gr_177.gif]

Solve tells Matt to try to find an exact solution, but Matt cannot do so for this equation. (Neither can anyone else.) Luckily, we can find numerical solutions. (One of the basic tools is Newton's method, but that is all internal.)  We'll tell it to start looking near [Graphics:Images/index_gr_178.gif].

[Graphics:Images/index_gr_179.gif]
[Graphics:Images/index_gr_180.gif]

So the actual point of intersection is roughly

[Graphics:Images/index_gr_181.gif]
[Graphics:Images/index_gr_182.gif]

Here's a graph, for fun, showing the point.

[Graphics:Images/index_gr_183.gif]

[Graphics:Images/index_gr_184.gif]

[Graphics:Images/index_gr_185.gif]

Let's look at another function, more like one we've seen in class.

[Graphics:Images/index_gr_186.gif]
[Graphics:Images/index_gr_187.gif]

We like to set derivatives equal to zero. Here is a summary of what we do by hand.

[Graphics:Images/index_gr_188.gif]
[Graphics:Images/index_gr_189.gif]
[Graphics:Images/index_gr_190.gif]
[Graphics:Images/index_gr_191.gif]
[Graphics:Images/index_gr_192.gif]
[Graphics:Images/index_gr_193.gif]

But we are able to cut out the intermediate steps and go right for the throat.

[Graphics:Images/index_gr_194.gif]
[Graphics:Images/index_gr_195.gif]

Let's note that later on we'll also be interested in the places that the second derivative is zero. No problem.

[Graphics:Images/index_gr_196.gif]
[Graphics:Images/index_gr_197.gif]

We like to find extremes. Here's a canned function that does part of that. It finds a relative minimum, if you steer it in the right direction.

[Graphics:Images/index_gr_198.gif]
[Graphics:Images/index_gr_199.gif]

There is no bult-in FindMaximum, but we can create one. I won't explain how this works, nor will I warranty its use.

[Graphics:Images/index_gr_200.gif]
[Graphics:Images/index_gr_201.gif]
[Graphics:Images/index_gr_202.gif]

Seems to work:

[Graphics:Images/index_gr_203.gif]

[Graphics:Images/index_gr_204.gif]

[Graphics:Images/index_gr_205.gif]

As we said, Solve can find exact solutions. Here's a lowly quadratic.

[Graphics:Images/index_gr_206.gif]
[Graphics:Images/index_gr_207.gif]

You can verify that using the quadratic formula. Oh, yeah, here's Matt's version of the quadratic formula:

[Graphics:Images/index_gr_208.gif]
[Graphics:Images/index_gr_209.gif]

Matt knows cubics.

[Graphics:Images/index_gr_210.gif]
[Graphics:Images/index_gr_211.gif]

It is hard to decipher this one, but note the imaginary number , which denotes [Graphics:Images/index_gr_212.gif]. I named the output s3 so we could mess with it below.

Numerical values

Usually, the function N is used for basic numerical evaluations. It turns exact values into decimals.

[Graphics:Images/index_gr_213.gif]
[Graphics:Images/index_gr_214.gif]

(We pause for a moment to observe that the complex roots of this polynomial equation occur in complex conjugate pairs, since the poly in question has real coefficients.)

Now, while it might not seem necessary very often, occasionally one wants lots of precision. You want 200 digits? No problem.

[Graphics:Images/index_gr_215.gif]
[Graphics:Images/index_gr_216.gif]
Replacement Rules

Take another look at the numerical solution to [Graphics:Images/index_gr_217.gif].

[Graphics:Images/index_gr_218.gif]
[Graphics:Images/index_gr_219.gif]

How do we actually use these in other situations, without actually copying the values? The construct x->-3.28198 is an example of a replacement rule, and here are some examples of how it works.

[Graphics:Images/index_gr_220.gif]
[Graphics:Images/index_gr_221.gif]
[Graphics:Images/index_gr_222.gif]
[Graphics:Images/index_gr_223.gif]
[Graphics:Images/index_gr_224.gif]
[Graphics:Images/index_gr_225.gif]
[Graphics:Images/index_gr_226.gif]
[Graphics:Images/index_gr_227.gif]

So, for example, in our earlier example, we can obtain a list of the values (without replacement rules) for easier manipulation as follows.

[Graphics:Images/index_gr_228.gif]
[Graphics:Images/index_gr_229.gif]

We can now operate on this list of values. We can add them:

[Graphics:Images/index_gr_230.gif]
[Graphics:Images/index_gr_231.gif]

Say, that's a pretty simple result. We might recall  that there is a basic result concerning the sum of the roots of a polynomial equation. Check this out.

[Graphics:Images/index_gr_232.gif]
[Graphics:Images/index_gr_233.gif]

Aha. And we recall a similar fact about the product of the roots.

[Graphics:Images/index_gr_234.gif]
[Graphics:Images/index_gr_235.gif]

And now we might wonder if there is a similar result that produces [Graphics:Images/index_gr_236.gif], and of course there is, but I'll tell you later if you want.

Since polynomials are so basic and important, we mention that polynomial equations of degrees up to 4 can always be solved exactly (even by humans). For instance,

[Graphics:Images/index_gr_237.gif]
[Graphics:Images/index_gr_238.gif]

That's hideous.

[Graphics:Images/index_gr_239.gif]
[Graphics:Images/index_gr_240.gif]

So what about degree 5 polys (and higher)? In general, the quintic has no solution by radicals. This is a famous classical result that we cannot go into here, but it won't slow us down too much. In fact, Mathematica's "solution" of a quintic is easier to read than that of a quartic (4th degree) equation, because it cannot explicitly tell us the exact solutions.

[Graphics:Images/index_gr_241.gif]
[Graphics:Images/index_gr_242.gif]

Still, we can use these as before.

[Graphics:Images/index_gr_243.gif]
[Graphics:Images/index_gr_244.gif]

Finally, we note that there is a single function that combines N and Solve. It is called (surprise) NSolve, and is essentially N applied to Solve.

[Graphics:Images/index_gr_245.gif]
[Graphics:Images/index_gr_246.gif]
Some List stuff

Mathematica is a very powerful numerical computing platform, but it is also a sophisticated list processing machine. We can only scratch the surface here with some examples.

[Graphics:Images/index_gr_247.gif]
[Graphics:Images/index_gr_248.gif]
[Graphics:Images/index_gr_249.gif]
[Graphics:Images/index_gr_250.gif]
[Graphics:Images/index_gr_251.gif]
[Graphics:Images/index_gr_252.gif]
[Graphics:Images/index_gr_253.gif]
[Graphics:Images/index_gr_254.gif]
[Graphics:Images/index_gr_255.gif]
[Graphics:Images/index_gr_256.gif]

If you already have a list and you need to play with it, there are many functions for this.

[Graphics:Images/index_gr_257.gif]
[Graphics:Images/index_gr_258.gif]
[Graphics:Images/index_gr_259.gif]
[Graphics:Images/index_gr_260.gif]
[Graphics:Images/index_gr_261.gif]
[Graphics:Images/index_gr_262.gif]
[Graphics:Images/index_gr_263.gif]
[Graphics:Images/index_gr_264.gif]
[Graphics:Images/index_gr_265.gif]
[Graphics:Images/index_gr_266.gif]
[Graphics:Images/index_gr_267.gif]
[Graphics:Images/index_gr_268.gif]
[Graphics:Images/index_gr_269.gif]
[Graphics:Images/index_gr_270.gif]
[Graphics:Images/index_gr_271.gif]
[Graphics:Images/index_gr_272.gif]
[Graphics:Images/index_gr_273.gif]
[Graphics:Images/index_gr_274.gif]
[Graphics:Images/index_gr_275.gif]
[Graphics:Images/index_gr_276.gif]
[Graphics:Images/index_gr_277.gif]

[Graphics:Images/index_gr_278.gif]

[Graphics:Images/index_gr_279.gif]
Randomness

Random numbers are useful in modeling problems. Matt has different types of (pseudo)random numbers, some simple varieties being as follows.

[Graphics:Images/index_gr_280.gif]
[Graphics:Images/index_gr_281.gif]
[Graphics:Images/index_gr_282.gif]
[Graphics:Images/index_gr_283.gif]
[Graphics:Images/index_gr_284.gif]
[Graphics:Images/index_gr_285.gif]

Let's compute the average of the previous result, which we have named i100. First, an averaging function:

[Graphics:Images/index_gr_286.gif]
[Graphics:Images/index_gr_287.gif]
[Graphics:Images/index_gr_288.gif]
Lots more

To give you an idea of the number of Mathematica commands, here are the ones beginning with A. (Actually, not all of these are commands; some are options for commands. But still...)

[Graphics:Images/index_gr_289.gif]
Abort                     Append
AbortProtect              AppendTo
Above                     Apply
Abs                       ArcCos
AbsoluteDashing           ArcCosh
AbsoluteOptions           ArcCot
AbsolutePointSize         ArcCoth
AbsoluteThickness         ArcCsc
AbsoluteTime              ArcCsch
AccountingForm            ArcSec
Accuracy                  ArcSech
AccuracyGoal              ArcSin
Active                    ArcSinh
ActiveItem                ArcTan
Adams                     ArcTanh
AddOnHelpPath             Arg
AddTo                     ArgumentCountQ
AdjustmentBox             ArithmeticGeometricMean
AdjustmentBoxOptions      Array
After                     AspectRatio
AiryAi                    AspectRatioFixed
AiryAiPrime               Assumptions
AiryBi                    AtomQ
AiryBiPrime               Attributes
AlgebraicRules            AutoDelete
AlgebraicRulesData        AutoEvaluateEvents
Algebraics                AutoGeneratedPackage
Alias                     AutoIndent
AlignmentMarker           AutoIndentSpacings
All                       AutoItalicWords
AllowInlineCells          AutoloadPath
Alternatives              Automatic
AmbientLight              AutoOpenPalettes
Analytic                  AutoScroll
AnchoredSearch            AutoSpacing
And                       AutoStyleOptions
AnimationCycleOffset      Axes
AnimationCycleRepetitions AxesEdge
AnimationDirection        AxesLabel
AnimationDisplayTime      AxesOrigin
Apart                     AxesStyle
ApartSquareFree           Axis
AppellF1
Some funny things.

We mentioned in class that some texts define inverse cotangent function so that its range is [Graphics:Images/index_gr_290.gif]. That's just what Matt does!! From the Help:

• For real [Graphics:Images/index_gr_291.gif], the results are always in the range -π/2 to π/2, excluding 0.

(They should mention also, "excluding [Graphics:Images/index_gr_292.gif].")

[Graphics:Images/index_gr_293.gif]
[Graphics:Images/index_gr_294.gif]
[Graphics:Images/index_gr_295.gif]
[Graphics:Images/index_gr_296.gif]
[Graphics:Images/index_gr_297.gif]
[Graphics:Images/index_gr_298.gif]

Another bothersome item: principal roots! This actually makes other things simple, but it is extremely annoying. The (real) cube root of [Graphics:Images/index_gr_299.gif] is of course [Graphics:Images/index_gr_300.gif]. But look at this:

[Graphics:Images/index_gr_301.gif]
[Graphics:Images/index_gr_302.gif]

Not [Graphics:Images/index_gr_303.gif]? Here's its numerical value:

[Graphics:Images/index_gr_304.gif]
[Graphics:Images/index_gr_305.gif]

What the hey? Well, if you recall DeMoivre's theorem, you know that every nonzero complex number has [Graphics:Images/index_gr_306.gif] distinct [Graphics:Images/index_gr_307.gif]'th roots. If [Graphics:Images/index_gr_308.gif] is a complex number, then these are given by [Graphics:Images/index_gr_309.gif]. The principal n'th root is the one obtained by letting [Graphics:Images/index_gr_310.gif]. Here, θ is the angle in the complex plane, in standard position, terminating at [Graphics:Images/index_gr_311.gif]. In any case, the principal root is the one used by Mathematica.

This can be a pain.

[Graphics:Images/index_gr_312.gif]
[Graphics:Images/index_gr_313.gif]
[Graphics:Images/index_gr_314.gif]
[Graphics:Images/index_gr_315.gif]
[Graphics:Images/index_gr_316.gif]

[Graphics:Images/index_gr_317.gif]

[Graphics:Images/index_gr_318.gif]

I don't like getting yelled at by a computer. If this is too much to bear, there is a package called RealOnly that can be loaded so that these troubles are swept under the rug.

[Graphics:Images/index_gr_319.gif]
[Graphics:Images/index_gr_320.gif]
[Graphics:Images/index_gr_321.gif]
[Graphics:Images/index_gr_322.gif]

[Graphics:Images/index_gr_323.gif]

[Graphics:Images/index_gr_324.gif]
ln(x) and the number e.

Just remember that [Graphics:Images/index_gr_325.gif] is Log[x]. You can change that.

[Graphics:Images/index_gr_326.gif]
[Graphics:Images/index_gr_327.gif]
[Graphics:Images/index_gr_328.gif]
[Graphics:Images/index_gr_329.gif]
[Graphics:Images/index_gr_330.gif]
[Graphics:Images/index_gr_331.gif]
[Graphics:Images/index_gr_332.gif]
More later, I'm tired.


Converted by Mathematica      October 27, 1999