next up previous
Next: Matrices and Vectors Up: Mathematica Previous: Mathematica inbuilt (pre-defined) mathematical

Mathematica inbuilt (pre-defined) "functions" (or operations)

Here is a list of some of the most commonly used Mathematica inbuilt "functions" (or operations).

Name Example Usage Description
     
Clear[variable] Clear[ a ] Clears any previous definition of the variable
N[expression] N[Exp[2]] will return 7.38906. Returns the numerical value of argument to 6 sig.figs
    (Note that Exp[2] alone will return the pure number $e^2$
N[expression, figs] N[Exp[2],20] returns answer to 20 sig.figs. Returns the numerical value of argument to figs significant figures
     
Plot[f[x],{x,xmin,xmax}] Plot[x^2-1,{x,0,2}] Plots the function f(x) within the x-limits specified
     
Integrate[f[x],{x,xmin,xmax}] Integrate[Sin[x],{x,0,Pi}] Integrates the function f(x) between the x-limits specified
     
D[f[x],x] D[x^2 + x y,x] Partial derivative of the function f(x) w.r.t. the variable x
  D[g[x,y],x] Partial derivative of the user-defined function g(x,y) w.r.t. the variable x
D[f[x,y,...],x,y...] D[6 Exp[x^3] Sin[y], x,y] Partial derivative of the function f w.r.t. the variables x,y, ...
  = D[D[6 Exp[x^3] Sin[y], x],y]  
     
Solve[lhs==rhs,x] Solve[x^2-2x+1==0,x] Solves the equation(s) w.r.t the variable specified
  Solve[{x^2-2y+1==0,x==2y},{x,y}] Note that if there is more than one equation, then these
    equations must be in a list { lhs1=rhs1, lhs2=rhs2, ...}
     
DSolve[equation, f[x], x ] DSolve[f''[x]== -f[x], f[x], x] Solves the differential equation for the function f[x]
     
NDSolve[equation(s), f[x], x ] NDSolve[{f''[x]== -f[x], f'[0]==0, f[0]==1} , f[x], {x,0,4}] Numerically solves the differential equation for the function f[x]
   in the interval [0,4]
     
Expand[expression] Expand[ (a+b)^2 ] Expands the expression (i.e. gets rid of brackets)
     
Factor[expression] Factor[ a^2 + 2a b + b^2 ] Factors the expression
     
Simplify[expression] Simplify[ Cos[t]^2 - Sin[t]^2 ] Attempts to re-write the expression into a simpler format


next up previous
Next: Matrices and Vectors Up: Mathematica Previous: Mathematica inbuilt (pre-defined) mathematical
Chris Allton 2006-12-01