Numerical solution of equations.
F(x)=0 -equation;
if f(x) is polynomial, we have algebraic equation, in other case - transcendental.
The value , wich transform equation to identity, named the root of equation: f()=0
EXAMPLE:
f(x)= x2 -1; =1;
Precise solution can be found only in particular cases of equations.
But really it is not necessary.
We can find approximate value of root with any precision.
Primary value may be found by several ways, for example:
a
)
f(x)
x=
- graph crosses
abscissa
x
x
x0
x1
x2
... xn
f(x)=y
y0
y1
y2
... yn
xk<<xk+1
,
if f(xa)*f(xk+1)<0
In fact , we find some interval ,contained .
If some interval contains only one root , it responses such conditions:
[a;b]
1
.
f(a)*f(b)<0
a
b
b
a
sign[f(x)]=const, x[a,b]
s
ign[f(x)]=const,
x[a,b]
a
b
According to these conditions, we have four types of functions position:
1)
2)
f>0 f>0
f>0 f<0
a
a
b
b
3) f<0
4) f<0
f>0 f<0
b
b
a
a
[a,b] named interval of isolation of root . The size of interval is error of root . We must reduce the size of interval of isolation.
Method of division in two.
Method of chords.
Equation of chord
f(b)
a
x1
x2
b
f(a)
a=x1=>x2=>......
x1> :
a x1 b
Method of tangents (of Newton).
a b a x1 b
x1
Equation of tangent:
1) y-f(b)=f(b)(x-b) 2) y-f(a)=f(a)(x-a)
y=0=>
y=0=>
x1 , x1> x1 , x1<
Combination of methods chords and tangents.
Type f(x) 1 or 4 : f*f>0
a0=a;
b0=b;
Type 2 or 3 : f *f<0
a0=a;
b0=b;
Numerical solution of linear algebraic systems.
Method of Gauss.
A
X=B
A= a11 a12 ... a1n
b=
b1
a21 a22 ... a2n b2
. . . . . . . ...
an1 an2 ... ann bn
a11x1+a12x2+a13x3+...+a1n-1xn-1+a1nxn=b1
a21x1+a22x2+a23x3+...+a2n-1xn-1+a2nxn=b2
a31x1+a32x2+a33x3+...+a3n-1xn-1+a3nxn=b3 (1)
. . . . . . . . . . . . . . . . .
an-11x1+an-12x2+an-13x3+...+an-1n-1xn-1+an-1nxn=bn-1
an1x1+an2x2+an3x3+...+ann-1xn-1+annxn=bn
We can put system in such way , when a11<>0;
Let’s to divide 1st equation on a11 , then:
1+α122+α133+ ... +α1n-1n-1+α1nn (2)
where:
After that in succession multiply 1st equation on coefficients with x1 in every equation and subtract; so we except x1 out of equation from 2 until n ; system will be :
x1+α12x2+α13x3+...+α1n-1xn-1+α1nxn=β1
a22x2+a23x3+...+a2n-1xn-1+a2nxn=b2
a32x2+a33x3+...+a3n-1xn-1+a3nxn=b3 (3)
. . . . . . . . . . . . . . . .
an-12x2+an-13x3+...+an-1n-1xn-1+an-1nxn=bn-1
an2x2+an3x3+...+ann-1xn-1+annxn=bn
aij=aij-ai1α1j , i=2,...,n
j=2,...,n
bi=bi-ai1β
Now we can consider system of n-1 equations
x2,...,xn
a22<>0 , then divide 2nd equation:
x2+α23x3+...+αnn-1xn-1+α2nxn=β2 ,
except x2 :
x1+α12x2+α13x3+...+α1n-1xn-1+α1nxn=β1
x2+α23x3+...+α2n-1xn-1+α2nxn=β2
a33x3+...+a3n-1xn-1+a3nxn=b3 (4)
. . . . . . . . . . . . . . . .
an-13x3+...+an-1n-1xn-1+an-1nxn=bn-1
an3x3+...+ann-1xn-1+annxn=bn
aij = aij-ai2α2j , i,j=2,...,n
bi = bi-ai2β2, i=2,...,n
After n steps we come to such form:
(5)
This procedure is named the direct motion of the Gauss method.
During the back motion we find values of variables:
(6)
The special case: after m steps
(7)
If
we have any coefficient
,
then system (1) is incompatible. If
,
then we have system with n–m equations, xm+1,
…,
xn
are
free and system (1) is indefinite.
Methods of iteration.
Simple iteration.
AX = B, consider A = C+D, det C 0, then X= FX+G, F = C-1D, G = C-1B.
(1)
Let we find initial approximation:
X(0)
=
Next approximation we can find as X(k+1) = FX(k)+G (2)
Zeidel’s method of iteration.
On (k)-th step we use not only x(k–1), but x(k), which are already calculated.
Numerical solution of nonlinear systems.
F1(x1, x2, ... , xn)=0
F2(x1, x2, ... , xn)=0
...........
Fn(x1, x2, ... , xn)=0
Consider two-measured system:
f1(x1, x2)=0 (1) Let we find bad approximation x1(0),x2(0)
f2(x1, x2)=0
Let’s try to find corrections:
x1=x1(0)+ x2=x2(0)+
put them in (1):
f1(x1(0)+ x2(0)+ )=0
f2(x1(0)+ x2(0)+ )=0
Decompose according to Tailor:
Consider only linear part:
(2)
We obtain system with variables
So, we find first approximation :
x1(1)=x1(0)+ x2(1)=x2(0)+
x1=x1(1)+ x2=x2(1)+
and so on.
