Subject: last revision maxima and mininima points of f(x)
From: Luigi Marino
Date: Sun, 8 Feb 2009 14:38:44 +0100
Here is my last revesion of minima and maxima
for f(x), founds also inflection points (zeros of second
derivative only). Some zeros of second derivative are not inflection points (it for all critical users of Maxima).
It works without problem for polinomials
and rational functions (some limitation for log and
exponential function, no works for trig function ).
load(descriptive);
stud_funz(f):=block([p,q,fs,fp],
p:solve(diff(f,x,1),x),
q:solve(diff(f,x,2),x),
fs:diff(f,x,2),
fp:ev(fs,x:p),
for i:1 thru length(float(p)) do
(if rhs(fp[i])>0 then print("minimo",[p[i],ev(f,x:rhs(p[i]))]),
if rhs(fp[i])<0 then print("massimo",[p[i],ev(f,x:rhs(p[i]))])),
for j:1 thru length(float(q)) do print("flesso",[q[j],ev(f,x:rhs(q[j]))]))$
Example:
f:(x^3+10*x)/(x^2+1);
stud_funz(f);
minimo[x=-sqrt(2),-4*sqrt(2)]
massimo[x=sqrt(2),4*sqrt(2)]
massimo[x=-sqrt(5),-(5*sqrt(5))/2]
minimo[x=sqrt(5),(5*sqrt(5))/2]
flesso[x=-sqrt(3),-(13*sqrt(3))/4]
flesso[x=sqrt(3),(13*sqrt(3))/4]
flesso[x=0,0]
Best wishes
luigi