Authors

  • S. Khaidarova
    Kokand State University

DOI:

https://doi.org/10.71337/inlibrary.uz.ijai.72546

Abstract

The article describes the chord method for approximate solution of algebraic equations. A program for solving the problem in Pascal is provided.

 

 

background image

INTERNATIONAL JOURNAL OF ARTIFICIAL INTELLIGENCE

ISSN: 2692-5206, Impact Factor: 12,23

American Academic publishers, volume 05, issue 03,2025

Journal:

https://www.academicpublishers.org/journals/index.php/ijai

page 81

FINDING THE ROOTS OF AN EQUATION USING THE CHORD METHOD

S. Khaidarova

Candidate of Technical Sciences, Associate Professor of Kokand State

University,

Uzbekistan, E-mail:

hay-vb1952@umail.uz

Annotation:

The article describes the chord method for approximate solution of algebraic equations.

A program for solving the problem in Pascal is provided.

Keywords and expressions:

fixed point, zero approximation

Let there be an equation

f x = 0

and the root of the equation x* lies on the segment [a,b], that

is

x

[a, b]

.

To apply the chord method, the following conditions must be met:

1) The function

f x

is continuous on the interval

[a, b]

with its first and second derivatives;

2) T

he function

f x

takes opposite signs at the ends of the segment

[a, b]

, that is

f a ∙

f(b) < 0

3)

Derivatives and functions

f x

retain a certain sign on the interval

[a, b]

. This means that

the function f(x) is monotone and the root x* is unique.

The geometric meaning of the chord method is that the graph of the function f(x) on the

segment [a,b] is replaced by a chord. There can be 4 cases for the function graph:

Let's consider the first case, then the graph of the function has the following form:


background image

INTERNATIONAL JOURNAL OF ARTIFICIAL INTELLIGENCE

ISSN: 2692-5206, Impact Factor: 12,23

American Academic publishers, volume 05, issue 03,2025

Journal:

https://www.academicpublishers.org/journals/index.php/ijai

page 82

Fig.1. Geometric illustration of the chord method

Let

х

*

-

be the root of the equation and

x

0

its approximate value. In order to find the

approximate value of

x

0

, the graph of the function

f (х)

on the segment

[a, b]

is replaced by the

chord AB. We write the equation of the line passing through the points

))

(

,

(

a

f

a

A

and

))

(

,

(

b

f

b

B

:

x a

b a

y

f a

f b

f a

-
-

=

-

-

( )

( )

( )

(1)

Since

x

0

[a,b]

lies on the line AB, we can find it from equation (1) by substituting the

values ​ ​

x = x

0

and

y = 0

:

:

)

(

)

(

)

(

)

(

0

a

b

a

f

b

f

b

f

a

x

-

-

-

=

(2)

If the condition

f b

( )

f b

"

( )

>

0

is met, point b is fixed and then formula (2) can be used to

find the zero approximation of

x

0

.

The equation of the straight line passing through points

))

(

,

(

a

f

a

A

and

))

(

,

(

b

f

b

B

can

be written in this form:

x b

a b

y

f b

f a

f b

-
-

=

-

-

( )

( )

( )

(1

)

For

x = x

0

and we

y = 0

get:

x

b

f b

f b

f a

b a

0

= -

-

-

( )

( )

( )

(

)

(2

)

If the condition

f a

( )

f a

"

( )

>

0

is met, the point a is stationary and then formula (2

) can

be used to find the zero approximation of

x

0

.

To find the approximation x

1

, we write the equation of the line A

0

B and for x=x1 and y=0

we get:

x

x

f x

f b

f x

b x

1

0

0

0

0

=

-

-

-

( )

( )

( )

(

)

From the equation of straight line

A

1

B

at

x=x

2

and y=0 we obtain:

x

x

f x

f b

f x

b x

2

1

1

1

1

=

-

-

-

( )

( )

( )

(

)

Continuing the process, we find the n-th approximation:


background image

INTERNATIONAL JOURNAL OF ARTIFICIAL INTELLIGENCE

ISSN: 2692-5206, Impact Factor: 12,23

American Academic publishers, volume 05, issue 03,2025

Journal:

https://www.academicpublishers.org/journals/index.php/ijai

page 83

x

x

f x

f b

f x

b x

n

n

n

n

n

=

-

-

-

-

-

-

-

1

1

1

1

(

)

( )

(

)

(

)

(3)

Calculations continue until the condition

x

x

h

n

n

-

-

1

is met.

There is a value of n such that

n

n

x

x

®

=

lim

*

satisfies the condition

h

x

x

n

-

*

and the

calculations stop.

The block diagram of the chord method algorithm is as follows:

1)

if point b is fixed, i.e. when the condition

f b

( )

f b

"

( )

>

0

is met, the block diagram has

the following form:

2)

if point

a

is fixed, i.e. when the condition

f a

( )

f a

"

( )

>

0

is met, the block diagram

has the following form:

Example: Find the root of the equation

f x = x

4

+ 5x

2

+ 10x − 3 = 0

on the segment

[0,1] with an accuracy of h=0.001 using the chord method.

Solution: We find the first and second derivatives:

f

'

x = 4x

3

+ 10x + 10, f

''

x = 12x

2

+ 10

f 0 f

''

0 < 0 and f 1 f

''

1 > 0

Since

f 1 f

''

1 > 0

), point B is fixed and calculations are carried out according to the

following formula:

x

x

f x

f b

f x

b x

n

n

n

n

n

=

-

-

-

-

-

-

-

1

1

1

1

(

)

( )

(

)

(

)

In this case

x

0

=a

, so we will use the first type of block diagram.

The Pascal program looks like this:

program

chord method

_

B fixed

;

var a,b,x,h,x0:real;

label

return, answer

;

function fx(x:real):real;

begin fx:=x*x*x*x+5*x*x+10*x-3


background image

INTERNATIONAL JOURNAL OF ARTIFICIAL INTELLIGENCE

ISSN: 2692-5206, Impact Factor: 12,23

American Academic publishers, volume 05, issue 03,2025

Journal:

https://www.academicpublishers.org/journals/index.php/ijai

page 84

end;

begin

writeln('a='); readln(a);

writeln('b='); readln(b);

writeln('

enter precision

'); readln(h);

x:=a;

return

: x0:=x-fx(x)/(fx(b)-fx(x))*(b-x);

if abs(x0-x)<=h then goto

answer

else x:=x0; goto

return

;

answer

:writeln(x0,' ',fx(x0));

end.

After executing the program, enter the values ​ ​

0,1,0.001

sequentially from the

keyboard and press the ENTER button each time. We get the following answer:

x= 0.264665, F(x) = 0.797911E-03

REFERENCES:

1. C.C. Irisqulov va b. Sonli usullar va algoritmlar. “Namangan” nashriyoti, 2013

References

C.C. Irisqulov va b. Sonli usullar va algoritmlar. “Namangan” nashriyoti, 2013