Taylor Polynomials



Adam,

it's simply a typo:

>      explicit(exp(-x2-y2), x, -1, 1, y, -1, 1),

I guess you want 

      explicit(exp(-x^2-y^2), x, -1, 1, y, -1, 1),

Volker van Nek

Am 1 Dec 2008 um 20:35 hat Adam Majewski geschrieben:

> Hi,
> 
> 
> 
> /*
> wxMaxima 0.7.6 http://wxmaxima.sourceforge.net
> Maxima 5.16.3 http://maxima.sourceforge.net
> Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) load(draw)$
> (%i2) tay(n, x, y) := block(
>      [ts : taylor(exp(-x__^2-y__^2), [x__, y__], [0,0], n)],
>      subst([x__=x, y__=y], ts)
> )$
> (%i3) with_slider_draw3d(
>      n, 1+2*makelist(i,i,0,6),
>      color = blue,
>      explicit(exp(-x2-y2), x, -1, 1, y, -1, 1),
>      color = red,
>      explicit('(tay(n,x,y)), x, -1, 1, y, -1, 1),
>      zrange=[0,1]
> );
> Maxima encountered a Lisp error:
>   Error in > [or a callee]: ((MTIMES SIMP) 1.0
>                              ((MEXPT SIMP) 2.7182818284590451
>                               ((MPLUS SIMP) ((MTIMES SIMP) -1 $X2)
>                                ((MTIMES SIMP) -1 $Y2)))) is not of type (OR
>  
>   RATIONAL
>  
>   LISP:FLOAT).
> Automatically continuing.
> To reenable the Lisp debugger set *debugger-hook* to nil.
> 
> 
> 
> ???
> 
> Adam
> 
> 
> 
> Andrej Vodopivec pisze:
> > You can make animations in 3d using the draw package:
> > 
> > (%i14) load(draw)$
> > (%i15) tay(n, x, y) := block(
> >     [ts : taylor(exp(-x__^2-y__^2), [x__, y__], [0,0], n)],
> >     subst([x__=x, y__=y], ts)
> > )$
> > (%i16) with_slider_draw3d(
> >     n, 1+2*makelist(i,i,0,6),
> >     color = blue,
> >     explicit(exp(-x^2-y^2), x, -1, 1, y, -1, 1),
> >     color = red,
> >     explicit('(tay(n,x,y)), x, -1, 1, y, -1, 1),
> >     zrange=[0,1]
> > );
> > 
> > HTH,
> > 
> > Andrej
> > 
> > 
> > 
> > On Sun, Nov 30, 2008 at 4:20 PM, Thomas Lingefj?rd
> > <Thomas.Lingefjard at ped.gu.se> wrote:
> >> Dear all,
> >>
> >> I know how to make a dynamic view of a Taylor Polynomial in two
> >> dimensions by using the function with_slider(  in wxMaxima.
> >>
> >> Is there a similar way to show the approximating
> >> Taylor polynomial in three dimensions, for instance for the
> >> surface of f: exp(-x^2-y^2) at (0, 0)or at any other point?
> >>
> >> --
> >> V?nliga h?lsningar/  Bedste hilsner/  Best regards/  Bien cordialement/
> >>  Cordilamente/  Pozdrowienia/  Sch?ne Gr??e/  Sz?v?lyes ?dv?zlettel,
> >> Thomas
> >>
> >> *******************************************************
> >> Thomas Lingefj?rd
> >>
> >> Associate Professor, Mathematics Education
> >> UNIVERSITY of GOTHENBURG, Department of Education
> >>
> >> Box 300
> >> SE 405 30  G?TEBORG
> >> SWEDEN
> >> Telephone:      +46 (0)31 786 2253
> >> Cellular:      +46 (0)708 29 39 73
> >>
> >> Mail:   Thomas.Lingefjard at ped.gu.se
> >> Web: http://www.ipd.gu.se/personal/thomas.lingefjard/
> >>
> >> "For what you see and hear depends a good deal on where you are standing:
> >> it also depends on what sort of person you are." (C.S. Lewis)
> >>
> >>
> >>
> >> _______________________________________________
> >> Maxima mailing list
> >> Maxima at math.utexas.edu
> >> http://www.math.utexas.edu/mailman/listinfo/maxima
> >>
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima