>>>>> "Aleksas" == Aleksas Domarkas <aleksasd873 at gmail.com> writes:
Aleksas> see http://www.math.utexas.edu/pipermail/maxima/2013/031439.html
Aleksas> Find roots of f=log(x^3-x*78+90)+1000*x
Aleksas> ?(%i1) f:log(x^3-x*78+90)+1000*x$
Aleksas> (%i2) allroots(x^3-x*78+90); map(rhs,%)$
Aleksas> (%o2) [x=1.174624074847539,x=8.185668853475939,x=-9.360292928323476]
Aleksas> (%i4) [x1,x2,x3]:sort(%);
Aleksas> (%o4) [-9.360292928323476,1.174624074847539,8.185668853475939]
Aleksas> x^3-x*78+90<0 if x in (-infinity, x1)U (x2, x3). Then
Aleksas> ?function f is defined for all x in (x1, x2)U(x3, infinity)
Aleksas> (%i5) limit(f,x,x1,plus);
Aleksas> (%o5) -inf
Aleksas> (%i6) limit(f,x,x2,minus);
Aleksas> (%o6) 1140.659863000102
Aleksas> (%i7) limit(f,x,x3,plus);
Aleksas> (%o7) 8155.863524711861
What is the intent of computing the limits above with approximate
roots of the cubic?
--> ? wxplot2d([f], [x,-20,20])$
Aleksas> ?Function f has only one root:
No, the function has 3 roots. You've found the negative root.
The other two roots, which don't show up in the graph, are very close
the to positive roots of the cubic. As mentioned before, this is
easier to see if you transform log(x^3-78*x+90)+1000*x = 0 to
(x^3-78*x+90)=exp(-1000*x). Since exp(-1000*x2) and exp(-1000*x3) are
zero (for floats), x2 and x3 are very close to the roots.
Ray