Fwd: One missing maxima feature, that I have the math behind, but not a program



The second parameter is your parameter of time, it should be a variable
like t, which you can then plug in a value for. I'm working on something
that does matrices with zero eigenvalues correctly.


On Sat, Dec 21, 2013 at 6:21 AM, Barton Willis <willisb at unk.edu> wrote:

>  Examples:
>
>
>  (%i2) m : matrix([5,7],[9,11])$
>
>
>  Suboptimal?
>
>
>      (%i3) matrix_power(m,0);
>       expt: undefined: 0^0
>
>       0: matrix_power(a=matrix([5,7],[9,11]),t=0)(mp.mac line 35)
>
>
>  For the 0-th power, matrixfun gives the identity:
>
>
>    (%i4) matrixfun(lambda([x], x^0), m);
>    (%o4) matrix([1,0],[0,1])
>
>
>  For an inverse, matrix_power returns a scalar
>
>
>     (%i5) matrix_power(m,-1);
>    (%o5) B_[2]/(3*2^(3/2)+8)+B_[1]/(8-3*2^(3/2))
>
>
>     (%i6) matrixfun(lambda([x], x^-1), m);
>     (%o6) matrix([-11/8,7/8],[9/8,-5/8])
>
>
>      (%i9) m : matrix([a,b],[b,c]);
>     (%o9) matrix([a,b],[b,c])
>
>
>  Symbolic matrices:
>
>
>      (%i18) m : matrix([a,b],[b,c]);
>     (%o18) matrix([a,b],[b,c])
>
>
>      (%i19) matrix_power(m,2);
>     (%o19)
> (B_[2]*(sqrt(c^2-2*a*c+4*b^2+a^2)+c+a)^2)/4+(B_[1]*(sqrt(c^2-2*a*c+4*b^2+a^2)-c-a)^2)/4
>
>
>
>     (%i20) matrixfun(lambda([x],x^2),m);
>     Proviso: assuming c^2-2*a*c+4*b^2+a^2 # 0
>     (%o20) matrix([b^2+a^2,b*c+a*b],[b*c+a*b,c^2+b^2])
>
>
>   --Barton (author of matrixfun)
>
>
>  ------------------------------
>