1
$\begingroup$

I have a matrix of the form:

Tvol // TraditionalForm

$$\left( \begin{array}{ccc} 1 & \frac{\delta I_1(\kappa )}{I_0(\kappa )} & 0 \\ \frac{I_1(\kappa ) \delta ^*}{I_0(\kappa )} & \frac{\delta (I_1(\kappa )+\kappa I_2(\kappa )) \delta ^*}{\kappa I_0(\kappa )} & 0 \\ 0 & 0 & \frac{\delta I_1(\kappa ) \delta ^*}{\kappa I_0(\kappa )} \\ \end{array} \right)$$

That I want to simplify with these assumptions:$g=\frac{I_2(\kappa)}{I_0(\kappa)},g_c=\frac{I_1(\kappa)}{I_0(\kappa)}$
So far I have tried the following codes, but none of them work.

Replace[Tvol, 
  {BesselI[2, κ]/BesselI[0, κ] -> g, 
   BesselI[1, κ]/BesselI[0, κ] -> Subscript[g, c]}]

Refine[Tvol, 
  Assumptions -> 
    {g = BesselI[2, κ]/BesselI[0, κ], 
     Subscript[g, c] = BesselI[1, κ]/BesselI[0, κ]}]

Simplify[Tvol, 
  Assumptions -> 
    {g = BesselI[2, κ]/BesselI[0, κ], 
     Subscript[g, c] = BesselI[1, κ]/BesselI[0, κ]}]  

The definition of $Tvol$ is as follows:

Tvol = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}
Tvol[[1, 1]] = Integrate[p[ψ, 0, κ]*T[ψ][[1, 1]], {ψ, -Pi/2, Pi/2}]
Tvol[[1, 2]] = Integrate[p[ψ, 0, κ]*T[ψ][[1, 2]], {ψ, -Pi/2, Pi/2}]
Tvol[[1, 3]] = Integrate[p[ψ, 0, κ]*T[ψ][[1, 3]], {ψ, -Pi/2, Pi/2}]
Tvol[[2, 1]] = Integrate[p[ψ, 0, κ]*T[ψ][[2, 1]], {ψ, -Pi/2, Pi/2}]
Tvol[[2, 2]] = Integrate[p[ψ, 0, κ]*T[ψ][[2, 2]], {ψ, -Pi/2, Pi/2}]
Tvol[[2, 3]] = Integrate[p[ψ, 0, κ]*T[ψ][[2, 3]], {ψ, -Pi/2, Pi/2}]
Tvol[[3, 1]] = Integrate[p[ψ, 0, κ]*T[ψ][[3, 1]], {ψ, -Pi/2, Pi/2}]
Tvol[[3, 2]] = Integrate[p[ψ, 0, κ]*T[ψ][[3, 2]], {ψ, -Pi/2, Pi/2}]
Tvol[[3, 3]] = Integrate[p[ψ, 0, κ]*T[ψ][[3, 3]], {ψ, -Pi/2, Pi/2}] 

$T(\psi)$ and $p(\psi)$ are earlier defined in the notebook as follows:

S = Sqrt[2]/2*{{1 + δ\[Conjugate], 0}, {0, 1 - δ\[Conjugate]}} // Simplify  
k = 
  (1/Sqrt[2]) *
    {{S[[1, 1]] + S[[2, 2]]}, {S[[1, 1]] - S[[2, 2]]}, {2 S[[1, 2]]}} // Simplify  
Subscript[T, 0] = Dot[k, ConjugateTranspose[k]] // Simplify  
R[ψ_] := {{1, 0, 0}, {0, Cos[2 ψ], Sin[2 ψ]}, {0, -Sin[2 ψ], Cos[2 ψ]}}  
T[ψ_] := Dot[R[ψ], Subscript[T, 0], Transpose[R[ψ]]]  
p[x_, mu_, k_] := 2*PDF[VonMisesDistribution[2 mu, k], 2 x] // Simplify;

Following the comments I wrote:

Simplify[Tvol, 
  Assumptions -> 
    {g == BesselI[2, κ]/BesselI[0, κ], 
     Subscript[g, c] == BesselI[1, κ]/BesselI[0, κ]}]  
{{1, (δ BesselI[1, κ])/BesselI[0, κ], 0}, 
 {(BesselI[1, κ] Conjugate[δ])/BesselI[0, κ], 
  (δ (BesselI[1, κ] + κ BesselI[2, κ]) Conjugate[δ])/(κ BesselI[0, κ]), 
  0}, 
 {0, 0, (δ BesselI[1, κ] Conjugate[δ])/(κ BesselI[0, κ])}}  

but as you see that didn't solve the problem. I even replaced , by &&:

Simplify[Tvol, 
  Assumptions -> 
    {g == BesselI[2, κ]/BesselI[0, κ] && 
     Subscript[g, c] == BesselI[1, κ]/BesselI[0, κ]}]

but that does not change the result.

$\endgroup$
  • $\begingroup$ It'll be easier to help if you provide your definition of Tvol. $\endgroup$ – N.J.Evans Sep 17 '15 at 2:26
  • 1
    $\begingroup$ The problem is, your assumptions are not boolean statements. Use a == sign (double equals). The single = sign has another meaning in MMA. Thus I vote to close as "arising from a syntax error" $\endgroup$ – LLlAMnYP Sep 17 '15 at 6:43
  • $\begingroup$ @LLlAMnYP that doesn't solve the problem. $\endgroup$ – Sepideh Abadpour Sep 17 '15 at 7:33
  • $\begingroup$ I agree, it's not only because of the syntax error. Alexei has provided a solution, but from your definition of Tvol it's not entirely obvious to me, why Alexei's result is wrong. $\endgroup$ – LLlAMnYP Sep 17 '15 at 8:09
  • 1
    $\begingroup$ I see. In your link it seems quite obvious, that Mathematica's result is "simpler". Of course, given your substitutions, it may be even better to use the result provided by the authors of the article, but there's no straightforward way to make MMA realize, that there's a nice relationship between g and gc that will let it simplify to what you want. I'm pretty sure, there's a way to use the TransformationFunctions option to teach it, but I can't help much further. I suggest you check out the many other threads on simplification here. $\endgroup$ – LLlAMnYP Sep 17 '15 at 9:48
4
$\begingroup$

Do you mean this:

    Tvol /. 
      {BesselI[1, κ] -> gc*BesselI[0, κ], BesselI[2, κ] -> g*BesselI[0, κ]} // 
        Simplify // TraditionalForm

enter image description here

??

Later edit: to deal with the complex conjugated deltas you may do as follows:

 Tvol /. 
   {BesselI[1, κ] -> gc*BesselI[0, κ], BesselI[2, κ] -> g*BesselI[0, κ]} /. 
     δ*a__*δ\[Conjugate] -> a*Abs[δ]^2 // Simplify // TraditionalForm

enter image description here

Have fun!

$\endgroup$
  • $\begingroup$ It should be $$\begin{bmatrix}1&g_c\delta&0\\g_c\delta^*&\frac{(1+g)}{2}|\delta|^2&0\\0&0&\frac{(1-g)}{2}|\delta|^2\end{bmatrix}$$ after simplification $\endgroup$ – Sepideh Abadpour Sep 17 '15 at 8:02
  • $\begingroup$ the element $(3,3)$ is $\frac{(1-g)}{2}|\delta|^2$. I don't why I can't edit it in the matrix $\endgroup$ – Sepideh Abadpour Sep 17 '15 at 8:07
  • 1
    $\begingroup$ @sepideh I cannot really understand all your definitions, but it seems that you did not instruct Mma that δ∗ is a conjugated value of δ. Using simply a conjugate symbol is not enough. You should use Conjugate[δ] instead and then apply ComplexExpand in the end. In the case at hand you may go around easier by making a substitution δ->Abs[δ]^2/δ∗ after all the operations I did, but before the application of TraditionalForm . Have fun! $\endgroup$ – Alexei Boulbitch Sep 17 '15 at 8:21
  • 1
    $\begingroup$ @sepideh Mma does use such identities. There has once been a discussion about it on this site, have a look. Generally, you might use FullSimplify instead of Simplifyfor that. However, the result depends upon the Mma "opinion", of what form of the expression is more simple. It does not always coincide with my own opinion. For this reason I would instead take the identities into account by making substitutions of the sort I did above, but based on my own ideas of how the result should look like. $\endgroup$ – Alexei Boulbitch Sep 17 '15 at 9:17
  • 1
    $\begingroup$ @sepideh No, I will need to search through this site, but this you could do as well. I looked, however, into my records and see that the work with such identities typically requires a trick, such as the use of certain TransformationFunctions or of a special ComplexityFunction . Though very elegant, a direct substitution of a sort I did above might be faster to find. $\endgroup$ – Alexei Boulbitch Sep 17 '15 at 10:09

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.