Top Banner
1 Maxima For all I care, at this moment… Spring 2013
19

1 Maxima For all I care, at this moment… Spring 2013.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Maxima For all I care, at this moment… Spring 2013.

1

Maxima

For all I care, at this moment…

Spring 2013

Page 2: 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

Page 3: 1 Maxima For all I care, at this moment… Spring 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

Page 4: 1 Maxima For all I care, at this moment… Spring 2013.

4

Assignment

VariableList Function specification

Spring 2013

Page 5: 1 Maxima For all I care, at this moment… Spring 2013.

5

Algebra

Expand, factor, solveTrigexpand, trigreduce, …

Spring 2013

Page 6: 1 Maxima For all I care, at this moment… Spring 2013.

6

Algebra

Expand/reduce for rational terms

Spring 2013

Page 7: 1 Maxima For all I care, at this moment… Spring 2013.

7

Polynomials

Gcdex,Gfactorallroots

gcd p/gcd q/gcd

Spring 2013

Page 8: 1 Maxima For all I care, at this moment… Spring 2013.

8

Calculus

Derivate, partial derivativeIntegral: definite, indefinite, improperinf

Spring 2013

Page 9: 1 Maxima For all I care, at this moment… Spring 2013.

9

Calculus

Taylor series, limit,

?sin

lim0

x

xx

=Taylor series:

h

xfhxfxf

h

0lim

Spring 2013

Page 10: 1 Maxima For all I care, at this moment… 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

Page 11: 1 Maxima For all I care, at this moment… Spring 2013.

11

Plot2D• Data points (xi,yi)• Function curve y = f(x)• Parametric curve (x(t), y(t))

Spring 2013

Page 12: 1 Maxima For all I care, at this moment… Spring 2013.

12

Plot2D (cont)

Spring 2013

Page 13: 1 Maxima For all I care, at this moment… Spring 2013.

13

Ex: Least Square Fit

Use solve to solve linear systems

Spring 2013

Page 14: 1 Maxima For all I care, at this moment… Spring 2013.

14

Linear Algebra

Matrix multiplication

Spring 2013

Page 15: 1 Maxima For all I care, at this moment… 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

Page 16: 1 Maxima For all I care, at this moment… Spring 2013.

16

Eigen Problemsnumerical

symbolic

Spring 2013

52

21b

Page 17: 1 Maxima For all I care, at this moment… Spring 2013.

17

Linear Solvers

Compare with general solver: solve

Spring 2013

Page 18: 1 Maxima For all I care, at this moment… 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

Page 19: 1 Maxima For all I care, at this moment… 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