Mathematica Quick Reference

To carry out computations, press Shift+Enter.

Defining Functions

A[r_]:=Pi * r^2

f[x_]:=x^3+2*x^2+1

f[x_,y_]:=x^2+y^2

Common Functions

Abs[x]

Sqrt[x]

Sin[x], Cos[x], Tan[x], Csc[x], Sec[x], Cot[x]

ArcSin[x], ArcCos[x], ArcTan[x], ArcCsc[x], ArcSec[x], ArcCot[x]

Exp[x], Log[x], Log[b,x]

Sinh[x], Cosh[x], Tanh[x], Csch[x], Sech[x], Coth[x]

Plotting

Plot[A[r],{r,0,10}]

Plot[Sin[x],{x,-2*Pi,2*Pi}]

Plot[Sin[x],{x,Pi,3*Pi},AxesOrigin->{0,0}]

ParametricPlot[{Sin[t], Sin[2t]}, {t, 0, 2Pi}]

Needs["Graphics`SurfaceOfRevolution`"]
SurfaceOfRevolution[Cos[x]+2, {x, 0, 6}, RevolutionAxis->{1,0}]

Numerical Evaluation

N[Pi]  (Evaluate Pi)

N[Pi,100]  (Evaluate Pi to 100 digits)

N[Sin[Pi/3],50]

Limits

Limit[1/x,x->0,Direction->-1]  (Limit from above)

Limit[1/x,x->0,Direction->1]  (Limit from below)

Limit[Sin[x]/x,x->0]  (Two-sided limit)

Equations

Solve[x^2+2x-3==0,x]

Solve[{3*x-2*y==1,4*x+7*y==7},{x,y}]

NSolve[4x^4-5x^3+7x^2-8x+7==0, x] (Approximate solutions of polynomial equations)

FindRoot[Cos[x]==x, {x, 1}]

FindRoot[Cos[x]==x, {x, {0, 1}}]

Derivatives

D[x^3+5x-8,x]  (First derivative wrt x)

D[Sin[x],{x,2}]  (Second derivative wrt x)

A'[r]  (First derivative of A[r], assuming this function is defined)

D[A[r],r]

D[x^2y+y^2==5,x,NonConstants->{y}]  (Implicit Differentiation.  Then use SOLVE to get dy/dx)

Sums

Sum[i,{i,1,100,1}] (Sum: 1+2+3+...+100)

Sum[f[x],{x,0,50,0.5}] (Sum: f[0]+f[0.5]+f[1]+...+f[49.5]+f[50])

Integrals

Integrate[Sin[x], x] ( Indefinite integral, Integrate with respect to x )

Integrate[f[x], {x, 0, Pi}] ( Definite integral from x=0 to x=Pi )

NIntegrate[Exp[-x^2], {x, 0, 1}] (Numerical integration)

NIntegrate[1/x^3, {x, -1, 0, 1}] (Integrate from -1 to 1 but check intermediate points for infinite discontinuities)

Series

Series[Exp[x], {x, 0, 5}]

Normal[%] (Truncates the power series)

Algebra

Apart[R[x]] (Partial fraction decomposition of R(x))

Together[%]

Factor[x^2-5x+6]