Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Численные методы(англ).doc
Скачиваний:
3
Добавлен:
12.11.2019
Размер:
638.98 Кб
Скачать

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

  1. 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

or

  1. sign[f(x)]=const, x[a,b]

  1. 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:

1122133+ ... +α1n-1n-11nn (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+α1nxn1

a22x2+a23x3+...+a2n-1xn-1+a2nxn=b2

a32x2+a33x3+...+a3n-1xn-1+a3nxn=b3 (3)

. . . . . . . . . . . . . . . .

an-12x2+an-13x3+...+an-1n-1xn-1+an-1nxn=bn-1

an2x2+an3x3+...+ann-1xn-1+annxn=bn

aij=aij-ai1α1j , i=2,...,n

j=2,...,n

bi=bi-ai1β

Now we can consider system of n-1 equations

x2,...,xn

a22<>0 , then divide 2nd equation:

x223x3+...+αnn-1xn-12nxn2 ,

except x2 :

x112x213x3+...+α1n-1xn-11nxn1

x223x3+...+α2n-1xn-12nxn2

a33x3+...+a3n-1xn-1+a3nxn=b3 (4)

. . . . . . . . . . . . . . . .

an-13x3+...+an-1n-1xn-1+an-1nxn=bn-1

an3x3+...+ann-1xn-1+annxn=bn

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.