procedure TForm1.Button5Click(Sender: TObject);
const mash=25;
Var x0,y0:integer;
x,y:real;
begin
x0:=image2.Width div 2;
y0:=image2.Height div 2;
// рисуем ось
image2.canvas.pen.color:=clgray;
image2.canvas.pen.width:=2;
image2.Canvas.MoveTo(x0,0);
image2.Canvas.LineTo(x0,clientheight);
image2.canvas.moveto(0,y0);
image2.Canvas.lineto(clientwidth,y0);
//рисуем график
image2.Canvas.Pen.Color:=clred;
x:=0;
y:=0;
image2.canvas.moveto(trunc(x0)+1,trunc(y0)+100);
repeat
x:=x+0.01;
if x <= 0 then
y := 0
else
y:=-ln(x);
image2.canvas.lineto(trunc(x*mash)+x0,trunc(y*mash)+y0);
until x>=50;
end;