(%i5) f( x, y, z) : = x *( sin( y)) ^ 2 + z *( cos( y)) ^ 2 $
define( fx( x, y, z), diff( f( x, y, z), x)) ;
define( fy( x, y, z), diff( f( x, y, z), y)) ;
define( fz( x, y, z), diff( f( x, y, z), z)) ;
define( nabla( x, y, z),[ fx( x, y, z), fy( x, y, z), fz( x, y, z)]) ;
(%o2) fx ( x , y , z ) := sin ( y ) 2 (%o3) fy ( x , y , z ) := 2 x cos ( y ) sin ( y ) 2 cos ( y ) sin ( y ) z (%o4) fz ( x , y , z ) := cos ( y ) 2 (%o5) nabla ( x , y , z ) := [ sin ( y ) 2 , 2 x cos ( y ) sin ( y ) 2 cos ( y ) sin ( y ) z , cos ( y ) 2 ]
(%i6) trigreduce( %) ;
(%o6) nabla ( x , y , z ) := [ 1 cos ( 2 y ) 2 , x sin ( 2 y ) sin ( 2 y ) z , cos ( 2 y ) + 1 2 ]

Created with wxMaxima.