# "First, recall the definition of the gradient of a scalar function:" #
# \qquad \qquad \qquad \qquad \qquad \quad nabla( f(x,y) ) \ = \ {del f} / {del x} \hat{ i } + {del f} / {del y} \hat{ j } \quad. #
# "We are given the function:" #
# \qquad \qquad \qquad \qquad \qquad \quad f(x,y) \ = \ cos( x y ) - 3 y^4 + 3 \quad. #
# "We will need to compute" \ \ {del f} / {del x}, \ "and" \ {del f} / {del y}, \ "before finishing." #
# "So let's do that beforehand:" #
# "1)" \quad {del f} / {del x} \ = \ {del} / {del x} ( cos( x y ) - 3 y^4 + 3 ) #
# \qquad \qquad \qquad \quad = \ {del} / {del x} [ cos( x y ) ] - {del} / {del x} [ 3 y^4 ] + {del} / {del x} [ 3 ] #
# = \ - sin( x y ) {del} / {del x} [ x y ] - 0 + 0 \qquad \qquad \qquad "we regard y as a constant" #
# = \ - sin( x y ) \cdot y \qquad \qquad \qquad \qquad \qquad \quad \ "again, we regard y as a constant" #
# = \ - y sin( x y ). #
# "So:" #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad {del f} / {del x} \ = \ - y sin( x y ). \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ (1) #
# "And for" \ {del f} / {del y} ":" #
# "2)" \quad {del f} / {del y} \ = \ {del} / {del y} ( cos( x y ) - 3 y^4 + 3 ) #
# \qquad \qquad \qquad \quad = \ {del} / {del y} [ cos( x y ) ] - {del} / {del y} [ 3 y^4 ] + {del} / {del y} [ 3 ] #
# \qquad \qquad \qquad \quad = \ - sin( x y ) {del} / {del y} [ x y ] - 3 [ 4 y^3 ] + 0 #
# = \ - sin( x y ) \cdot x - 12 y^3 \qquad \qquad \qquad \qquad \qquad \ "we regard x as a constant" #
# = \ - x sin( x y ) - 12 y^3. #
# "So:" #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad {del f} / {del y} \ = \ - x sin( x y ) - 12 y^3. \qquad \qquad \qquad \qquad \qquad (2) #
# "Putting the results in (1) and (2) together, we get" \ nabla( f(x,y) ) ":" #
# \qquad \qquad \quad nabla( f(x,y) ) \ = \ {del f} / {del x} \hat{ i } + {del f} / {del y} \hat{ j } #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad = \ [ - y sin( x y ) ] \hat{ i } + [ - x sin( x y ) - 12 y^3 ] \hat{ j } #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad = \ - ( y sin( x y ) \hat{ i } + [ x sin( x y ) + 12 y^3 ] \hat{ j } ) \quad. #
# "Thus:" #
# \qquad \quad \ nabla( f(x,y) ) \ = \ - ( y sin( x y ) \hat{ i } + [ x sin( x y ) + 12 y^3 ] \hat{ j } ) \quad. #
# "We want the value of this at the point" \ \ ( 1, \pi/2 ). \ "So:" #
# nabla( f(x,y) ) |_{ ( 1, \pi/2 ) } #
# \qquad \qquad \ = \ - ( \pi/2 sin( 1 \cdot \pi/2 ) \hat{ i } + [ 1 \cdot sin( 1 \cdot \pi/2 ) + 12 ( \pi/2 )^3 ] \hat{ j } ) #
# \qquad \qquad \ = \ - ( \pi/2 sin( \pi/2 ) \hat{ i } + [ sin( \pi/2 ) + 12 ( \pi/2 )^3 ] \hat{ j } ) #
# \qquad \qquad \ = \ - ( [ \pi/2 \cdot 1 ] \hat{ i } + [ 1 + ( 4 cdot 3 ) ( \pi^3/2^3 ) ] \hat{ j } ) #
# \qquad \qquad \ = \ - ( \pi/2 \hat{ i } + [ 1 + 3 ( \pi^3/2^1 ) ] \hat{ j } ) #
# \qquad \qquad \ = \ - ( \pi/2 \hat{ i } + [ 1 + { 3 \pi^3 }/2 ] \hat{ j } ) #
# \qquad \qquad \ = \ - 1/2 ( \pi \hat{ i } + [ 2 + 3 \pi^3 ] \hat{ j } ) \quad. #
# "Thus:" #
# \qquad \qquad \qquad nabla( f(x,y) ) |_{ ( 1, \pi/2 ) } \ = \ - 1/2 ( \pi \hat{ i } + [ 2 + 3 \pi^3 ] \hat{ j } ) \quad. #
# "This is our answer." #