Introduction to Mathematical Software

21-126, Spring 2000
Dr. David Handron

Lesson 13

Mathematica's Calculus Functions

Limits

The basic command to compute a limit of an expression at x=a is Limit[ expression, x->a]

Limit[Sin[x] / x,  x -> 0]

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

Limit[1/h,  h -> 0]

Limit[Sin[1/x],  x -> 0]

Limit[Abs[x]/x,  x -> 0]

Derivatives

D[x^2, x]

D[x*Sin[x],  x, x]

D[x*Sin[x],  {x, 2}]

D[f[x], x]

FullForm[%]

?Derivative

D[x^2 f[x^2],  x]

ff  =  x^2 y^2  -  x y^3  +  Sin[x y]

D[ff,  x,  y]

Implicit Differentiation

D[x^2  +  y[x]^2,  x]

Solve[% == 0, y'[x]]

Integration

Integrate[x^n, x]

Integrate[x^n, n]

D[%, n]

When Mathematica can't compute an integral it does nothing:

Integrate[Sin[Sin[x]],  x]

Limits of integrals are put into a short list

Integrate[x^2, {x, 0, 1}]

Integrate[x^n,  {x, 0, 1}]

Special functions are sometimes returned for integrals

Integrate[Sin[Sin[x]],  {x, 0, Pi}]

N[%]

... and sometimes not

Integrate[Sin[Sin[x]],  {x, 0,  1}]

N[%]

Infinite ranges can be accomodated

Integrate[Exp[-x],  {x, 0, Infinity}]

Mathematica will compute multiple integrals

Integrate[f[x, y],  {x, 0, 1},  {y, 0, x}]

For example, to compute a quater of the area of a circle

Integrate[1,  {x, 0, 1},  {y, 0, Sqrt[1 - x^2]}]

Series

Mathematica will also compute series

Series[Sin[x], {x, 0, 7}]

Series[Sin[x],  {x, Pi/2,  7}]

Series[f[x],  {x, 0,  3}]

Series[(f[x + h] - f[x])/h,  {h,  0, 4}]

Series[(f[x + h] - f[x - h])/(2 h),  {h, 0, 4}]