Halfway symbolic halfway numeric evaluation on wxMAXIMA



I believe this is the way wxMaxima is supposed to work. It has nothing to
do specifically with symbolic vs numeric, but with its semantics of
variable values. When you re- evaluate a cell, it uses current (dynamic)
variable values, not the values in effect at the time the cell was created
(textual or lexical order).  This can be very confusing, I agree. It also
means that re evaluating a cell that refers to % will not refer to the
textually preceding value, but the dynamically preceding value that was
calculated.

If you want to re evaluate from the top, I suggest you start with
kill(all). If you want to re evaluate individual cells with their original
context, I think you need to re evaluate all previous cells starting with
kill (all). Or you might want to try other front ends to Maxima that have a
different interaction model. Maybe batch files will work better for you,
for example.

Personally, I find the wxMaxima model confusing, but maybe I'm not using it
as it was designed to be used.

       -s
On Apr 17, 2013 1:05 AM, "Berns Buenaobra" <berns.buenaobra at gmail.com>
wrote:

> Hello members:
>
> I have just recently adapted MAXIMA in my teaching for science education
> and physics majors in class - the symbolic math is key and the biggest
> motivator for students to have computer aided solution (to augment the
> previous class training on long hand calculus and ODE etc.).
>
> It seemed that when I started using real values on the my sheet towards
> the of end of my worksheet the earlier cells simply adapted and lost all my
> symbols and computed numerically?  Is the effect of say having assigned a
> value to a symbol say R:100, C:100e-6, L:35e-3 (from a problem in network
> analysis) global?
>
> Will it be possible that I can selectively just on the same worksheet
> enable symbolic on this cell and  that or from here to there?
>
> Thanks this is such a wonderful teaching tool for me.
>
> Regards,
> Berns B.
> USC Dept. of Physics (Cebu,Philippines)
>
>
> On Wed, Apr 17, 2013 at 7:25 AM, <maxima-request at math.utexas.edu> wrote:
>
>> Send Maxima mailing list submissions to
>>         maxima at math.utexas.edu
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://www.math.utexas.edu/mailman/listinfo/maxima
>> or, via email, send a message with subject or body 'help' to
>>         maxima-request at math.utexas.edu
>>
>> You can reach the person managing the list at
>>         maxima-owner at math.utexas.edu
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Maxima digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: program works with maxima 5.29.1 but freezes  with    maxima
>>       5.30.0 (Rupert Swarbrick)
>>    2. Re: program works with maxima 5.29.1 but freezes  with    maxima
>>       5.30.0 (Dmitry Shkirmanov)
>>    3. Re: The wiki is back (Jaime Villate)
>>    4. Re: DiracDelta (Richard Hennessy)
>>    5. dependencies (Edwin Woollett)
>>    6. Getting the coefficients of a polynomial (Stavros Macrakis)
>>    7. Re: The wiki is back (Robert Dodier)
>>    8. Re: Getting the coefficients of a polynomial (Richard Fateman)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Tue, 16 Apr 2013 18:34:18 +0100
>> From: Rupert Swarbrick <rswarbrick at gmail.com>
>> To: maxima at math.utexas.edu
>> Subject: Re: [Maxima] program works with maxima 5.29.1 but freezes
>>         with    maxima 5.30.0
>> Message-ID: <qle04axqr7.ln2 at skate.rswarbrick>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Dmitry Shkirmanov <piminusmeson at bk.ru> writes:
>> > It seems that expand, not subst causes the problem. Does maxima show
>> > you the expr1 in the end of the attached program? I cannot see it,
>> > maxima consums all available memory and just hangs up.
>>
>> Well, I was running Maxima in a terminal / Emacs. I got a few pages of
>> text before hitting Ctrl-C to interrupt the printing.
>>
>> The problem isn't expand though, I wouldn't think. It's almost certainly
>> operating correctly. I expect that the problem is that what you are
>> expanding is huge...
>>
>> 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/20130416/80905a51/attachment-0001.pgp
>> >
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Tue, 16 Apr 2013 22:38:28 +0400
>> From: Dmitry Shkirmanov <piminusmeson at bk.ru>
>> To: maxima at math.utexas.edu
>> Subject: Re: [Maxima] program works with maxima 5.29.1 but freezes
>>         with    maxima 5.30.0
>> Message-ID: <516D9AA4.80008 at bk.ru>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> >
>> > The problem isn't expand though, I wouldn't think. It's almost certainly
>> > operating correctly. I expect that the problem is that what you are
>> > expanding is huge.
>> >
>> > My *guess* is that something simplified massively when you did the big
>> > substitution on the previous version of Maxima
>>
>> It seems that you are right. "expand(factor(test2))"  returns good
>> answer while  "expand(test2)"  consumes all available memory.  I just
>> added the "factor" command manually. Now everything works as expected,
>> so problem solved.
>>
>> Thank you very much for help.
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Tue, 16 Apr 2013 20:14:07 +0100
>> From: Jaime Villate <villate at fe.up.pt>
>> To: maxima at math.utexas.edu
>> Subject: Re: [Maxima] The wiki is back
>> Message-ID: <516DA2FF.8040600 at fe.up.pt>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> If you access https://sourceforge.net/p/maxima/admin/wiki/permissions
>> you can control who can do several different actions in the wiki: admin,
>> configure, create, delete, edit, etc.
>> I added "Developer" to almost all actions.
>> You will notice that there is a group called "General", which is what I
>> was planning to use; I have granted
>> permission to create new wiki pages or edit the existing ones to the
>> group General, which is currently empty.
>>
>> I have checked in https://sourceforge.net/p/maxima/admin/groups/ that by
>> having granted those permissions in the wiki the general permissions for
>> that Group have not changed, so I think that the wiki permissions will
>> not interfere with git and other sections.
>>
>> We could then add users in the General group through
>> https://sourceforge.net/p/maxima/admin/groups/
>> Do you agree with this? Do you see any potential problems?
>>
>> Regards,
>> Jaime
>>
>> On 04/16/2013 05:32 PM, Robert Dodier wrote:
>> > On 2013-04-16, Jaime Villate <villate at fe.up.pt> wrote:
>> >
>> >> the new wiki, using the new Sourceforge software, is now active. It can
>> >> be accessed from the homepage. The FAQ is now back in the Wiki.
>> >> All developers with git access should also be able to modify the wiki
>> >> (please do). Other people who would like to help us with the wiki,
>> >> should be registered in Sourceforge and can  then send me a message
>> >> telling me the sourceforge username and what they would like to help
>> with.
>> > Terrific. What is the procedure for a project administrator to grant
>> > write permission to a non-developer? Is there a way to get a list of all
>> > users who have write permission?
>> >
>> > best
>> >
>> > Robert Dodier
>> >
>> > _______________________________________________
>> > Maxima mailing list
>> > Maxima at math.utexas.edu
>> > http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Tue, 16 Apr 2013 16:10:27 -0400
>> From: "Richard Hennessy" <rich.hennessy at verizon.net>
>> To: "Rupert Swarbrick" <rswarbrick at gmail.com>
>> Cc: maxima at math.utexas.edu
>> Subject: Re: [Maxima] DiracDelta
>> Message-ID: <E48EDF6ADAFB40EC8B1149A86DE8E6FC at RichsLaptop>
>> Content-Type: text/plain; charset="utf-8"
>>
>> On Apr 16, 2013 1:59 AM, "Richard Hennessy" <rich.hennessy at verizon.net>
>> wrote:
>> > Sorry if that confused anyone.  I am not just trying to solve
>> integrate(pwdelta(x-a)*f(x),x) but also integrate(diff_pwdelta(i,x-a)
>> *f(x),x).
>>
>> Ok but, to solve that, you can just use integration by parts, right?
>> Since delta only picks up stuff at zero, you don't even have to worry about
>> boundary values.
>>
>> Rupert
>>
>> Yes, integrate(du*v) = ?integrate(u*dv) because u*v = 0.
>>
>> Rich
>>
>> -------------- next part --------------
>> URL: <
>> http://www.math.utexas.edu/pipermail/maxima/attachments/20130416/74cb5f86/attachment-0001.html
>> >
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Tue, 16 Apr 2013 13:48:49 -0700
>> From: "Edwin Woollett" <woollett at charter.net>
>> To: "maxima mailing list" <maxima at math.utexas.edu>
>> Subject: dependencies
>> Message-ID: <60851BD48471466EB3CBDC377D6F7865 at edwinc367e16bd>
>> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>>         reply-type=original
>>
>> The Maxima help manual states that
>> dependencies is a list of atoms which have a
>> functional dependence, assigned by depends or
>> gradef.
>>
>> The help manual omits that dependencies is
>> also a function:
>>
>> (%i1) dependencies;
>> (%o1)                                 []
>> (%i2) depends(u,t);
>> (%o2)                               [u(t)]
>> (%i3) dependencies;
>> (%o3)                               [u(t)]
>> (%i4) dependencies(a(t));
>> (%o4)                               [a(t)]
>> (%i5) dependencies;
>> (%o5)                            [u(t), a(t)]
>>
>>
>> Ted Woollett
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 6
>> Date: Tue, 16 Apr 2013 17:40:26 -0400
>> From: Stavros Macrakis <macrakis at alum.mit.edu>
>> To: maxima mailing list <maxima at math.utexas.edu>
>> Cc: ????? ??????? <akritas at uth.gr>
>> Subject: Getting the coefficients of a polynomial
>> Message-ID:
>>         <
>> CACLVabX-7bBGZVSTUwA59WqDQB9GqKXdddmtFPpQK3hyQr3imw at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> How can I get the coefficients of a polynomial in x?
>>
>> Clearly I first put into into CRE form with main variable x:
>>
>>      poly: rat(input_poly,x)$
>>
>> Then what?  The internal form of the CRE lets you just "read off" the
>> coefficients at this point, but I can't think of any Maxima function that
>> lets you access that.
>>
>> I can loop like this:
>>
>>      coefs(p,v):=block([l:[]],while p # 0 do
>> (l:cons(r:ratcoef(p,v,0),l),p:(p-r)/v),l)
>>
>> but that seems like an awful lot of work (*n* polynomial divisions).  It
>> also isn't very efficient for sparse polynomials like x^20000.  You could
>> do similar things with bothcoef or ratcoef, but again you end up building
>> *n
>> * intermediate polynomials as you remove terms.
>>
>> You might think you could use ratcoef for i:0..*n*, but how do you
>> determine *n*?  hipow is inefficient in that it converts the expression
>> into general representation first (!).
>>
>> Am I missing some obvious solution, or do we need to add rat_hipow and
>> rat_coeffs or something?
>>
>>       rat_hipow(x^3+a*x+1,x) => 3
>>       rat_coeffs(x^3+a*x+1,x) => [[3,1],[1,a],[0,1]]
>>
>> Edge cases to think about: CREs with negative powers, cf.
>> ratcoef(1/x^3,x,-3) => 1, ratcoef(a/(b-x),x,-5) => -a*b^4, etc.
>>
>>            -s
>> -------------- next part --------------
>> URL: <
>> http://www.math.utexas.edu/pipermail/maxima/attachments/20130416/4a181d49/attachment-0001.html
>> >
>>
>> ------------------------------
>>
>> Message: 7
>> Date: Tue, 16 Apr 2013 22:53:38 +0000 (UTC)
>> From: Robert Dodier <robert.dodier at gmail.com>
>> To: maxima at math.utexas.edu
>> Subject: Re: [Maxima] The wiki is back
>> Message-ID: <kkkkpi$bcs$1 at ger.gmane.org>
>>
>> On 2013-04-16, Jaime Villate <villate at fe.up.pt> wrote:
>>
>> > Do you agree with this? Do you see any potential problems?
>>
>> OK by me.
>>
>> best
>>
>> Robert Dodier
>>
>>
>>
>> ------------------------------
>>
>> Message: 8
>> Date: Tue, 16 Apr 2013 16:25:00 -0700
>> From: Richard Fateman <fateman at eecs.berkeley.edu>
>> To: Stavros Macrakis <macrakis at alum.mit.edu>
>> Cc: maxima mailing list <maxima at math.utexas.edu>, ????? ???????
>>         <akritas at uth.gr>
>> Subject: Re: [Maxima] Getting the coefficients of a polynomial
>> Message-ID: <516DDDCC.5070909 at eecs.berkeley.edu>
>> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>>
>> It seems to me that if you want to create an array of coefficients,
>> there are a couple of things:
>> sparse or dense?
>>
>> e.g.  is  5*x^4+1   supposed to be [5,0,0,0,1]   or [[5,4],[0,1]]?
>>
>>
>> On 4/16/2013 2:40 PM, Stavros Macrakis wrote:
>> > How can I get the coefficients of a polynomial in x?
>> >
>> > Clearly I first put into into CRE form with main variable x:
>> >
>> >      poly: rat(input_poly,x)$
>> >
>> > Then what?  The internal form of the CRE lets you just "read off" the
>> > coefficients at this point, but I can't think of any Maxima function
>> > that lets you access that.
>> >
>> > I can loop like this:
>> >
>> >      coefs(p,v):=block([l:[]],while p # 0 do
>> > (l:cons(r:ratcoef(p,v,0),l),p:(p-r)/v),l)
>>
>> better would be somegthing like this  (no division, no re-ratting.)
>>
>>     coefs(p,v) := (p:rat(p,v), block([l:[]], while p#0 for i:hipow(p,v)
>> step -1 thru 0 do(  l:cons(r:ratcoef(p,v,i), p:p-r*v^i))  , l));
>>
>> >
>> > but that seems like an awful lot of work (/n/ polynomial divisions).
>> >  It also isn't very efficient for sparse polynomials like x^20000.
>> >  You could do similar things with bothcoef or ratcoef, but again you
>> > end up building /n/ intermediate polynomials as you remove terms.
>> >
>> > You might think you could use ratcoef for i:0../n/, but how do you
>> > determine /n/?  hipow is inefficient in that it converts the
>> > expression into general representation first (!).
>> >
>> > Am I missing some obvious solution, or do we need to add rat_hipow and
>> > rat_coeffs or something?
>>
>> rat_hipow(p,x):= ?cadadr(rat(p,x))
>>
>> >
>> >       rat_hipow(x^3+a*x+1,x) => 3
>> > rat_coeffs(x^3+a*x+1,x) => [[3,1],[1,a],[0,1]]
>> >
>> > Edge cases to think about: CREs with negative powers, cf.
>> > ratcoef(1/x^3,x,-3) => 1, ratcoef(a/(b-x),x,-5) => -a*b^4, etc.
>> >
>> >            -s
>> >
>> >
>> >
>> > _______________________________________________
>> > Maxima mailing list
>> > Maxima at math.utexas.edu
>> > http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>> -------------- next part --------------
>> URL: <
>> http://www.math.utexas.edu/pipermail/maxima/attachments/20130416/0e74c18f/attachment.html
>> >
>>
>> ------------------------------
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>>
>> End of Maxima Digest, Vol 81, Issue 28
>> **************************************
>>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>