plotting (sin (x))^2 +(cos(x))^2)




On Fri, 11 Dec 2009, Doug Edmunds (gmail) wrote:

< Using wxMaxima 0.8.3 / Maxima 5.19.2
< 
< wxplot2d([(sin (x))^2,(cos(x))^2], [x,-5,5])$
< looks correct.
< 
< wxplot2d([(sin (x))^2 +(cos(x))^2], [x,-5,5])$
< should produce a straight line (y=1),
< but doesn't.  What do I need to do?
< 
< - dae

Set the y-range:

wxplot2d([(sin (x))^2 +(cos(x))^2], [x,-5,5],[y,0,2])$
 
The variation you see is due to numerical noise and 
the graphical backend autoscales so you see it.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.