error with find_root when functions containing more than one built-in constant like %pi



On Sat, 2007-01-27 at 19:33 -0700, Robert Dodier wrote:
> Bob,
> 
> Maxima treats %e differently than other symbolic constants.
> %e is preserved as a symbol in contexts in which other constants
> become numbers. The user can encourage Maxima to turn %e into
> a number via the %enumer flag. Not sure if that works 100%.
> 
> f(x) := -(log((4 + %e)/(2*%pi)))*(((4 + %e)/(2*%pi))^x);
> find_root (2*x = f(x), x, -1, 0), %enumer;
>   => - .03340289826874122
> 
> g(x) := cos((%e + %pi)*x);
> find_root (2*x = g(x), x, 0, 1), %enumer;
>   => .1984210505656873
> 
> (1) Probably find_root should always let %enumer be true.
> 
> (2) Maxima simplifies exp(x) to %e^x and the special cases for %e
> are probably related to that. As an alternative Maxima could refrain
> from exp(x) --> %e^x, and then treat %e like other constants.

Thanks Robert, seems odd to treat %e differently than other symbolic
constants but it is good to know.

Thanks for the info, Bob
-- 
Dr. Robert J. Jerrard, Professor of Mathematics,
Concordia University College of Alberta,
7128 Ada Blvd., Edmonton, Alberta, T5B 4E4, Canada.
Phone: (780) 479-9291, Fax: (780) 474-1933.