With proper tools it is not that difficult, using MAXIMA in my Linux console (%i are my inputs, %o are maxima output):
Code:
~$ maxima
Maxima 5.42.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) MX: matrix(
[cos(a),-sin(a),0],
[sin(a),cos(a),0],
[0,0,1] );
[ cos(a) - sin(a) 0 ]
[ ]
(%o1) [ sin(a) cos(a) 0 ]
[ ]
[ 0 0 1 ]
(%i2) MY: matrix(
[cos(b),0,-sin(b)],
[0,1,0],
[sin(b),0,cos(b)] );
[ cos(b) 0 - sin(b) ]
[ ]
(%o2) [ 0 1 0 ]
[ ]
[ sin(b) 0 cos(b) ]
(%i3) MZ: matrix(
[1,0,0],
[0, cos(c),sin(c)],
[0, -sin(c),cos(c)] );
[ 1 0 0 ]
[ ]
(%o3) [ 0 cos(c) sin(c) ]
[ ]
[ 0 - sin(c) cos(c) ]
(%i4) MX . MY . MZ;
[ cos(a) cos(b) ] [ cos(a) sin(b) sin(c) - sin(a) cos(c) ] [ (- sin(a) sin(c)) - cos(a) sin(b) cos(c) ]
[ ] [ ] [ ]
(%o4) [ sin(a) cos(b) ] [ sin(a) sin(b) sin(c) + cos(a) cos(c) ] [ cos(a) sin(c) - sin(a) sin(b) cos(c) ]
[ ] [ ] [ ]
[ sin(b) ] [ - cos(b) sin(c) ] [ cos(b) cos(c) ]
(%i5) trigreduce(%);
cos(b + a) cos(b - a)
(%o5) matrix([---------- + ----------,
2 2
cos(c + b + a) cos(c + b - a) cos(c - b + a) cos(c - b - a)
(- --------------) - -------------- + -------------- + --------------
4 4 4 4
sin(c + a) sin(c - a) sin(c + b + a) sin(c + b - a)
- ---------- + ----------, (- --------------) - --------------
2 2 4 4
sin(c - b + a) sin(c - b - a) cos(c + a) cos(c - a)
+ -------------- + -------------- + ---------- - ----------],
4 4 2 2
sin(b + a) sin(b - a) sin(c + b + a) sin(c + b - a) sin(c - b + a)
[---------- - ----------, (- --------------) + -------------- + --------------
2 2 4 4 4
sin(c - b - a) cos(c + a) cos(c - a)
- -------------- + ---------- + ----------,
4 2 2
cos(c + b + a) cos(c + b - a) cos(c - b + a) cos(c - b - a) sin(c + a)
-------------- - -------------- - -------------- + -------------- + ----------
4 4 4 4 2
sin(c - a) sin(c + b) sin(c - b) cos(c + b) cos(c - b)
+ ----------], [sin(b), (- ----------) - ----------, ---------- + ----------])
2 2 2 2 2
(%i6) string(%);
(%o6) matrix(
[
cos(b+a)/2+cos(b-a)/2 ,
(-cos(c+b+a)/4)-cos(c+b-a)/4+cos(c-b+a)/4+cos(c-b-a)/4-sin(c+a)/2+sin(c-a)/2 ,
(-sin(c+b+a)/4)-sin(c+b-a)/4+sin(c-b+a)/4+sin(c-b-a)/4+cos(c+a)/2-cos(c-a)/2
],[
sin(b+a)/2-sin(b-a)/2 ,
(-sin(c+b+a)/4)+sin(c+b-a)/4+sin(c-b+a)/4-sin(c-b-a)/4+cos(c+a)/2+cos(c-a)/2 ,
cos(c+b+a)/4-cos(c+b-a)/4-cos(c-b+a)/4+cos(c-b-a)/4+sin(c+a)/2+sin(c-a)/2
],[
sin(b) ,
(-sin(c+b)/2)-sin(c-b)/2 ,
cos(c+b)/2+cos(c-b)/2
])
Have Fun!