1 | initial version |
Please give the given function.
(Or describe somehow the class of functions which are relevant for the intended application. Is e.g. the function a polynomial / a rational function?)
If it is differentiable, then sage can calculate the first relevant derivatives. The human hand can finally simply solve the puzzle.
For instance:
sage: f(x) = x^3 + 6*x^2 + 10*x + 6
sage: extList = diff(f(x),x).roots( ring=AA, multiplicities=0 )
sage: extList
[-2.816496580927726?, -1.183503419072274?]
sage: for ext in extList:
....: print """x=%s f(x)=%s f"(x)=%s""" % (ext, f(ext), diff(f(x),x,2)(x=ext))
....:
x=-2.816496580927726? f(x)=3.088662107903635? f"(x)=-4.898979485566356?
x=-1.183503419072274? f(x)=0.911337892096366? f"(x)=4.898979485566356?