Mathematica Commands for Calculus

Mathematica is a powerful tool, but we are only going to need a few of it's capabilities. Below I have listed what should be all the Mathematica commands you may want for a calculus course. Mathematica preforms a command after you hit the 'enter' key, not the 'return' key. Mathematica is very picky about capitalization and about the difference between () and {} and [], so be careful.

1. This command clears any previous value of the function F which Mathematica may have stored.

Clear[F] 

2. This command defines a new function called F[x], not F(x). Notice that Mathematica requires you to put an underscore after the x when defining a function.

F[x_]=x^3

3. This command draws a graph of the function F[x]. The list {x, -2, 3} tells Mathematica to graph from x=-2 to x=3.

Plot[F[x],{x,-2,3}]

To specify the dimensions of your window along the y-axis you need to use

Plot[F[x], {x, -2, 3}, PlotRange->{-10,10}]

4. Mathematica knows how to find derivatives provided you tell it the function and the variable.

D[F[x],x]

5. Mathematica knows the two most useful constants.

Pi   E

6. Mathematica knows many popular functions. Log[x] means the natural log, which we often call ln.

Sin[x]   Cos[x]   Log[x]   E^(x)

You can find more functions in the function browser under the help menu.

7. You can get decimal approximations by using the N command

N[Pi]    N[Cos[34]]  N[Sqrt[2]]

8. Mathematica can do summation.

Sum[x^2, {x, -3, 1.9, .12}]

The list {x, -3 ,1.9, .12} gives the lower and upper limits for x, and tells Mathematica to increment each step by .12. In the Mathematica 3.0 you can use

[Graphics:commandsgr2.gif][Graphics:commandsgr1.gif]

9. Mathematica does symbolic integration of indefinite integrals

Integrate[F[x],x]

as well as definite integrals. Here the list {t, 2, Pi} tells Mathematica to integrate from t=2 to t=Pi.

Integrate[F[t],{t, 2, Pi}]

In Mathematica 3.0 you can use the symbols

[Graphics:commandsgr2.gif][Graphics:commandsgr3.gif]

10. If you prefer decimal approximations, you can use this command

NIntegrate[Log[x], {x, 1, 10}]

11. Mathematica can find limits.

Limit[(1+1/x)^x, x->Infinity]

Limit[((3+h)^2-3^2)/(h), h->0]

The arrow "->" is just the minus sign followed by the greater than sign.


Tom's Home Page