lecture notes in advanced engineering mathematics,what is advanced math decision making and how to solve advanced math problems pdf free download
Dr.LeonBurns,New Zealand,Researcher
Published Date:21-07-2017
Your Website URL(Optional)
Comment
Advanced Mathematics for Engineers
Wolfgang Ertel
translated by Elias Drotle and Richard Cubek
October 1, 2012Chapter 1
Linear Algebra
1.1 Video Lectures
We use the excellent video lectures from G. Strang, the author of 1, available from: http://
ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010. In particular
we show the following lectures:
Lec Topics
1 The geometry of linear equations (lecture 01)
n
2 Transposes, Permutations, Spaces R (lecture 05)
3 Column Space and Nullspace (lecture 06)
4 Solving Ax = 0: Pivot Variables, Special Solutions (lecture 07)
5 Independence, Basis, and Dimension (lecture 09)
6 The Four Fundamental Subspaces (lecture 10)
7 Orthogonal Vectors and Subspaces (lecture 14)
8 Properties of Determinants (lecture 18)
9 Determinant Formulas and Cofactors (lecture 19)
10 Cramer's rule, inverse matrix, and volume (lecture 20)
11 Eigenvalues and Eigenvectors (lecture 21)
12 Symmetric Matrices and Positive Deniteness (lecture 25)
13 Linear Transformations and Their Matrices (lecture 30)
1.2 Exercises
Exercise 1.1 Solve the nonsingular triangular system
u +v +w =b (1.1)
1
v +w =b (1.2)
2
w =b (1.3)
3
Show that your solution gives a combination of the columns that equals the column on the
right.
Exercise 1.2 Explain why the system
u +v +w = 2 (1.4)
u + 2v + 3w = 1 (1.5)
v + 2w = 0 (1.6)4 1 Linear Algebra
is singular, by nding a combination of the three equations that adds up to 0 = 1. What
value should replace the last zero on the right side, to allow the equations to have solutions,
and what is one of the solutions?
Inverses and Transposes
1
Exercise 1.3 Which properties of a matrix A are preserved by its inverse (assuming A
exists)?
(1) A is triangular
(2) A is symmetric
(3) A is tridiagonal
(4) all entries are whole numbers
3
(5) all entries are fractions (including whole numbers like )
1
Exercise 1.4
a) How many entries can be chosen independently, in a symmetric matrix of order n?
b) How many entries can be chosen independently, in a skew-symmetric matrix of order n?
Permutations and Elimination
Exercise 1.5
a) Find a square 3 3 matrixP , that multiplied from left to any 3m matrixA exchanges
rows 1 and 2.
b) Find a squarenn matrixP , that multiplied from left to anynm matrixA exchanges
rows i and j.
Exercise 1.6 A permutation is a bijective mapping from a nite set onto itself. Applied
to vectors of length n, a permutation arbitrarily changes the order of the vector compo-
nents. The word \ANGSTBUDE" is a permutation of \BUNDESTAG". An example of a
permutation on vectors of length 5 can be described by
(3; 2; 1; 5; 4):
This means component 3 moves to position 1, component 2 stays where it was, component
1 moves to position 3, component 5 moves to position 4 and component 4 moves to position
5.
a) Give a 5 5 matrix P that implements this permutation.
b) How can we come from a permutation matrix to its inverse?
Exercise 1.7
a) Find a 3 3 matrixE, that multiplied from left to any 3m matrixA adds 5 times row
2 to row 1.
b) Describe ann matrixE, that multiplied from left to anynm matrixA addsk times
row i to row j.
c) Based on the above answers, prove that the elimination process of a matrix can be realized
by successive multiplication with matrices from left.1.2 Exercises 5
Column Spaces and NullSpaces
3
Exercise 1.8 Which of the following subsets of R are actually subspaces?
a) The plane of vectors with rst component b = 0.
1
b) The plane of vectors b with b = 1.
1
c) The vectorsb withb b = 0 (this is the union of two subspaces, the plane b = 0 and the
1 2 1
plane b = 0).
2
d) The solitary vector b = (0; 0; 0).
e) All combinations of two given vectors x = (1; 1; 0) and y = (2; 0; 1).
f) The vectors (b , b , b ) that satisfy b b + 3b = 0.
1 2 3 3 2 1
Exercise 1.9 Let P be the plane in 3-space with equation x + 2y +z = 6. What is the
3
equation of the planeP through the origin parallel toP ? AreP andP subspaces ofR ?
0 0
Exercise 1.10 Which descriptions are correct? The solutions x of
2 3
x
1
1 1 1 0
4 5
x
Ax = = (1.7)
2
1 0 2 0
x
3
form a plane, line, point, subspace, nullspace of A, column space of A.
Ax = 0 and Pivot Variables
Exercise 1.11 For the matrix
0 1 4 0
A = (1.8)
0 2 8 0
determine the echelon formU, the basic variables, the free variables, and the general solution
toAx = 0. Then apply elimination to Ax =b, with components b andb on the right side;
1 2
nd the conditions for Ax = b to be consistent (that is, to have a solution) and nd the
general solution in the same form as Equation (3). What is the rank of A?
Exercise 1.12 Write the general solution to
2 3
u
1 2 2 1
4 5
v = (1.9)
2 4 5 4
w
as the sum of a particular solution toAx =b and the general solution toAx = 0, as in (3).
Exercise 1.13 Find the value of c which makes it possible to solve
u +v + 2w = 2 (1.10)
2u + 3v w = 5 (1.11)
3u + 4v +w =c (1.12)6 1 Linear Algebra
Solving Ax =b
Exercise 1.14 Is it true that if v , v , v are linearly independent, that also the vectors
1 2 3
w = v +v , w = v +v , w = v +v are linearly independent? (Hint: Assume some
1 1 2 2 1 3 3 2 3
combination c w +c w +c w = 0, and nd which c are possible.)
1 1 2 2 3 3 i
Exercise 1.15 Find a counterexample to the following statement: If v ;v ;v ;v is a basis
1 2 3 4
4
for the vector space R , and if W is a subspace, then some subset of the v's is a basis for
W .
Exercise 1.16 Suppose V is known to have dimension k. Prove that
a) any k independent vectors in V form a basis;
b) any k vectors that span V form a basis.
In other words, if the number of vectors is known to be right, either of the two properties of
a basis implies the other.
5
Exercise 1.17 Prove that if V and W are three-dimensional subspaces of R , then V and
W must have a nonzero vector in common. Hint: Start with bases of the two subspaces,
making six vectors in all.
The Four Fundamental Subspaces
Exercise 1.18 Find the dimension and construct a basis for the four subspaces associated
with each of the matrices
0 1 4 0 0 1 4 0
A = and U = (1.13)
0 2 8 0 0 0 0 0
Exercise 1.19 If the product of two matrices is the zero matrix, AB = 0, show that the
column space of B is contained in the nullspace of A. (Also the row space of A is the left
nullspace of B, since each row of A multiplies B to give a zero row.)
0 0
Exercise 1.20 Explain why Ax = b is solvable if and only if rank A = rank A , where A
is formed from A by adding b as an extra column. Hint: The rank is the dimension of the
column space; when does adding an extra column leave the dimension unchanged?
Exercise 1.21 Suppose A is an m by n matrix of rank r. Under what conditions on those
numbers does
1 1
a) A have a two-sided inverse: AA =A A =I?
b) Ax =b have innitely many solutions for every b?
T
Exercise 1.22 IfAx = 0 has a nonzero solution, show thatA y =f fails to be solvable for
some right sides f. Construct an example of A and f.
Orthogonality
3
Exercise 1.23 InR nd all vectors that are orthogonal to (1, 1, 1) and (1, -1, 0). Produce
from these vectors a mutually orthogonal system of unit vectors (an orthogonal system) in1.2 Exercises 7
3
R .
Exercise 1.24 Show that x y is orthogonal to x +y if and only ifkxk =kyk.
Exercise 1.25 LetP be the plane (not a subspace) in 3-space with equationx+2y z = 6.
0
Find the equation of a plane P parallel to P but going through the origin. Find also a
0
vector perpendicular to those planes. What matrix has the plane P as its nullspace, and
0
what matrix hast P as its row space?
Projections
Exercise 1.26 Suppose A is the 4 4 identity matrix with its last column removed. A
is 4 3. Project b = (1; 2; 3; 4) onto the column space of A. What shape is the projection
matrix P and what is P ?
Determinants
2
Exercise 1.27 How are det(2A), det( A), and det(A ) related to det A, when A is n by
n?
Exercise 1.28 Find the determinants of:
a) a rank one matrix
2 3
1
4 5
4 2 1 2
A = (1.14)
2
b) the upper triangular matrix
2 3
4 4 8 8
6 7
0 1 2 2
6 7
U = (1.15)
4 5
0 0 2 6
0 0 0 2
T
c) the lower triangular matrix U ;
1
d) the inverse matrix U ;
e) the \reverse-triangular" matrix that results from row exchanges,
2 3
0 0 0 2
6 7
0 0 2 6
6 7
M = (1.16)
4 5
0 1 2 2
4 4 8 8
Exercise 1.29 If every row of A adds to zero prove that det A = 0. If every row adds to 1
prove that det(A I) = 0. Show by example that this does not imply det A = 1.8 1 Linear Algebra
Properties of Determinants
Exercise 1.30 Suppose A is the n by n tridiagonal matrix with 1's everywhere on the
n
three diagonals:
2 3
1 1 0
1 1
4 5
1 1 1 1
A = ; A = ; A = ;::: (1.17)
1 2 3
1 1
0 1 1
Let D be the determinant of A ; we want to nd it.
n n
a) Expand in cofactors along the rst row of A to show that D =D D .
n n n 1 n 2
b) Starting from D = 1 and D = 0 nd D ;D ;:::;D . By noticing how these numbers
1 2 3 4 8
cycle around (with what period?) nd D .
1000
Exercise 1.31 Explain why a 5 by 5 matrix with a 3 by 3 zero submatrix is sure to be a
singular (regardless of the 16 nonzeros marked by x's):
2 3
x x x x x
6 7
x x x x x
6 7
6 7
the determinant of A = 0 0 0 x x is zero. (1.18)
6 7
4 5
0 0 0 x x
0 0 0 x x
Exercise 1.32 If A is m by n and B is n by m, show that
0 A I 0
det = = det AB: Hint: Postmultiply by : (1.19)
B I B I
Do an example with m n and an example with m n. Why does the second example
have det AB = 0?
Cramers' rule
Exercise 1.33 The determinant is a linear function of the column 1. It is zero if two
columns are equal. Whenb =Ax =x a +x a +x a goes into the rst column ofA, then
1 1 2 2 3 3
the determinant of this matrix B is
1
jb a aj =jx a +x a +x a a aj =xja a aj =x detA
2 3 1 1 2 2 3 3 2 3 1 1 2 3 1
a) What formula for x comes from left side = right side?
1
b) What steps lead to the middle equation?
Eigenvalues and Eigenvectors
Exercise 1.34 Suppose that is an eigenvalue of A, and x is its eigenvector: Ax =x.
a) Show that this same x is an eigenvector of B =A 7I, and nd the eigenvalue.
1
b) Assuming =6 0, show that x is also an eigenvector of A and nd the eigenvalue.1.2 Exercises 9
Exercise1.35 Show that the determinant equals the product of the eigenvalues by imagining
that the characteristic polynomial is factored into
det(A I) = ( )( ) ( ) (1.20)
1 2 n
and making a clever choice of .
Exercise 1.36 Show that the trace equals the sum of the eigenvalues, in two steps. First,
n 1
nd the coecient of ( ) on the right side of (15). Next, look for all the terms in
2 3
a a a
11 12 1n
6 7
a a a
21 22 2n
6 7
det(A I) = det (1.21)
6 7
. . .
. . .
4 5
. . .
a a a
n1 n2 nn
n 1
which involve ( ) . Explain why they all come from the product down the main diagonal,
n 1
and nd the coecient of ( ) on the left side of (15). Compare.
Diagonalization of Matrices
1
Exercise 1.37 Factor the following matrices into SS :
1 1 2 1
A = and A = : (1.22)
1 1 0 0
T
Exercise 1.38 Suppose A =uv is a column times a row (a rank-one matrix).
a) By multiplying A times u show that u is an eigenvector. What is ?
b) What are the other eigenvalues (and why)?
T
c) Compute trace(A) =v u in two ways, from the sum on the diagonal and the sum of's.
1
Exercise 1.39 If A is diagonalizable, show that the determinant of A = SS is the
product of the eigenvalues.
Symmetric and Positive Semi-Denite Matrices
p
T T
Exercise 1.40 If A = QQ is symmetric positive denite, then R = Q Q is its
symmetric positive denite square root. Why doesR have real eigenvalues? ComputeR and
2
verify R =A for
2 1 10 6
A = and A = : (1.23)
1 2 6 10
Exercise 1.41 If A is symmetric positive denite and C is nonsingular, prove that B =
T
C AC is also symmetric positive denite.
Exercise 1.42 If A is positive denite and a is increased, prove from cofactors that the
11
determinant is increased. Show by example that this can fail if A is indenite.10 1 Linear Algebra
Linear Transformation
Exercise 1.43 Suppose a linear mapping T transforms (1, 1) to (2, 2) and (2, 0) to (0, 0).
Find T (v):
(a) v = (2; 2) (b) v = (3; 1) (c) v = ( 1; 1) (d) v = (a;b)
o
Exercise 1.44 Suppose T is re
ection across the 45 line, and S is re
ection across the y
axis. If v = (2; 1) then T (v) = (1; 2). Find S(T (v)) and T (S(v)). This shows that generally
ST =6 TS.
n
Exercise 1.45 Suppose we have two bases v ;:::;v and w ;:::;w for R . If a vector has
1 n 1 n
coecients b in one basis and c in the other basis, what is the change of basis matrix in
i i
b =Mc? Start from
b v +::: +b v =Vb =c w +::: +c w =Wc: (1.24)
1 1 n n 1 1 n n
Your answer representsT (v) =v with input basis ofv's and output basis ofw's. Because of
dierent bases, the matrix is not I.Chapter 2
Computer Algebra
Denition 2.1 Computer Algebra = Symbol Processing + Numerics + Graphics
Denition 2.2 Symbol Processing is calculating with symbols (variables, constants,
function symbols), as in Mathematics lectures.
Advantages of Symbol Processing:
often considerably less computational eort compared to numerics.
symbolic results (for further calculations), proofs in the strict manner possible.
Disadvantages of Symbol Processing:
often there is no symbolic (closed form) solution, then Numerics will be applied,
e.g.:
Calculation of Antiderivatives
x
Solving Nonlinear Equations like: (e = sinx)
Example 2.1
1. symbolic:
0
lnx
lim =? (asymptotic behavior)
x1
x + 1
0 1
(x + 1) lnx
lnx 1 lnx
x
= =
2 2
x + 1 (x + 1) (x + 1)x (x + 1)
0
lnx 1 lnx lnx
x1 : 0
2 2 2
x + 1 x x x
2. numeric:
0
lim f (x) =?
x112 2 Computer Algebra
2
Example 2.2 Numerical solution of x = 5
5 5
2
x = 5; x = ; 2x =x +
x x
1 5
x = x +
2 x
iteration:
1 5
x = x +
n+1 n
2 x
n
n x
n
0 2 Startwert
1 2.25
2 2.236111
3 2.23606798
4 2.23606798
p
8
) 5 = 2:23606798 10
(approximate solution)
2.1 Symbol Processing on the Computer
Example 2.3 Symbolic Computing with natural numbers:
Calculation rules, i.e. Axioms necessary. ) Peano Axioms e.g.:
8x;y;z :x +y = y +x (2.1)
x + 0 = x (2.2)
(x +y) +z = x + (y +z) (2.3)
Out of these rules, e.g. 0 +x =x can be deduced:
0 +x = x + 0 = x
z z
(2:1) (2:2)
Implementation of symbol processing on the computer by "Term Rewriting".
Example 2.4 (Real Numbers) Chain Rule for Dierentiation:
0
0 0
f(g(x)) ) f (g(x))g (x)
1
0
sin(lnx + 2) = cos(lnx + 2)
x
Computer: (Pattern matching)
0 0
sin(Plus(lnx; 2)) = cos(Plus(lnx; 2))Plus (lnx; 2)
0 0 0
sin(Plus(lnx; 2)) = cos(Plus(lnx; 2))Plus(ln x; 2 )2.2 Short Introduction to Mathematica 13
1
0
sin(Plus(lnx; 2)) = cos(Plus(lnx; 2))Plus ; 0
x
1
0
sin(Plus(lnx; 2)) = cos(Plus(lnx; 2))
x
cos(lnx + 2)
0
sin(Plus(lnx; 2)) =
x
Eective systems:
Mathematica (S. Wolfram & Co.)
Maple (ETH Zurich + Univ. Waterloo, Kanada)
2.2 Short Introduction to Mathematica
Resources:
Library: Mathematica Handbook (Wolfram)
Mathematica Documentation Online: http://reference.wolfram.com
http://www.hs-weingarten.de/ertel/vorlesungen/mae/links.html
2.2.0.1 Some examples as jump start
In1:= 3 + 23
Out1= 11
In2:= Sqrt10
Out2= Sqrt10
In3:= NSqrt10
Out3= 3.16228
In4:= NSqrt10,60
Out4= 3.1622776601683793319988935444327185337195551393252168268575
In5:= Integratex2 Sinx2, x
3 2
4 x - 6 x Cos2 x + 3 Sin2 x - 6 x Sin2 x
Out5=
24
In7:= D%, x
2 2
12 x - 12 x Cos2 x
Out7=
2414 2 Computer Algebra
In8:= Simplify%
2 2
Out8= x Sinx
In9:= SeriesExpx, x,0,6
2 3 4 5 6
x x x x x 7
Out9= 1 + x + + + + - + - + Ox
2 6 24 120 720
In10:= Expand(x + 2)3 + ((x - 5)2 (x + y)2)3
2 3 6 7 8 9
Out10= 8 + 12 x + 6 x + x + 15625 x - 18750 x + 9375 x - 2500 x +
10 11 12 5 6 7
375 x - 30 x + x + 93750 x y - 112500 x y + 56250 x y -
8 9 10 11 4 2
15000 x y + 2250 x y - 180 x y + 6 x y + 234375 x y -
5 2 6 2 7 2 8 2 9 2
281250 x y + 140625 x y - 37500 x y + 5625 x y - 450 x y +
10 2 3 3 4 3 5 3 6 3
15 x y + 312500 x y - 375000 x y + 187500 x y - 50000 x y +
7 3 8 3 9 3 2 4 3 4
7500 x y - 600 x y + 20 x y + 234375 x y - 281250 x y +
4 4 5 4 6 4 7 4 8 4
140625 x y - 37500 x y + 5625 x y - 450 x y + 15 x y +
5 2 5 3 5 4 5 5 5
93750 x y - 112500 x y + 56250 x y - 15000 x y + 2250 x y -
6 5 7 5 6 6 2 6 3 6
180 x y + 6 x y + 15625 y - 18750 x y + 9375 x y - 2500 x y +
4 6 5 6 6 6
375 x y - 30 x y + x y
In11:= Factor%
2 3 4 2 3 2
Out11= (2 + x + 25 x - 10 x + x + 50 x y - 20 x y + 2 x y + 25 y -
2 2 2 2 3 4 5 6
10 x y + x y ) (4 + 4 x - 49 x - 5 x + 633 x - 501 x + 150 x -
7 8 2 3 4 5
20 x + x - 100 x y - 10 x y + 2516 x y - 2002 x y + 600 x y -
6 7 2 2 2 2 3 2
80 x y + 4 x y - 50 y - 5 x y + 3758 x y - 3001 x y +
4 2 5 2 6 2 3 2 3 3 32.2 Short Introduction to Mathematica 15
900 x y - 120 x y + 6 x y + 2500 x y - 2000 x y + 600 x y -
4 3 5 3 4 4 2 4 3 4 4 4
80 x y + 4 x y + 625 y - 500 x y + 150 x y - 20 x y + x y )
In12:= InputForm%7
Out12//InputForm= (12x2 - 12x2Cos2x)/24
In20:= PlotSin1/x, x,0.01,Pi
Out20= -Graphics-
In42:= Plot3Dx2 + y2, x,-1,1, y,0,1
Out42= -SurfaceGraphics-
In43:= fx_,y_ := Sin(x2 + y3) / (x2 + y2)
In44:= f2,3
Sin31
Out44= -
13
In45:= ContourPlotx2 + y2, x,-1,1, y,-1,1
Out45= -SurfaceGraphics-
In46:= Plot3Dfx,y, x,-Pi,Pi, y,-Pi,Pi, PlotPoints - 30,
PlotLabel - "Sin(x2 + y3) / (x2 + y2)", PlotRange - -1,1
Out46= -SurfaceGraphics-
Sin(x2 + y3) / (x2 + y2)
Sin(x2 + y3) / (x2 + y2)
2
1
1
0.5
0
2
0
-0.5
1
-1
-1
0
-2 -2
-1 -1
-1 -2
00
11
-2
-2 -1 0 1 2
22
In47:= ContourPlotfx,y, x,-2,2, y,-2,2, PlotPoints - 30,
ContourSmoothing - True, ContourShading - False,
PlotLabel - "Sin(x2 + y3) / (x2 + y2)"
Out47= -ContourGraphics-16 2 Computer Algebra
In52:= Tablex2, x, 1, 10
Out52= 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
In53:= Tablen, n2, n, 2, 20
Out53= 2, 4, 3, 9, 4, 16, 5, 25, 6, 36, 7, 49, 8, 64,
9, 81, 10, 100, 11, 121, 12, 144, 13, 169, 14, 196,
15, 225, 16, 256, 17, 289, 18, 324, 19, 361, 20, 400
In54:= Transpose%
Out54= 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256,
289, 324, 361, 400
In60:= ListPlotTableRandom+Sinx/10, x,0,100
Out60= -Graphics-
1.5
1
0.5
20 40 60 80 100
-0.5
In61:= x = Tablei, i,1,6
Out61= 1, 2, 3, 4, 5, 6
In62:= A = Tableij, i,1,5, j,1,6
Out62= 1, 2, 3, 4, 5, 6, 2, 4, 6, 8, 10, 12, 3, 6, 9, 12, 15, 18,
4, 8, 12, 16, 20, 24, 5, 10, 15, 20, 25, 30
In63:= A.x
Out63= 91, 182, 273, 364, 455
In64:= x.x
Out64= 91
In71:= B = A.TransposeA
Out71= 91, 182, 273, 364, 455, 182, 364, 546, 728, 910,
273, 546, 819, 1092, 1365, 364, 728, 1092, 1456, 1820,
455, 910, 1365, 1820, 2275
In72:= B - IdentityMatrix5
Out72= 90, 182, 273, 364, 455, 182, 363, 546, 728, 910,2.2 Short Introduction to Mathematica 17
273, 546, 818, 1092, 1365, 364, 728, 1092, 1455, 1820,
455, 910, 1365, 1820, 2274
% last command
%n nth last command
?f help for function f
??f more help for f
fx_,y_ := x2 Cosy dene function f(x;y)
a = 5 assign a constant to variable a
f = x2 Cosy assign an expression to variable f
(f is only a placeholder for the expression, not a function)
Dfx,y,x derivative of f with respect to x
Integratefx,y,y antiderivative of f with respect to x
Simplifyexpr simplies an expression
Expandexpr expand an expression
Solvefx==gx solves an equation
C cancel
InputFormExpr converts into mathematica input form
A
TeXFormExpr converts into the LT Xform
E
FortranFormExpr converts into the Fortran form
CFormExpr converts into the C form
ReadList"daten.dat", Number, Number reads 2-column table from le
Tablefn, n, n_min, n_max generates a list f(n );:::;f(n )
min max
Plotfx,x,x_min,x_max generates a plot of f
ListPlotListe plots a list
Plot3Dfx,y,x,x_min,x_max,y,y_min,y_max generates a three-dim. plot of f
ContourPlotfx,y,x,x_min,x_max,y,y_min,y_max generates a contour plot of f
Display"Dateiname",%,"EPS" write to the le in PostScript format
Table 2.2: Mathematica some inportant commands
Example 2.5 (Calculation of Square Roots)
( square root iterative )
sqrta_,genauigk_ := Modulex, xn, delta, n,
Fordelta=9999999; n = 1; x=a, delta 10(-accuracy), n++,
xn = x;
x = 1/2(x + a/x);
delta = Absx - xn;
Print"n = ", n, " x = ", Nx,2accuracy, " delta = ", Ndelta;
;
Nx,genauigk
sqrt::usage = "sqrta,n computes the square root of a to n digits."
Tablesqrti,10, i,1,2018 2 Computer Algebra
( square root recursive )
xn_,a_ := 1/2 (xn-1,a + a/xn-1,a)
x1,a_ := a
2.3 Gnuplot, a professional Plotting Software
Gnuplot is a powerful plotting programm with a command line interface and a batch inter-
face. Online documentation can be found on www.gnuplot.info.
1
sin(x)
0.8
0.6
On the command line we can input
0.4
0.2
0
plot 0:10 sin(x)
-0.2
-0.4
to obtain the graph
-0.6
-0.8
-1
0 2 4 6 8 10
Almost arbitrary customization of plots is possible via the batch interface. A simple batch
le may contain the lines
set terminal postscript eps color enhanced 26
set label "/Symbol a=0.01, /Symbol g=5" at 0.5,2.2
set output "bucket3.eps"
plot b=0.01:1 a=0.01, c= 5, (a-b-c)/(log(a) - log(b)) \
title "(/Symbol a-/Symbol b-/Symbol g)/(ln/Symbol a - ln/Symbol b)"
8
(α-β-γ)/(lnα - lnβ)
7
6
5
producing a EPS le with the graph 4
3
α=0.01, γ=5
2
1
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
γ
3-dimensional plotting is also possible, e.g. with the
sin((x2 + y3) / (x2 + y2))
commands
1
0.8
0.6
0.4
0.2
set isosamples 50 0
-0.2
-0.4
-0.6
-0.8
splot -pi:pi-pi:pi sin((x2 + y3) / (x2
-1
3
+ y2)) 2
1
0
-3
-2
-1 -1
0
-2
1
2
-3
3
which produces the graph
t
tot2.4 Short Introduction to MATLAB 19
2.4 Short Introduction to MATLAB
Eective systems:
MATLAB & SIMULINK (MathWorks)
2.4.0.2 Some examples as jump start
Out(1)=3+23
ans = 11
Out(2)=sqrt(10)
ans = 3.1623
Out(3)=vpa(sqrt(10),60)
= 3.16227766016837933199889354443271853371955513932521682685750
syms x
syms y
y=x2sin(x)2
2 2
x sin(x)
z=int(y,x)
2 2 3
x (- 1/2 cos(x) sin(x) + 1/2 x) - 1/2 x cos(x) + 1/4 cos(x) sin(x) + 1/4 x - 1/3 x
Der=diff(z,x)
2 2 2
2 x (- 1/2 cos(x) sin(x) + 1/2 x) + x (1/2 sin(x) - 1/2 cos(x) + 1/2)
2 2 2
- 1/4 cos(x) + x cos(x) sin(x) - 1/4 sin(x) + 1/4 - x
Simple=simplify(Der)
2 2
x sin(x)
Series=Taylor(exp(x),6,x,0)
2 3 4 5
1 + x + 1/2 x + 1/6 x + 1/24 x + 1/120 x
(x+2)2+((x+5)2(x+y)2)3
2 6 6
(x + 2) + (x - 5) (x + y)
Exp_Pol=expand(Pol)
2 6 5 4 2 3 3
4 + 4 x + x + 15625 x + 93750 x y + 234375 x y + 312500 x y
2 4 5 11 10 2 9 3
+ 234375 x y + 93750 x y + 6 x y + 15 x y + 20 x y
8 4 7 5 6 6 10 9 2 8 3
+ 15 x y + 6 x y + x y - 180 x y - 450 x y - 600 x y
7 4 6 5 6 12 11 10 9
- 450 x y - 180 x y + 15625 y + x - 30 x + 375 x - 2500 x20 2 Computer Algebra
8 7 5 6 9 8 2 7 3
+ 9375 x - 18750 x - 30 x y+ 2250 x y + 5625 x y + 7500 x y
6 4 5 5 4 6 8 7 2
+ 5625 x y + 2250 x y + 375 x y - 15000 x y - 37500 x y
6 3 5 4 4 5 3 6 7
- 50000 x y - 37500 x y - 15000 x y - 2500 x y + 56250 x y
6 2 5 3 4 4 3 5
+ 140625 x y + 187500 x y + 140625 x y + 56250 x y
2 6 6 5 2 4 3
+ 9375 x y - 112500 x y - 281250 x y - 375000 x y
3 4 2 5 6
- 281250 x y - 112500 x y - 18750 x y
t=0:0.01:pi
plot(sin(1./t))
Plot Mode-
X,Y=meshgrid(-1:0.01:1,-1:0.01:1)
Z=sin(X.2+Y.3)/(X.2+Y.2)
surf(X,Y,Z)
x=1:1:10
y(1:10)=x.2
y =
1, 4, 9, 16, 25, 36, 49, 64, 81, 100
A_1=1 2 4; 5 6 100; -10.1 23 56
A_1 =
1.0000 2.0000 4.0000
5.0000 6.0000 100.0000
-10.1000 23.0000 56.0000
A_2=rand(3,4)2.4 Short Introduction to MATLAB 21
A_2 =
0.2859 0.7157 0.4706 0.7490
0.5437 0.8390 0.5607 0.5039
0.9848 0.4333 0.2691 0.6468
A_2'=
0.3077 0.1387 0.4756
0.3625 0.7881 0.7803
0.6685 0.1335 0.0216
0.5598 0.3008 0.9394
A_1.A_2=
3.1780 5.9925 5.0491 3.0975
43.5900 94.5714 92.6770 29.3559
26.3095 57.1630 58.7436 17.5258
U L=lu(A_1)
U =
-0.0990 0.2460 1.0000
-0.4950 1.0000 0
1.0000 0 0
L =
-10.1000 23.0000 56.0000
0 17.3861 127.7228
0 0 -21.8770
Q R=qr(A_1)
Q =
-0.0884 -0.2230 0.9708
-0.4419 -0.8647 -0.2388
0.8927 -0.4501 -0.0221
R =
-11.3142 17.7035 5.4445
0 -15.9871 -112.5668
0 0 -21.2384
b=1;2;3
x=A_1\b
b =
1
2
3
x =
0.3842
0.3481
-0.0201
A_3=1 2 3; -1 0 5; 8 9 23
A_3 =
1 2 3
-1 0 5
Advise:Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.