getting-started-mathematica-commands

getting-started-mathematica-commands - ChE132a: Analytical...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ChE132a: Analytical Methods of Chemical Engineering Professor Mike Gordon, Fall 2011 Getting Started Mathematica Commands f=5 define f to be 5 f:= some expression define f to represent some expression f[x_]:=some function of x define a function f(x) f[x_,y_,z_]:= some function of x,y,z define a function f(x,y,z) D[f,x] derivative of f wrt x D[f,{x,n}] n-th derivative of f wrt x Integrate[f,x] indefinite integral of f wrt x Integrate[f,{x,a,b}] definite integral of f wrt x from a to b NIntegrate[Sin[x]/x^2,{x,1,7}] numerically integrate a function over a defined limit DSolve[{f’[x]==f[x]-x^2,x[0]==1},f[x],x] analytically solve the ODE DSolve[{a’[t]==a[t]-b[t],b’[t]==3*a[t]-2*b[t],a[0]==1,b[2]==1},{a[t],b[t]},t] analytically solve the ODE system NDSolve[{w’[x]==w[x]*y[x],y’[x]==3*w[x]-x,w[0]==2,y[0]==1},{w[x],y[x]},{x,0,0.5}] numerically solve ODE system Table[g[i], {i,1,10}] make list of g(i) for i=[1...10] with step 1 Table[g[i], {i,1,10,2}] make list of g(i) for i=[1...10] with step 2 make list of g(i) for i=[1....
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.

Page1 / 2

getting-started-mathematica-commands - ChE132a: Analytical...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online