Mathematica Command Sheet
** To enter commands, simply type in the browser window, followed
by the "enter" key (not the "return" key) **
** It may be helpful to use the Basic Input Pallete for your computations.
Palletes can be found under the File Menu. **
1. Getting Help
- ? CommandName gives a description of the
command, commandName, along with syntax
- ?? CommandName gives a description of the command,
commandName, along with syntax anda list of all options that can
be used with the command
- Highlight a command, then pull down Help
Menu and choose Find Selected Function - this gives a description
of the command along with syntax
2. Defining and Evaluating Functions
- f[x_]:= algebraic expression in x defines
f as a function of x
- f[xValue] gives the value of the function, f, for
x = xValue
- f[2], enter (should
provide 11 in return)
- f'[x] gives an algebraic derivative of f[x]
- f'[xValue] gives the value of the derivative of f[x]
for x = xValue
- f'[2], enter (should
provide 3 in return)
3. Solving an Equation
- Solve[ expression == value,
variable ] solves the given equation for the indicated variable
- NSolve[ expression == value, variable
] solves numerically the given equation for the indicated variable
4. Numerical Approximation
- //N gives a numerical
approximation of an expression
- f[2.2]//N, enter (should give
you a numerical/decimal solution)
5. Plotting Functions
- Plot[f[x] , {x, xmin,
xmax}, options (seperated by a comma)] plots the function
defined as f[x] on the interval for the variable x between xmin and xmax
- AxesLabel->{"x-label","y-label"}
labels ;the axes of the graph with x-label and y-label respectively
- PlotLabel->"PlotTitle"
places the title PlotTitle at the top of the graph
- AxesOrigin->{xValue, yValue}
specifies that the axes drawn should cross at the point (xValue, yValue)
- GridLines->Automatic
draws gridlines on the plot
6. Displaying Several Plots
- Name = Plot[f[x] , {x, xmin,
xmax}, options (seperated by a comma)] provides a name
for this particular graph
- Show[ {list of named graphs seperated
by commas} ] displays a collection of previously generated and named graphs
on the same grid
7. Integrating Functions
- Integrate[f[x], x] finds
an antiderivative for f[x]
- Integrate[x^2, x], enter (should
give you (1/3)x^3 + C as the solution)
- Integrate[f[x], {x, xmin,
xmax}] integrates a function symbolically
- Integrate[x^2, {x, 2, 4}], enter (should
give you 64/3 - 8/3 = 56/3 as the solution)
- NIntegrate[f[x], {x, xmin,
xmax}] finds a numerical approximation to an integral
- NIntegrate[x^2, {x, 2, 4}], enter (should
give you a numerical approximation to 56/3)
8. Solving a Differential Equation
- DSolve[diffequation,
y[x], x] solves a differential equation for the function y(x) with independent
variable x