CoCalc -- Collaborative Calculation in the Cloud
Sharedsupport / 2015-01-21-eigen.sagewsOpen in CoCalc

Examples for support purposes...

var('a11,a12,a13,a14,a15,a16,a22,a23,a24,a25,a26,a33,a34,a35,a36,a44,a45,a46,a55,a56,a66,p,q,r', domain='real')
g11=a11*p*p+a66*q*q+a55*r*r+2.0*a16*p*q+2.0*a15*p*r+2.0*a56*q*r;
g22=a66*p*p+a22*q*q+a44*r*r+2.0*a26*p*q+2.0*a46*p*r+2.0*a24*q*r;
g33=a55*p*p+a44*q*q+a33*r*r+2.0*a45*p*q+2.0*a35*p*r+2.0*a34*q*r;
g12=a16*p*p+a26*q*q+a45*r*r+(a12+a66)*p*q+(a14+a56)*p*r+(a46+a25)*q*r;
g13=a15*p*p+a46*q*q+a35*r*r+(a14+a56)*p*q+(a13+a55)*p*r+(a36+a45)*q*r;
g23=a56*p*p+a24*q*q+a34*r*r+(a46+a25)*p*q+(a36+a45)*p*r+(a23+a44)*q*r;

g0=matrix(3,3,[g11,g12,g13,g12,g22,g23,g13,g12,g33])
(a11, a12, a13, a14, a15, a16, a22, a23, a24, a25, a26, a33, a34, a35, a36, a44, a45, a46, a55, a56, a66, p, q, r)
%time f = g0.charpoly()
CPU time: 0.23 s, Wall time: 0.23 s