This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 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. Well 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 Shift-Enter after entering it. It will respond with Out= Cos[x]. Mathematica remembers this entry as Out; you can recover it by typing Out and it will respond with Out = Cos[x]. If you do 3 x Out it will respond Out = 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 (requires this....
View Full Document
This note was uploaded on 12/29/2011 for the course CHE 132a taught by Professor Gordon,m during the Fall '08 term at UCSB.
- Fall '08
- Chemical Engineering