Search code examples
maxima

Maxima not evaluating trig expressions


How do you make maxima give you the numerical value for a expression involving trigonometric function?

For example ''(sin(pi/6)); or ev(sin(pi/6)) just returns sin(pi/6) instead of 0.5


Solution

  • First, note that 3.14... is written as %pi in Maxima (note the percent sign). Second, you can force numerical evaluation by writing float(sin(%pi/6)) or ev(sin(%pi/6), numer) or, in the interactive console, sin(%pi/6), numer.