.


           




:

{ }

{ }

Procedure minimum(a, b, eps : real; var min : real);

var

d : real;

begin

a := a - eps;

b := b + eps;

repeat

a := a + eps;

b := b - eps;

min := abs(derivat1(a, eps));

d := abs(derivat1(b, eps));

if min > d then min := d

until min <> 0

end;

, .

{ . method - , chord - }

Program Method_Chord;

uses WinCrt;

var

a, b, x, min, eps : real;

{--------------------------------------------------------------------------------------}

{ }

Function fx(x : real) : real;

begin

fx := x*x*x - 2*x*x - 4*x - 7

end;

{--------------------------------------------------------------------------------------}

{ 1- }

{ derivative - }

Function derivat1(x0, eps : real) : real;

var

dx, dy, dy2 : real;

begin

dx := 1;

repeat

dx := dx/2;

dy := fx(x0 + dx/2) - fx(x0 - dx/2);

dy2 := fx(5*x0/4 + dx) - 2*fx(5*x0/4);

dy2 := dy2 + fx(5*x0/4 - dx)

until abs(dy2/(2*dx)) < eps;

derivat1 := dy/dx

end;

{----------------------------------------------------------------------------------------}

{ }

{ }

Procedure minimum(a, b, eps : real; var min : real);

var

d : real;

begin

a := a - eps;

b := b + eps;