Rupert Swarbrick | 23 May 2013 13:31
Picon
Gravatar

Another rewriting question (with exp(%i*%pi*n))

Hi,

I've been messing around trying to reproduce some results in a paper I
was reading. With pen and paper, I get a subtly different answer to the
authors, but the calculation is unpleasant, so I thought I'd try to use
Maxima to make sure I hadn't messed up the arithmetic.

My problem is that I have expressions with stuff that's maybe of the
form:

 exp(%i*n*T*w + %i*%pi*x)

Maybe I know that T*w = 2*%pi (time and "angular speed"), so I can
transform that to

 exp(%i*n*2*%pi + %i*%pi*x)

I can tell Maxima that n is an integer, but how do can I get Maxima to
figure out that the expression is equal to exp(%i*%pi*x)? The
expressions I actually have to deal with are a bit bigger, but I don't
think it changes the fundamental question. (And they contain terms of
this form, with an integer times 2*%pi*%i plus something else in the
exponent)

Defrule-based incantations don't seem to be working for me. I also found
the %emode flag in the documentation, but it doesn't seem to have any
effect. (Bug?)

Rupert
(Continue reading)

Ben Blomberg | 23 May 2013 07:17

Using dgeev

Dear All,

I am using the function dgeev to find the eigenvalues and eigenvectors of a 21x21 matrix. Can anyone tell me if dgeev normalizes the eigenvectors? If not is there another function to do this or do I need to write my own?

Thanks,
Ben
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Oliver Kullmann | 22 May 2013 21:09
Picon
Picon
Favicon

array-lambda error with 5.30.0

Hello,

I get an error with 5.30.0 which I don't get with 5.29.0 (or previous
versions):

Maxima 5.30.0 http://maxima.sourceforge.net
using Lisp ECL 11.1.1
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) a:make_array(fixnum,3);
Evaluation took 0.0000 seconds (0.0000 elapsed)
(%o1) "{Lisp Array: #(0 0 0)}"
(%i2) L:buildq([a], lambda([x],a[x]));
Evaluation took 0.0000 seconds (0.0000 elapsed)
Maxima encountered a Lisp error:

 In function SYMBOL-PLIST, the value of the first argument is
  #(0 0 0)
which is not of the expected type SYMBOL

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

Wrapping an array in a lambda-term is used quite a bit by us,
and I think it should work?

Best

Oliver
Leo Butler | 22 May 2013 19:53
Picon
Gravatar

utf8 + maxima


I have recently become attached to using utf8 characters in my maxima
code, which works great with sbcl. But both ecl and gcl choke, at
least when fed from the maxima repl. So, I wonder if someone can
explain to me the following behaviour:

Maxima 5.30.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. 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) ρ:1;
incorrect syntax: \201 is not an infix operator
\317\201
^
(%i1) :lisp (msetq $ρ 1)

1
(%i1) :lisp $ρ

1

Leo
(The utf8 character is Greek Small Letter Rho, Hex c1)
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Barton Willis | 22 May 2013 12:40
Favicon

non automatic tellsimp rule on addition?

There is some difference between when a tellsimp rule is applied. Maybe the "and may not work"
warning is relevant?

(%i1) tellsimp(b+1,z);
tellsimp: warning: putting rules on '+' or '*' is inefficient, and may not work.
(%o1) [+rule1,simplus]

(%i2) tellsimp(2*b,42);
tellsimp: warning: putting rules on '+' or '*' is inefficient, and may not work.
(%o2) [*rule1,simptimes]

OK-- Maxima automatically simplifies 2*b to 42

 (%i3) 2*b;
 (%o3) 42

Not OK -- b+1 isn't automatically simplified to z:

 (%i4) b+1;
 (%o4) b+1

 (%i5) expand(%,0,0);
 (%o5) z

--Barton
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
David E. Miller | 21 May 2013 00:40

Minimal Maxima Revisited Article

Hello:

I have written an article, "Minimal Maxima Revisited", which is an 
elaboration of the "Minimal Maxima" article written by Robert Dodier.
It should probably be called "Medium Maxima" or something like that. In 
any case I would like to find a way to send it to Robert Dodier
for his perusal and if there are  no objections, offer this for 
inclusion with the list of "tutorial"  or other documents of the Maxima 
project web site

If there is an interest please reply with the method I should use to 
send this to those that are involved with the project web site.

Thanks.

David E. Miller
Robert Dodier | 21 May 2013 18:26
Picon

progress on diff(sum) and sum(kron_delta)

I think I've made some progress on computing derivatives
of sums and sums of kron_delta. It is doubtless possible
to find bugs in this but all the same I think it's an improvement.

I've attached the code. Here is an example session.

(%i1) display2d : false $
(%i2) load ("sum_kron_delta.mac") $
(%i3) load ("diff_sum.mac") $
(%i4) 'sum ('diff ('sum (A[i]*x[i]^2, i, 1, n), x[j]), j, 1, n);
(%o4) 2*'sum(if true then x[j]*A[j] else 0,j,1,n)
(%i5) ''%;
(%o5) 2*'sum(x[j]*A[j],j,1,n)
(%i6) 'diff ('sum (u[k - 1] * u[k] * u[k + 1], k, 1, m), u[l]);
(%o6) 'diff('sum(u[k-1]*u[k]*u[k+1],k,1,m),u[l],1)
(%i7) ''%;
(%o7) 'sum(u[k-1]*u[k]*kron_delta(k+1,l)+u[k-1]*kron_delta(k,l)*u[k+1]
                                        +kron_delta(k-1,l)*u[k]*u[k+1],k,1,m)
(%i8) declare (sum, linear) $
(%i9) ''%o7;
(%o9) (if 1 <= l+1 and l+1 <= m and %elementp(l+1,integers) then u[l+1]*u[l+2]
           else 0)
 +(if 1 <= l and l <= m and %elementp(l,integers) then u[l-1]*u[l+1] else 0)
 +(if 1 <= l-1 and l-1 <= m and %elementp(l-1,integers) then u[l-2]*u[l-1]
       else 0)
(%i10) declare (l, integer);
(%o10) done
(%i11) assume (0 <= l and l <= m + 1) $
(%i12) ''%o7;
(%o12) (if l+1 <= m then u[l+1]*u[l+2] else 0)
 +(if 1 <= l and l <= m then u[l-1]*u[l+1] else 0)
 +(if 1 <= l-1 then u[l-2]*u[l-1] else 0)

I threw in a little bit of stuff for simplifying set operations -- I'm inclined
to think all set operations should be simplifications, but I'll push that
agenda another day.

Thanks to Stavros and Michael Valenzuela and everybody who
has expressed interest in this topic over the past few years.

best

Robert Dodier
Attachment (diff_sum.mac): application/octet-stream, 1196 bytes
Attachment (sum_kron_delta.mac): application/octet-stream, 1895 bytes
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Berns Buenaobra | 21 May 2013 10:11
Picon

wxMaxima "Insert Image" command

I have the same observation on my worksheets. So what I do is after I evaluate everything I export that to a HTML so I have all images and the symbolics, numerics as well.

Unfortunately the editable worksheet will always just give you the links the image path and filename and thats it. So in a way we could say that it does not really "embeds" the image. This maybe a known limitation we probably need to accept.
Its easily done in MathCAD and is truly embedded but thats commercial stuff.

Regards,
Berns B.
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Ronald Modesitt | 19 May 2013 15:11
Picon

wxMaxima "Insert Image" command

The wxMaxima "Insert Image" command is causing me some confusion. I am assuming that "insert image" creates a link to a .png file which would then be displayed upon opening the session file (.wxm) for additional work.

Upon opening the .wxm file and issuing  "evaluate all cells" wxMaxima displays a text field with the .png file name from "insert image" command but not the image. I would appreciate help in understanding how "insert image" works.

I am using Windows Vista Business with wxMaxima 12.04.0,  and Maxima 5.28



--
Ronald F. Modesitt

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Derka Ladislav | 18 May 2013 20:23
Picon

Simplifying x^a*y^a to (x*y)^a

I have a idea (combined previous)

expcontract(_expr):=block([_z],
     exp_log_to_power(_e):= block([_s, logconcoeffp: lambda([_s],true)], 
logcontract(_e)),
     logexpand: super,
     scanmap(lambda([_z],if atom(_z) then _z else (
         exp_log_to_power(exp(logcontract(log(_z))))
     )),_expr)
)$

expr: x^a*y^a$
expcontract(expr);
  ->  (x*y)^a

expr: (a^d*b^d+c^a*a^a)/(d^b*e^b+a^b*c^b)$
expcontract(expr);
  -> ((a*b)^d+(a*c)^a)/((d*e)^b+(a*c)^b)

Derka
Raymond Toy | 19 May 2013 18:42
Picon

Regression in integration


I was looking at a message from Harry Christhian[1] about a bug in
integration, which I didn't quite understand, but I found the
following serious error:

(%i1) integrate(c/x^n,x);
Is n - 1 zero or nonzero?

nonzero;
(%o1)                              c log(x)

It doesn't matter whether you answer zero or nonzero; you get the
answer as if n = 1.

Ray

[1] Is it possible to directly send email to maxima-bugs?  Or should
only the bug tracker send email to that list?  Anyway, I think he's
saying integrate(c/x^n,x) returns -c/(1-n)*x^(1-n) but he wants
-c/(n-1)/x^(n-1). 

Gmane