A Brief Introduction to Mathematica

Math 104 Calculus II, February 25, 2020
T. Ratliff, Wheaton College
ratliff_thomas@wheatoncollege.edu

A few things to begin with

* This is a Text cell that allows for comments. 
* All Mathematica commands are contained in Input cells (you can change to cell style in the Format menu) 
* The Help - Wolfram Documentation menu will be your friend
	The Palettes - Basic Math Assistant is also useful for entering mathematical syntax
* We’ll only touch on a tiny subset of what Mathematica can do, so feel free to explore!

To execute a command, you must press Shift-Return.

128^2/143 + 712*32^3/10234

Every built-in Mathematica command begins with a capital letter and Mathematica uses square brackets [ ] to delimit inputs.

Expand[ (x+2)^7]

To get a decimal value for an output, you can use the N[ ] command

N[128^2/143 + 712*32^3/10234]

Examples of Plots

Plot[ Cos[x]+Sin[x], {x,-Pi,3*Pi}]

To plot more than one function on the same set of axes

Plot[ { Cos[x]+Sin[x], -1/8 x + 1},{x,-Pi,3Pi}]

Consider the region graphed below:

Plot[x^2/4+1,{x,-1,3},Filling->Axis,PlotRange->{0,4}]

Let’s rotate it about the x-axis. FYI, the RevolutionAxis option specifies that we’re rotating about the x-axis.

RevolutionPlot3D[x^2/4+1, {x,-1,3},RevolutionAxis->{1, 0, 0}]

Remember this example from February 7?

Plot[x^2+1,{x,-2,2},Filling->Axis,PlotRange->{0,5}]

RegionPlot3D[ -2≤x && x≤2 && 0≤ y && y≤ x^2+1 && z≥0 &&  z≤ x^2+1,{x,-2,2},{y,0,5},{z,0,5},AxesLabel->{x,y,z}, PlotPoints->60]

Differentiation and Integration

Mathematica can also find first and second derivatives, and both definite and indefinite integrals

D[Cos[x^2+Log[x]],x]

D[Cos[x^2+Log[x]],x,x]

Integrate[ArcSin[x],x]

Integrate[x*Exp[x], {x,-2,3}]

Remember about the N[ ] command

N[Integrate[x*Exp[x], {x,-2,3}]]

A few commands useful for sequences and series

Consider the series (∑_(k=1)^∞)((((1/2)))^k)

We can use the Table[ ] command will build list the terms through index 10

t = Table[(1/2)^k, {k,0,10}]

We can plot the terms

ListPlot[t]

We can use the Sum[ ] command to find some partial sums

Sum[ (1/2)^k, {k,0,5}]

Or build a table of the first several partial sums

t2 = Table[ Sum[(1/2)^k,{k,0,n}],{n,0,10}]

ListPlot[t2]

Notice the limit of the terms vs the limit of the partial sums!

Accessing WolframAlpha

You can also access WolframAlpha by typing the equal sign = at the beginning of a line, enter your command, and then press Return. This is handy for the times you don’t know the Mathematica syntax. 
You can also use the + button to get more information, including access to WolframAlpha Pro

Click on the ‘+‘ button and check out the step-by-step solution to this one