I'm given a statement to prove:
A rotation of π/2 around the z-axis, followed by a rotation of π/2 around the x-axis = A rotation of 2π/3 around (1,1,1)
Where z-axis is the unit vector (0,0,1) and x-axis is the unit vector (1,0,0).
I want to prove this statement using quaternions, however, I'm not getting the expected answer:
The quaternion I calculate for the rotation of 2π/3 around (1,1,1) yields:
$ [\frac{1}{2},(\frac{1}{2},\frac{1}{2},\frac{1}{2})] $
The quaternion I calculate for a rotation of π/2 around the z-axis followed by the rotation of π/2 around the x-axis yields:
$ [\frac{1}{2},(\frac{1}{2},-\frac{1}{2},\frac{1}{2})] $
If I calculate the rotation π/2 around z-axis, followed by the rotation of π/2 around y-axis, then I get the equivalent quaternions I'm looking for. Is this an issue with the problem statement or am I simply making an error?
Note: That I also tried to prove the same statement using rotation matrices instead of quaternions and received the same result.