unit Unit2;

interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;



  Procedure CalcY(Memo:TMemo; xn:extended; xk:extended; h:extended);
implementation


  Procedure CalcY;
  var
    x,y: extended;
   begin
   x := xn;
        repeat
         y:=(1-sqr(x)/2)*cos(x)-x/2*sin(x);;
              Memo.Lines.Add('при x='+FloatToStrF(x,ffFixed,6,2)+'   y(x) ='
                                   + FloatToStrF(Y,ffFixed,8,4));

         x:=x+h;
  until x>(xk+h/2)
  end;



end.

