1
$\begingroup$

The first are from an old paper, dealing with the evaluation of elastic Green function in a transversely isotropic medium (Hill 1964).

Hill1 = ((a4 z[1]^2 + a1 z[2]^2 + a5 z[3]^2) (a5 (z[1]^2 + z[2]^2) + a2 z[3]^2) - z[2]^2 z[3]^2 a3^2)/((a4 (z[1]^2 + z[2]^2) + a5 z[3]^2) ((a5 (z[1]^2 + z[2]^2) + a2 z[3]^2) (a1 (z[1]^2 + z[2]^2) + a5 z[3]^2) - a3^2 (z[1]^2 + z[2]^2) z[3]^2)); Hill2 = (z[1] z[2]^2 z[3] (a1 - a4) a3 - z[1] z[3] a3 (a4 z[1]^2 + a1 z[2]^2 + a5 z[3]^2))/((a4 (z[1]^2 + z[2]^2) + a5 z[3]^2) ((a5 (z[1]^2 + z[2]^2) + a2 z[3]^2) (a1 (z[1]^2 + z[2]^2) + a5 z[3]^2) - a3^2 (z[1]^2 + z[2]^2) z[3]^2)); 

The following are the corresponding Mathematica expressions resulting from a 3X3 matrix inversion.

mat1 = (a5 (z[1]^2 + z[2]^2) (a4 z[1]^2 + a1 z[2]^2) + ((a2 a4 + a5^2) z[1]^2 + (a1 a2 - a3^2 + a5^2) z[ 2]^2) z[3]^2 + a2 a5 z[3]^4)/(a1 a4 a5 (z[1]^2 + z[2]^2)^3 + ((a1 a2 - a3^2) a4 + (a1 + a4) a5^2) (z[1]^2 + z[2]^2)^2 z[3]^2 + a5 (-a3^2 + a2 (a1 + a4) + a5^2) (z[1]^2 + z[2]^2) z[3]^4 + a2 a5^2 z[3]^6); mat2 = -((a3 z[1] z[3])/( a1 a5 (z[1]^2 + z[2]^2)^2 + (a1 a2 - a3^2 + a5^2) (z[1]^2 + z[2]^2) z[3]^2 + a2 a5 z[3]^4)); In[165]:= {mat1 - Hill1, mat2 - Hill2} // Together Out[165]= {0, 0} In[170]:= {mat1 == Hill1, mat2 == Hill2} // Simplify Out[170]= {True, True} 

Any ideas of how "pushing" Mathematica to simplify mat1 to Hill1 and mat2 to Hill2?

Thank you very much.

P.S.

Even if it was not needed for the above commands I should add that

z[i], i=1,2,3, satisfy z[1]^2+z[2]^2+z[3]^2=1.

$\endgroup$
1
  • $\begingroup$ Usually trying to force Mathematica into writing an equation in a particular form can drive you nuts. After all, what do you achieve? You already know both forms are equivalent ... $\endgroup$ Commented Dec 11, 2014 at 14:50

1 Answer 1

2
$\begingroup$

I agree with @Belisarius that simplification attempts can drive you nuts. It seems especially unlikely that mat2 can be simplified easily into Hill2, because mat2 is the simpler form to begin with. However, it is straightforward to simplify each pair into the same forms. Use

FullSimplify[Expand[Hill1]]; FullSimplify[Expand[mat1]]; FullSimplify[Expand[Hill2]]; FullSimplify[Expand[mat2]]; 

Note that FullSimplify works better than Simplify here.

$\endgroup$
3
  • $\begingroup$ Thank you very much for your reply. $\endgroup$ Commented Dec 11, 2014 at 15:14
  • $\begingroup$ Because counta[z_] := Count[z, a_, Infinity] gives a smaller Count for Hill1 (130) than for mat1 (158), I thought that using ComplexityFunction -> counta in my Answer above might drive mat1 to Hill1, but it does not. Strange. $\endgroup$ Commented Dec 11, 2014 at 15:34
  • $\begingroup$ I guess that FullSimplify[Expand[Hill1]]; FullSimplify[Expand[mat1]]; FullSimplify[Expand[Hill2]]; FullSimplify[Expand[mat2]]; is the best we can get. Myself, I am pretty satisfied with your answer. $\endgroup$ Commented Dec 11, 2014 at 15:43

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.