My advice is to find extreme values โโthe same way you did it manually: calculate the derivative, solve for the derivative = 0 and replace any values โโfound back to the original function. For instance:.
(%i1) f(x) := (3*x)/(x^2 - 2*x + 4); 3 x (%o1) f(x) := ------------ 2 x - 2 x + 4 (%i2) diff (f(x), x); 3 3 x (2 x - 2) (%o2) ------------ - --------------- 2 2 2 x - 2 x + 4 (x - 2 x + 4) (%i3) ratsimp (%); 2 3 x - 12 (%o3) - ----------------------------- 4 3 2 x - 4 x + 12 x - 16 x + 16 (%i4) num (%); 2 (%o4) 12 - 3 x (%i5) solve (%, x); (%o5) [x = - 2, x = 2] (%i6) map (lambda ([e], subst (e, f(x))), %); 1 3 (%o6) [- -, -] 2 2
If I were careful, I would check that x = -2 and x = 2 are really extreme values, not just inflection points, and I would check that the denominator% o3 is nonzero at x = -2 and x = 2 before trying to estimate f (x) at these points.
source share