Symbolic matrix power



Thank you very much Aleksas! Your method seems to work flawlessly. I did 
not understand exactly what you have done but I willi try to read the doc.
Regards,

Michele Minelli

Il 25/10/2013 19:50, Aleksas Domarkas ha scritto:
> *Michele Minelli*micheleminelli1 at 
> gmail.com<mailto:maxima%40math.utexas.edu?Subject=Re%3A%20%5BMaxima%5D%20Symbolic%20matrix%20power&In-Reply-To=%3C526A668D.7080605%40gmail.com%3E>;
> /Fri Oct 25 07:39:41 CDT 2013 wrote:/
> //
> /
> >Hello everyone,
> >is there a way to compute the k-th power of a >matrix .in a symbolic way?
> >For example if the matrix is [2, 0, 0], [0, 2, 0],[-1, 0, 3] it should
> >return [2^k, 0, 0], [0, 2^k, 0], [2^k-3^k, 0, 3^k].
> >Thank you.
> >Michele
> /
> //
> /Do/
> (%i1) A:matrix([2, 0, 0], [0, 2, 0], [-1, 0, 3])$
> (%i2) load("diag")$
> (%i3) integer_pow(x) := block ([k], declare (k, integer), x^k)$
> (%i4) mat_function (integer_pow, A);
> (%o4) matrix([2^k,0,0],[0,2^k,0],[2^k-3^k,0,3^k])
> best
> Aleksas D
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima