 |
Функция :: Корни (Теория)

Функция :: Корни (производной)
uses
crt,mat;
type
float=extended;
const
e=0.00001;
var
a,b,c:float;
function y (x:float):float;
begin
y:=(16*x*cos(x)-sin(16*x))/(3*sqr(x));
end;
procedure nyl (a,b:float);
begin
if (y(a)*y(b)<0)
then
begin
repeat
if (y(a)*y(b)<0)
then
begin
c:=b;
b:=(b+a)/2;
end
else
begin
a:=b;
b:=c;
end
until ((abs(a-b)
writeln('koren yravnenija x=',b:0:5)
end
else
writeln('kornei net');
end;
begin
clrScr;
nyl(1.5,1.8);
readkey;
end.


|