C
HEMICAL
E
NGINEERING 132A
Professor Todd Squires
Spring Quarter, 2007
Computer Lab Assignment 1
Introduction to Mathematica
Mathematica can be extremely helpful in doing mathematics for engineering. The following is a very brief tutorial
designed to help you start to learn to use it.
One of the key advantages to Mathematica is that it does mathematics
symbolically
– that is, it can keep track of
functions, rather than just numbers. We’ll start with a simple cosine function
f
(
x
) = cos
x
; enter it into Mathematica
using
f[x_] = Cos[x]
To make Mathematica compute this, press ShiftEnter after entering it. It will respond with
Out[1]= Cos[x].
Mathematica ‘remembers’ this entry as “Out[1]”; you can recover it by typing
Out[1]
and it will respond with
Out[2] = Cos[x].
If you do
3 x Out[1]
it will respond
Out[3] = 3 x Cos[x]
and so on.
Several things to note: 1) in Mathematica, the names of all of the functions you will need are capitalized. Some
examples include
Cos[x], Sin[x], Tan[x], Cot[x], Exp[x], Log[x].
2) Notice also that the argument of the function (
x
) is in
square
brackets, not normal parenthesis.
Mathematica
requires this. 3) Multiplication (
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '08
 Gordon,M
 Calculus, Chemical Engineering, Derivative, Mathematical analysis, Continuous function, Mathematica, Bracket

Click to edit the document details