How to simplify the complex result with trig-abs-sqrt obtained related with Cosine symbolic Matrix of EulerAngles

Here in X-convention

Extrinsic

RotationMatrix3DExtrinsic[ϕ_,θ_,ψ_]:=RotationMatrix[π-ψ,{0,0,1}].RotationMatrix[θ,{1,0,0}].RotationMatrix[π-ϕ,{0,0,1}]


Intrinsic

RotationMatrix3DIntrinsic[ϕ_,θ_,ψ_]:=RotationMatrix[π-ϕ,RotationMatrix[θ,RotationMatrix[π-ψ,{0,0,1}].{1,0,0}].{0,0,1}].RotationMatrix[θ,RotationMatrix[π-ψ,{0,0,1}].{1,0,0}].RotationMatrix[π-ψ,{0,0,1}]


In Numeric values, they got the same results.

RotationMatrix3DExtrinsic[π/3, π/4, π/5]//N
RotationMatrix3DIntrinsic[π/3,π/4,π/5]//N


But RotationMatrix3DIntrinsic does not work well in symbolic value, alpha,beta,gamma. After a long time calculation, I see some complex result with Conjugate Abs... So how to develop it.

result=RotationMatrix3DIntrinsic[a,b,c];
t=Assuming[Element[{a,b,c},Reals],result];


failed.

t=Assuming[Element[{a,b,c},Reals]&&0<a<π/2&&0<b<π/2&&0<c<π/2,result//Simplify];


failed.

t=Simplify[result,Element[{a,b,c},Reals]&&0<a<π/2&&0<b<π/2&&0<c<π/2];


failed.

There are a lot Abs, Trig functions

• Simpler case two angle

the result show that we should add suitable range of angles, however it cost too much time.

a solution: how to speed up?

IntrinsicRotation3D[ϕ_,θ_,ψ_]:=Module[{},

rot1=FullSimplify[RotationMatrix[ϕ,axisZ={0,0,1}],ψ∈Reals&&0<ϕ<π/2];

rot2=FullSimplify[RotationMatrix[θ,axisX=rot1.{1,0,0}],Element[{θ,ϕ},Reals]&&0<θ<π/2&&0<ϕ<π/2];

rot3=FullSimplify[RotationMatrix[ψ,axisZNew=rot2.axisZ],Element[{θ,ψ,ϕ},Reals]&&0<θ<π/2&&0<ψ<π/2&&0<ϕ<π/2];

result=rot3.rot2.rot1//FullSimplify]

• By default, Mathematica assumes your angles are complex. You thus need to use assumptions; look up the second argument of Simplify[], or look up Assuming[]. Commented May 11, 2013 at 3:07
• @J.M. ok, Let me try that, does any simpler way to Obtain the matrix just like Extrinsic way? Commented May 11, 2013 at 3:09
• @bel, your eyes are sensitive to pink? Commented May 11, 2013 at 3:19
• Commented May 11, 2013 at 3:34
• @belisarius you spend too much time on wikipedia ;-) Commented May 11, 2013 at 10:08

rot1 = RotationMatrix[ϕ, axisZ = {0, 0, 1}];
rot2 = Simplify@ComplexExpand[RotationMatrix[θ, axisX = rot1.{1, 0, 0}], TargetFunctions -> {Re, Im}];
rot3 = Simplify@TrigFactor@ComplexExpand[RotationMatrix[ψ, rot2.axisZ], TargetFunctions -> {Re, Im}];
rot3.rot2.rot1 // Simplify

(* {{Cos[ϕ] Cos[ψ] -
Cos[θ] Sin[ϕ] Sin[ψ], -Cos[θ] Cos[ψ] \
Sin[ϕ] - Cos[ϕ] Sin[ψ],
Sin[θ] Sin[ϕ]}, {Cos[ψ] Sin[ϕ] +
Cos[θ] Cos[ϕ] Sin[ψ],
Cos[θ] Cos[ϕ] Cos[ψ] -
Sin[ϕ] Sin[ψ], -Cos[ϕ] Sin[θ]}, \
{Sin[θ] Sin[ψ], Cos[ψ] Sin[θ], Cos[θ]}}
*)