log(x^2) plot



Jo?o Vieira Gomes <vieiragomes at sapo.pt> writes:
> When I tried to plot log(x^2), maxima make the simplification 2log(x)
> and produces its graph. Those 2 functions are not equal because they
> do not have the same domain. How can we do to plot log(x^2) in maxima?

Switch off the logexpand flag:

(%i27) log(x^2);
(%o27)                             2 log(x)
(%i28) logexpand: false;
(%o28)                               false
(%i29) log(x^2);
                                         2
(%o29)                              log(x )

Then eg

  plot2d(log(x^2), [x, -2, 2]);

gives what you wanted.

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130102/761e90ac/attachment.pgp>;