1 Maxima For all I care, at this moment… Spring 2013.
-
Upload
percival-kennedy -
Category
Documents
-
view
215 -
download
0
Transcript of 1 Maxima For all I care, at this moment… Spring 2013.
1
Maxima
For all I care, at this moment…
Spring 2013
2
Content
• Special keys and symbols
• Arithmetic
• Algebra
• Calculus
• Matrix calculations
• Plot
• Linear algebraSpring 2013
3
ArithmeticExact(rational) arithmetic
Irrational number kept in symbolic form
Expanding …
Convert to floating point numbers …
Setting (system) floating point precision …
Repeat a previous command …
; end of command% previous output‘’ repeat previous command^ power
Spring 2013
4
Assignment
VariableList Function specification
Spring 2013
5
Algebra
Expand, factor, solveTrigexpand, trigreduce, …
Spring 2013
6
Algebra
Expand/reduce for rational terms
Spring 2013
7
Polynomials
Gcdex,Gfactorallroots
gcd p/gcd q/gcd
Spring 2013
8
Calculus
Derivate, partial derivativeIntegral: definite, indefinite, improperinf
Spring 2013
9
Calculus
Taylor series, limit,
?sin
lim0
x
xx
=Taylor series:
h
xfhxfxf
h
0lim
Spring 2013
10
ODE
Ode2: solves 1st and 2nd order ODEIc1, ic2, bc: setting conditions‘ do not evaluate
2)0(, yydx
dy0)0(,1)0(,sin
2
2
xxtxdt
dx
dt
xd
Spring 2013
11
Plot2D• Data points (xi,yi)• Function curve y = f(x)• Parametric curve (x(t), y(t))
Spring 2013
12
Plot2D (cont)
Spring 2013
13
Ex: Least Square Fit
Use solve to solve linear systems
Spring 2013
14
Linear Algebra
Matrix multiplication
Spring 2013
15
10
1
14
02
10
1
10
02
12
01
10
12
12
01
14
12 21
21
TLL
10
21
12
01
52
21
Matrix Factorization
LU(Doolittle) LU(Crout)LDU
Symmetric matrix A = LLT(Cholesky)
LU
Spring 2013
c
b
16
Eigen Problemsnumerical
symbolic
Spring 2013
52
21b
17
Linear Solvers
Compare with general solver: solve
Spring 2013
18
Use Maxima to …
• Study modified Newton on multiple roots
• Derive PCA …
• Solve symbolic linear systems (give 2 points to get algebraic eqn)
Spring 2013
19
Index. (matrix multiply) 14,15^ (power) 3^^ (matrix power) 14‘’ (repeat previous cmd) 3: (variable assignment) 4:= (function specification) 4‘ (defer evaluation) 10Allroots 7Bfloat 3Charpoly 16Cholesky 15Determinant 14Diff 8Divide 7Echelon 14Eigenvalues 16Eigenvectors 16Expand 3,6Ezgcd 7Factor 5,7Fpprec 3Gfactor 7
Ic1 10Ic2 10Integrate 8Invert 14Limit 9Linsolve 17Lu_factor 15Matrix 14Ode2 10Plot2d 11,12,13Quotient 7Rank 14Ratexpand 6Ratsimp 6Realroots 7Remainder 7Solve 5,16,17Taylor 9Transpose 14,15Trigexpand 5Trigreduce 5Uniteigenvectors 17
Spring 2013