Re: simple formula for svd of 2 by 2 array



Macsyma provides an answer from svd(A) where the
matrix A is 2x2. The first line is a TeX comment
with the input form. The rest is a TeX version.
Another command "optimize" picks out common subexpressions
in the two parts of the list.

I suspect this is equivalent to Robert Israel's and
has similar prospects for division by zero.
RJF




%[SQRT(SQRT(A[2,2]^4+(2*A[2,1]^2+2*A[1,2]^2-2*A[1,1]^2)*A[2,2]^2+8*A[1,1]*A[1,2]*A[2,1]*A[2,2]+A[2,1]^4+(2*A[1,1]^2-2*A[1,2]^2)*A[2,1]^2+A[1,2]^4+2*A[1,1]^2*A[1,2]^2+A[1,1]^4)+A[2,2]^2+A[2,1]^2+A[1,2]^2+A[1,1]^2)/SQRT(2),SQRT(-SQRT(A[2,2]^4+(2*A[2,1]^2+2*A[1,2]^2-2*A[1,1]^2)*A[2,2]^2+8*A[1,1]*A[1,2]*A[2,1]*A[2,2]+A[2,1]^4+(2*A[1,1]^2-2*A[1,2]^2)*A[2,1]^2+A[1,2]^4+2*A[1,1]^2*A[1,2]^2+A[1,1]^4)+A[2,2]^2+A[2,1]^2+A[1,2]^2+A[1,1]^2)/SQRT(2)]
$$ \left\{ {{\sqrt{\sqrt{a^{4}_{2,2}+\left(2\,a^{2}_{2,1}+2\,a^{2}_{1%
,2}-2\,a^{2}_{1,1}\right)\,a^{2}_{2,2}+8\,a_{1,1}\,a_{1,2}\,a_{2,1}%
\,a_{2,2}+a^{4}_{2,1}+\left(2\,a^{2}_{1,1}-2\,a^{2}_{1,2}\right)\,a%
^{2}_{2,1}+a^{4}_{1,2}+2\,a^{2}_{1,1}\,a^{2}_{1,2}+a^{4}_{1,1}}+a^{2%
}_{2,2}+a^{2}_{2,1}+a^{2}_{1,2}+a^{2}_{1,1}}}\over{\sqrt{2}}},{{%
\sqrt{-\sqrt{a^{4}_{2,2}+\left(2\,a^{2}_{2,1}+2\,a^{2}_{1,2}-2\,a^{2%
}_{1,1}\right)\,a^{2}_{2,2}+8\,a_{1,1}\,a_{1,2}\,a_{2,1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