Professional Documents
Culture Documents
Sys of Equations
Sys of Equations
Solving a set of nonlinear equations is much more difficult than solving a single non-
linear equations.
f (x, y) = 0 g(x, y) = 0
Find the roots (α, β) which satisfy both equations.
Example: 2.5
2 x2+y2=4
x2 + y 2 = 4 1.5
ex + y = 1 1
0.5
−0.5
−1
−1.5
−2
exp(x)+y=1
−2.5
−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5
30
How do we iterate from the nth to the (n + 1)th approximately; i.e. from (xn, yn)
to (xn+1, yn+1)? As with Newton-Raphson we Taylor expand about the root.
Notation: fx = ∂f
∂x and f y = ∂f
∂y .
xn+1 = xn + ∆xn
yn+1 = yn + ∆yn .
e.g.
f (x, y) = 4 − x2 − y 2 = 0
⇒ fx = −2x , fy = −2y
g(x, y) = 1 − ex − y = 0
⇒ gx = −ex , gy = −1
32
x2 2
! ! !
−2xn −2yn ∆xn n + yn − 4
=
−exn −1 ∆yn exn + yn − 1
First guess, (x1, y1) = (1, −1.7)
! ! !
−2.0 3.4 ∆x1 −0.11
⇒ =
−2.7183 −1.0 ∆y1 0.0183
Solve for ∆x1 and ∆y1 (by Gaussian elimination - see shortly),
x3 = 1.004169, y3 = −1.729637
33
Systems of linear equations
Solving systems of linear equations is the most important problem of scientific com-
puting.
3x + 5y − z = 10
7x − 2y + 3z = 12
x + 5y − 4z = −1
In matrix form, 3 5 −1
x
10
7 −2 3 y = 12
1 5 −4 z −1
In shorthand: we have Ax = b, must solve for x
34
A is non-singular if there exists a B such that,
Ax = b
has no solution or infinitely many solutions!!
35
Errors, norms and sensitivity:
1.0
1.01
1.0
xn
There are many ways of defining a norm!!
36
0.01
0.0
1 = 0.01 ; 2 = 0.02
0.01 0.0
1
n 2
|xi|2
X
i) Euclidean norm =
i=1
37
Matrix norms: As for vectors there are a number of possibilities. In a calculation, for
consistency, we will use the maximum norm for A and x.
n
X
kAk = max |aij |
1≤i≤n
j=1
Example:
" #
1 −2
= max(3, 1) = 3 .
0 1
39