2
$\begingroup$

I have a $ 12\times 12 $ matrix, of which I have taken the determinant. And I get a very big expression with three unknowns K1, K2 and b. The problem is how to reduce this expression to a simple form? I tried using Simplify and FullSimplify but it takes forever for getting a result.

matrix = {{0, 1., 0, 1., 0, 0, 0, 0, 0, 0, 0, 0},
          {b, 0, b, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
          {0, 0, 0, 0, 0, 0, 0, 0, -1. b^2 Sin[1.2 b], -1. b^2 Cos[1.2 b], b^2 Sinh[1.2 b], b^2 Cosh[1.2 b]}, 
          {0, 0, 0, 0, 0, 0, 0, 0, -1. b^3 Cos[1.2 b], b^3 Sin[1.2 b], b^3 Cosh[1.2 b], b^3 Sinh[1.2 b]}, 
          {Sin[1.2 b], Cos[1.2 b], Sinh[1.2 b], Cosh[1.2 b], 0, -1., 0, -1., 0, 0, 0, 0},
          {b Cos[1.2 b], -1. b Sin[1.2 b], b Cosh[1.2 b], b Sinh[1.2 b], -1. b, 0, -1. b, 0, 0, 0, 0, 0}, 
          {-1. b^2 Sin[1.2 b], -1. b^2 Cos[1.2 b], b^2 Sinh[1.2 b], b^2 Cosh[1.2 b], 0, 1. b^2, 0, -1. b^2, 0, 0, 0, 0}, 
          {-1. b^3 Cos[1.2 b] - 1. K1 Sin[1.2 b], -1. K1 Cos[1.2 b] + b^3 Sin[1.2 b], b^3 Cosh[1.2 b] - 1. K1 Sinh[1.2 b], -1. K1 Cosh[1.2 b] + b^3 Sinh[1.2 b], 1. b^3, 0, -1. b^3, 0, 0, 0, 0, 0}, 
          {0, 0, 0, 0, Sin[1.6 b], Cos[1.6 b], Sinh[1.6 b], Cosh[1.6 b], 0, -1., 0, -1.}, 
          {0, 0, 0, 0, b Cos[1.6 b], -1. b Sin[1.6 b], b Cosh[1.6 b], b Sinh[1.6 b], -1. b, 0, -1. b, 0}, 
          {0, 0, 0, 0, -1. b^2 Sin[1.6 b], -1. b^2 Cos[1.6 b], b^2 Sinh[1.6 b], b^2 Cosh[1.6 b], 0, 1. b^2, 0, -1. b^2}, 
          {0, 0, 0, 0, -1. b^3 Cos[1.6 b] - 1. K2 Sin[1.6 b], -1. K2 Cos[1.6 b] + b^3 Sin[1.6 b], b^3 Cosh[1.6 b] - 1. K2 Sinh[1.6 b], -1. K2 Cosh[1.6 b] + b^3 Sinh[1.6 b], 1. b^3, 0, -1. b^3, 0}
         };
$\endgroup$
  • $\begingroup$ What are the constraints on K1, K2 and b? $\endgroup$ – Αλέξανδρος Ζεγγ Dec 12 '18 at 5:51
  • $\begingroup$ K1 and K2 are a positive real finite number. b is usually a positive real number which lies between 0 to 100 $\endgroup$ – acoustics Dec 12 '18 at 6:01
  • $\begingroup$ Why do you want the determinant in its simplest form? And why don't you think that the result of Det[matrix] is in its simplest form? $\endgroup$ – David G. Stork Dec 12 '18 at 6:36
  • $\begingroup$ The expression is too big . I want to simplify the result of the determinant $\endgroup$ – acoustics Dec 12 '18 at 7:02
4
$\begingroup$

A first step is to Rationalize the matrix before evaluating:

Det[matrix // Rationalize] // FullSimplify
(*2 b^12 (16 b^6 + 2 K1 K2 Cos[(12 b)/5] - 2 K1 K2 Cosh[(12 b)/5] +K1 K2 Cos[(4 b)/5] Cosh[4 b] + 8 b^3 (K1 - K2) Cosh[(6 b)/5] Sin[(6 b)/5] +8 b^3 (-K1 + K2) Cosh[(14 b)/5]Sin[(14 b)/5] + 8 b^3 (-K1 + K2) Cos[(6 b)/5] Sinh[(6 b)/5] + 2 K1 K2 Sin[(12 b)/5]Sinh[(12 b)/5] +8 b^3 (K1 - K2) Cos[(14 b)/5] Sinh[(14 b)/5] + 4 Cosh[(6 b)/5] Sin[4b] (2 b^3 (K1 + K2) Cosh[(14 b)/5] - K1 K2 Sinh[(14 b)/5]) -2 K1 K2 Sin[(8 b)/5] (-3Sinh[(8 b)/5] + Sinh[4 b]) +Cos[4 b] (-K1 K2 (Cosh[(4 b)/5] + 2 Cosh[(8 b)/5]) + 16b^6Cosh[4 b] - 4 b^3 (K1 + K2) Sinh[4 b]) + 2 Cos[(8 b)/5] (K1 K2 Cosh[4 b] - 2 b^3 (K1+ K2) Sinh[4 b]))*)
$\endgroup$
2
$\begingroup$
det = TrigReduce[Det[Rationalize[matrix]]];

Let's compare the complexity of the expressions:

LeafCount[Det[matrix]]
LeafCount[det]

5637

606

It is not as compact as Ulrich's proposal (which has LeafCount of only 282), but it is much faster and may serve as starting point for further simplifications.

$\endgroup$
  • $\begingroup$ Yes, It is very useful. as you said FullSimplify will take some additional time to get the desired results, but the obtained expression compact. $\endgroup$ – acoustics Dec 12 '18 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.