Uploaded by darshanavchar

Non linear Systems(17)

advertisement
Non-Linear Systems
By : Dr. Atul R. Phadke
Associate Professor in Electrical Engineering
College of Engineering Pune (Maharashtra)
OBJECTIVES:
After studying this unit, you will be able to understand:
✓ Successive Substitution Method for solution of non-linear systems.
✓ Newton-Raphson method for solution of non-liear systems.
✓ MATLAB fsolve function.
2
SUCCESSIVE SUBSTITUTION METHOD:
System of non-linear equations can be expressed as:
𝑓1 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 = 0
𝑓2 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 = 0
⋯
𝑓𝑛 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 = 0
Therefore, the solution is the values of 𝑥 ′ 𝑠 for that make the
equations equal to zero.
For simplicity, let us consider a system of two non-linear
simultaneous equations with two unknowns 𝑥 and 𝑦:
𝑓1 𝑥, 𝑦 = 0
𝑓2 𝑥, 𝑦 = 0
3
SUCCESSIVE SUBSTITUTION METHOD:
𝑓1 𝑥, 𝑦 = 0
𝑓2 𝑥, 𝑦 = 0
As in the case of single equation, these equations may be written in
the form:
𝑥1 = 𝑔1 𝑥, 𝑦
𝑥2 = 𝑔2 𝑥, 𝑦
If 𝑥0 , 𝑦0 is an initial approximation of the root, then the modified
guess can be determined as:
𝑥1 = 𝑔1 𝑥0 , 𝑦0
𝑦1 = 𝑔2 𝑥0 , 𝑦0
𝑥2 = 𝑔1 𝑥1 , 𝑦1
𝑦2 = 𝑔2 𝑥1 , 𝑦1
For faster convergence, recently computed value of 𝑥𝑖 may be used
while evaluating 𝑦𝑖
4
SUCCESSIVE SUBSTITUTION METHOD:
In general
𝑥𝑛+1 = 𝑔1 𝑥𝑛 , 𝑦𝑛
𝑦𝑛+1 = 𝑔2 𝑥𝑛 , 𝑦𝑛
For faster convergence, recently computed value of 𝑥𝑖 may be used
while evaluating 𝑦𝑖
Try it: Find a root of the equations –
𝑦 2 − 5𝑦 + 4 = 0
3y𝑥 2 − 10𝑥 + 7 = 0
To apply the iteration method, we rewrite the equations as –
1
𝑥=
3y𝑥 2 + 7
10
1 2
𝑦 = 𝑦 +4
5
Let 𝑥0 = 0.5 and 𝑦0 = 0.5
5
SUCCESSIVE SUBSTITUTION METHOD:
1
1 2
2
𝑥𝑛+1 =
3y𝑛 𝑥𝑛 + 7
𝑦𝑛+1 = 𝑦𝑛 + 4
10
5
1
𝑥1 =
3 × 0.5 × 0.52 + 7 = 0.7375
10
1
𝑦1 = 0.52 + 4 = 0.85
5
1
𝑥2 =
3 × 0.85 × 0.73752 + 7 = 0.8387
10
1
𝑦2 = 0.852 + 4 = 0.9445
5
1
𝑥3 =
3 × 0.9445 × 0.83872 + 7 = 0.8993
10
1
𝑦3 = 0.0.94452 + 4 = 0.9784
5
Solution converges at
𝑥 = 1 and 𝑦 = 1
6
NEWTON RAPHSON METHOD:
𝑓1 𝑥, 𝑦 = 0
Where,
𝑓2 𝑥, 𝑦 = 0
𝑓1,0 = 𝑓1 𝑥0 , 𝑦0
Let the initial approximation to the root is 𝑥0 , 𝑦0 .
𝑓2,0 = 𝑓2 𝑥0 , 𝑦0
If 𝑥0 + ℎ, 𝑦0 + 𝑘 is the root of the system then –
𝑓1 𝑥0 + ℎ, 𝑦0 + ℎ = 0
𝑓2 𝑥0 + ℎ, 𝑦0 + ℎ = 0
Expanding above equations by Taylor series and
neglecting higher order terms,
𝜕𝑓1
𝜕𝑓1
𝑓1 𝑥0 + ℎ, 𝑦0 + 𝑘 = 𝑓1,0 + ℎ
+𝑘
=0
𝜕𝑥0
𝜕𝑦0
𝜕𝑓2
𝜕𝑓2
𝑓2 𝑥0 + ℎ, 𝑦0 + 𝑘 = 𝑓2,0 + ℎ
+𝑘
=0
𝜕𝑥0
𝜕𝑦0
𝜕𝑓1
𝜕𝑓1
=
𝜕𝑥0
𝜕𝑥
𝜕𝑓1
𝜕𝑓1
=
𝜕𝑦0
𝜕𝑥
𝜕𝑓2
𝜕𝑓2
=
𝜕𝑥0
𝜕𝑥
𝜕𝑓2
𝜕𝑓2
=
𝜕𝑦0
𝜕𝑥
𝑥=𝑥0 , 𝑦=𝑦0
𝑥=𝑥0 , 𝑦=𝑦0
𝑥=𝑥0 , 𝑦=𝑦0
𝑥=𝑥0 , 𝑦=𝑦0
7
NEWTON RAPHSON METHOD:
𝜕𝑓1
𝜕𝑓1
𝑓1,0 + ℎ
+𝑘
=0
𝜕𝑥0
𝜕𝑦0
𝜕𝑓2
𝜕𝑓2
𝑓2,0 + ℎ
+𝑘
=0
𝜕𝑥0
𝜕𝑦0
Therefore,
Therefore,
𝜕𝑓1
ℎ 𝜕𝑥0
𝑘 𝜕𝑓2
𝜕𝑥0
𝜕𝑓1
𝜕𝑥0
𝜕𝑓2
𝜕𝑥0
𝜕𝑓1
𝑓1,0
𝜕𝑦0
=−
𝜕𝑓2
𝑓2,0
𝜕𝑦0
𝜕𝑓1
𝜕𝑦0
𝜕𝑓2
𝜕𝑦0
𝜕𝑓1
𝜕𝑓1
ℎ
+𝑘
= −𝑓1,0
𝜕𝑥0
𝜕𝑦0
Where,
𝜕𝑓2
𝜕𝑓2
ℎ
+𝑘
= −𝑓2,0
𝜕𝑥0
𝜕𝑦0
the Jacobian matrix 𝐽.
is called as
Unique solution for this system
exists if 𝑑𝑒𝑡 𝐽 ≠ 0
8
NEWTON RAPHSON METHOD:
Therefore,
𝜕𝑓1
ℎ 𝜕𝑥0
𝑘 𝜕𝑓2
𝜕𝑥0
Therefore,
𝜕𝑓1
𝑓1,0
𝜕𝑦0
=−
𝜕𝑓2
𝑓2,0
𝜕𝑦0
𝑥1 − 𝑥0
𝑦1 − 𝑦0 = − 𝐽
−1
𝑓1,0
𝑓2,0
𝑥1
𝑥0
𝑦1 = 𝑦0 − 𝐽
−1
𝑓1,0
𝑓2,0
Therefore,
ℎ
𝑘
𝑓1,0
𝐽 =−
𝑓2,0
Multiplying both sides by 𝐽−1
ℎ
=− 𝐽
𝑘
−1
𝑓1,0
𝑓2,0
9
NEWTON RAPHSON METHOD:
In general for a system of non-linear equations:
𝑓1 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 = 0
𝑓2 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 = 0
⋯
𝑓𝑛 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 = 0
𝑥1, 𝑖+1
𝑥1, 𝑖
𝑥2, 𝑖+1
𝑥2, 𝑖
= .
..
.
𝑥𝑛, 𝑖+1
𝑥𝑛, 𝑖
𝜕𝑓1,𝑖 𝜕𝑓1,𝑖
𝜕𝑥1 𝜕𝑥2
𝜕𝑓2,𝑖 𝜕𝑓2,𝑖
− 𝜕𝑥1 .𝜕𝑥2.
. .
𝜕𝑓𝑛,𝑖 𝜕𝑓𝑛,𝑖
𝜕𝑥1 𝜕𝑥2
𝜕𝑓1,𝑖
..
𝜕𝑥𝑛
𝜕𝑓2,𝑖
. .
𝜕𝑥𝑛
. .
. .
𝜕𝑓𝑛,𝑖
. .
𝜕𝑥𝑛
−1
𝑓1, 𝑖
𝑓2, 𝑖
..
𝑓𝑛, 𝑖
10
NEWTON RAPHSON METHOD:
Solve the system 𝑥 2 + 𝑦 2 = 1 and 𝑦 = 𝑥 2
by Newton-Raphson method.
𝑥1
𝑥0
𝑦1 = 𝑦0 − 𝐽
−1
𝑓1,0
𝑓2,0
Let 𝑓1 = 𝑥 2 + 𝑦 2 − 1 = 0 and 𝑓2 = 𝑦 −
𝑥2 = 0
𝜕𝑓1
𝜕𝑥
𝐽=
𝜕𝑓2
𝜕𝑥
𝜕𝑓1
𝜕𝑦
2𝑥
=
𝜕𝑓2
−2𝑥
𝜕𝑦
2𝑦
1
Let the initial guess is 𝑥0 = 𝑦0 = 0.5
𝑓1,0 = 0.52 + 0.52 − 1 = −0.5
𝑓2,0 = 0.5 − 0.52 = 0.25
𝐽=
2𝑥
−2𝑥
2𝑦
1 1
=
−1 1
1
𝑥1
1 1 −1 −0.5
0.5
𝑦1 = 0.5 − −1 1
0.25
𝑥1
0.8750
=
𝑦1
0.6250
Next iteration –
𝑥2
0.8750
1.75 1.25
=
−
𝑦2
0.6250
−1.75
1
𝑥2
0.7909
=
𝑦2
0.6178
Solution converges at –
𝑥
0.7862
=
𝑦
0.6180
−1
0.15625
−0.14
11
MATLAB CODE FOR NEWTON RAPHSON METHOD:
12
MATLAB FUNCTION FSOLVE:
Let, 𝑓1 = 𝑥 2 + 𝑦 2 − 1 = 0 and
𝑓2 = 𝑦 − 𝑥 2 = 0
First write a function to hold the
equations
Use function fsolve to determine
the roots of equations.
13
Download