Tutorial Mathcad
Tutorial Mathcad
Lecture 2
Matrix operations
Multiply by constant
Matrix transpose [ctrl]+[1]
Inverse [^][-][1]
Matrix multiplying
Determinant
To read the matrix elements Ar, k: key [[] rrow nr, k column nr
e.g. element A1,1 keys: [A][[][1][,][1][=]
Constrain: function
arguments have to
be integer
MathCAD 3D graphs
3D graphs of function on the base of matrix : [ctrl]
+[2] [M]
MathCAD 3D graphs
MathCAD 3D graphs
Contours colour
filled
Predefined constants
Conjugate Gradient
Quasi Newton
Levenberg-Marquardt
Quadratic
or
Secant method
Mueller method (2nd order polynomial)
y1
x4 x2 y 2
x2
y3
x3
x5
x4
x2 x3
y 2 y3
x1
y2
xi 1 xi 1 yi 1
xi 1 xi
yi 1 yi
Methods:
1. Laguerre's method
2. companion matrix
Or
Use the procedure LSOLVE: lsolve(A,B)=
Numerical methods:
1
1
k 2 hF xi h, yi k1
2
2
1
1
k3 hF xi h, yi k 2
2
2
k 4 hF xi h, yi k3
1
k1 2 k2 k3 k 4
6
yi 1 yi K O h 5
Initial
condition
x x0 , y x x0 y0
x0
y1, 0
x1
R x2
...
x
N
y1,1
y1, 2
...
y1, N
dy0
f
x
,
y
,
y
0
1
dx
dy1 f x, y , y
0
1
dx
x x0
y0 xx0 y
0
0
y1xx0 y
0
1
x1 y1,1 y2,1
R x2 y1, 2 y2, 2
...
... ...
x
y
y
1, N
2, N
N
5. Results as a plot: R<1>,R<2>@ R<0>
x x0
y0 xx y00
0
y1xx y10
0
d y
dy
f x, y ,
2
dx
dx
Initial
condition
x x0 , y x x0 y0
dy
dx
y0
x x0
dy dz0
z1 ,
dx dx
dz0
dx z1
dz1 f x, z , z
0
1
dx
d 2 y dz1
2
dx
dx
x x0
z0 xx0 z00
z1x x0 z10
d2y
2
x
3 y y
2
dx
System of equations
Starting vector
Vectoral function