Subject: How to graph an expression involving sum?
From: Stavros Macrakis
Date: Sat, 10 Sep 2011 08:59:48 -0400
I would suggest defining a function in expanded form then compiling it:
myfun(x) := ( mode_declare(x,float), ''(ev(coefseries,nouns)) ) $
(that's two single-quotes, not one double-quote)
compile(myfun)$
plot2d( myfun, ... )
It would also be possible to convert the sum into a loop and the a[i]= into
a[i]:, but that is more work for the same result.
-s
On Thu, Sep 8, 2011 at 16:36, dlakelan <dlakelan at street-artists.org> wrote:
> On 09/05/2011 01:08 PM, dlakelan wrote:
> > I have a solution of a differential equation in terms of some fourier
> > series. I would like to graph one of the spatially varying coefficients,
> > so I tried something like:
> ....
> > What's the right way to go about graphing something like this?
>
> I should mention that I can do ev(coefseries,nouns) to convert the "sum"
> noun into an enormous + expression, but this slows things down
> considerably. If I am trying to simply do numerical calculations with
> the expression, is there a faster way to get the evaluation than to
> carry around a big symbolic expression? Is something like a lambda
> expression like this the way to go?
>
> lambda([x],ev(coefseries,avals,nouns,z=x,numer))
>
> or does this just internally create and throw away the enormous +
> expression?
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>