Origin for each line in src/analyze.red from check-in c1ddb4c814:

c1ddb4c814 2021-03-01 jeff@gridfini: % function analysis
c1ddb4c814 2021-03-01 jeff@gridfini: % Function f (x) is defined ?
c1ddb4c814 2021-03-01 jeff@gridfini: if (freeof(f,x)) then << write "first define function f(x)"; end; >>
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: fp:=df (f, x);
c1ddb4c814 2021-03-01 jeff@gridfini: fpp:=df (fp, x);
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: % zeroes
c1ddb4c814 2021-03-01 jeff@gridfini: xz:=solve (f, x);
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: % extremes
c1ddb4c814 2021-03-01 jeff@gridfini: xe:=solve (fp, x);
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: % reversal points
c1ddb4c814 2021-03-01 jeff@gridfini: xr:=solve (fpp, x);
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: % extreme values
c1ddb4c814 2021-03-01 jeff@gridfini: x1:=first (xe);
c1ddb4c814 2021-03-01 jeff@gridfini: y1:=sub (x1, f);
c1ddb4c814 2021-03-01 jeff@gridfini: y2:=sub (x1, fpp);
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: on rounded;
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: if numberp(y2) then
c1ddb4c814 2021-03-01 jeff@gridfini: if y2<0 then write "local maximum" else
c1ddb4c814 2021-03-01 jeff@gridfini: if y2=0 then write "reversal point"
c1ddb4c814 2021-03-01 jeff@gridfini: else write "local minimum";
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: off rounded;
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: % integration of 2nd derivative
c1ddb4c814 2021-03-01 jeff@gridfini: f1:=int (fpp, x);
c1ddb4c814 2021-03-01 jeff@gridfini: % integration of 1st derivative
c1ddb4c814 2021-03-01 jeff@gridfini: f0:=int (f1, x);
c1ddb4c814 2021-03-01 jeff@gridfini: f0:=int (fp, x);
c1ddb4c814 2021-03-01 jeff@gridfini: 
c1ddb4c814 2021-03-01 jeff@gridfini: end;

olli-scripts
English Homepage | German Homepage | DL2MIE | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]