(Newbie) Problem plotting numerical integrations



Try

plot3d('(r(x,y)),[x,-1,1],[y,-1,1],[grid,50,50],[gnuplot_pm3d,true]);

that worked for me.

Rich

 ------------Original Message------------
From: Tim Day <timday at bottlenose.demon.co.uk>
To: maxima at math.utexas.edu
Date: Tue, Sep-2-2008 7:09 PM
Subject: (Newbie) Problem plotting numerical integrations

What's the trick to getting this to give me something other than a scary
error message (appended below) ?

  V(p):=max(0,1-sqrt(p.p));
  load(romberg);
  r(x,y):=romberg(V([x,y,z]),z,-1,1);
  plot3d(r(x,y),[x,-1,1],[y,-1,1],[grid,50,50],[gnuplot_pm3d,true]);

>From using Maxima many years ago, I have a vague idea it involves
putting a ' or an ev() or float() in the right place.

quad_qags instead of romberg gives me the same error.
There's nothing wrong with the plotting setup e.g
  plot3d(V([x,y,0]),[x,-1,1],[y,-1,1],[grid,50,50],[gnuplot_pm3d,true])
works fine, as do explicit evaluations like r(0.25,0.1)
I'm using wxmaxima 0.7.1 on Debian/Lenny.

Thanks for any help
Tim
---
Here's the console output after the plot3d
(a bitmangled, but you get the idea):
Maxima encountered a Lisp error: Error in TRAMP1$-M [or a callee]:
(($MAX SIMP) 0                                    ((MPLUS SIMP) 1
((MTIMES SIMP) -1                                      ((MEXPT SIMP)
((MPLUS SIMP) 1.0                                        ((MEXPT SIMP)
$X 2)                                        ((MEXPT SIMP) $Y 2))
0.5)))) is not of type (OR
RATIONAL
LISP:FLOAT).


_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima