>> syms x real
>> A = sym([1 -2*cos(x) 0; -sin(x)/cos(x)*sin(x) 1 cos(x); 1 -2*sin(x)/cos(x)*sin(x) 2])
A =
[ 1, -2*cos(x), 0]
[ -sin(x)^2/cos(x), 1, cos(x)]
[ 1, -(2*sin(x)^2)/cos(x), 2]
>> [V,D]=eig(A)
V =
[ ((cos(x)^4 + 3*cos(x)^2*sin(x)^2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3) + 4/3))/(cos(x)^4 - 2*sin(x)^6) - (2*(cos(x)^4 + cos(x)^2*sin(x)^4 + cos(x)^2*sin(x)^2))/(cos(x)^4 - 2*sin(x)^6) - (cos(x)^2*sin(x)^2*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3) + 4/3)^2)/(cos(x)^4 - 2*sin(x)^6), - (2*(cos(x)^4 + cos(x)^2*sin(x)^4 + cos(x)^2*sin(x)^2))/(cos(x)^4 - 2*sin(x)^6) - ((cos(x)^4 + 3*cos(x)^2*sin(x)^2)*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 + (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3))/(cos(x)^4 - 2*sin(x)^6) - (cos(x)^2*sin(x)^2*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 + (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3)^2)/(cos(x)^4 - 2*sin(x)^6), - (2*(cos(x)^4 + cos(x)^2*sin(x)^4 + cos(x)^2*sin(x)^2))/(cos(x)^4 - 2*sin(x)^6) - ((cos(x)^4 + 3*cos(x)^2*sin(x)^2)*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 - (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3))/(cos(x)^4 - 2*sin(x)^6) - (cos(x)^2*sin(x)^2*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 - (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3)^2)/(cos(x)^4 - 2*sin(x)^6)]
[ ((3*cos(x)^3 + 2*cos(x)*sin(x)^4)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3) + 4/3))/(2*(cos(x)^4 - 2*sin(x)^6)) - (cos(x)^3 + 2*cos(x)*sin(x)^4 + cos(x)^3*sin(x)^2)/(cos(x)^4 - 2*sin(x)^6) - (cos(x)^3*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3) + 4/3)^2)/(2*(cos(x)^4 - 2*sin(x)^6)), - (cos(x)^3 + 2*cos(x)*sin(x)^4 + cos(x)^3*sin(x)^2)/(cos(x)^4 - 2*sin(x)^6) - ((3*cos(x)^3 + 2*cos(x)*sin(x)^4)*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 + (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3))/(2*(cos(x)^4 - 2*sin(x)^6)) - (cos(x)^3*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 + (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3)^2)/(2*(cos(x)^4 - 2*sin(x)^6)), - (cos(x)^3 + 2*cos(x)*sin(x)^4 + cos(x)^3*sin(x)^2)/(cos(x)^4 - 2*sin(x)^6) - ((3*cos(x)^3 + 2*cos(x)*sin(x)^4)*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 - (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3))/(2*(cos(x)^4 - 2*sin(x)^6)) - (cos(x)^3*(1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 - (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 4/3)^2)/(2*(cos(x)^4 - 2*sin(x)^6))]
[ 1, 1, 1]
D =
[ 1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) + (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3) + 4/3, 0, 0]
[ 0, 4/3 - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 - (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)), 0]
[ 0, 0, 4/3 - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)/2 + (3^(1/2)*(1/(9*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3)) - (((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))*1i)/2 - 1/(18*(((cos(x)^2 + sin(x)^2 - 1/27)^2 - 1/729)^(1/2) - cos(x)^2 - sin(x)^2 + 1/27)^(1/3))]
>> D=simplify(diag(D),300)
D =
2 - (2*(-1)^(1/3)*(2*3^(1/2) - 3)*(- 15*3^(1/2) - 26)^(1/3))/3 - 3^(1/2)/3
0
2 + 1i
>> V2=V(:,2);
>> simplify(imag(V2),100)
ans =
0
0
0
>> V2=real(V2);
>> V2=simplify(V2,100)
V2 =
- 1/cos(2*x) - 1
-cos(x)/(2*cos(x)^2 - 1)
1
>> simplify(V2*(1-2*sin(x)^2),100)
ans =
-2*cos(x)^2
-cos(x)
cos(2*x)
Best Answer