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

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

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