There are two different conventions.
1) The mathematics convention where the azimuth, the angle between the x-axis and the radius in the x-y plane, is called \theta and the zenith, the angle between the z axis and the radius is called \phi
2)The physics convention where the azimuth, the angle between the x-axis and the radius in the x-y plane, is called \phi and the zenith, the angle between the z axis and the radius is called \theta
Read this carefully, draw a picture perhaps so that you fully understand the difference.
The definition in your book has \theta as the zenith. Where as seeing as maple gives 0, has \phi as the zenith. Do you understand why maple gets zero and you get a non-zero value now?
Write down the definition of the gradient in spherical coordinates (on the forum) and label each term with, radius, zenith, azimuth. Since you want to find the \phi term you will need to use which term in the definition of the gradient given the convention used in the book? Since maple uses the other convention which term did maple use?
And no you can't just apply spherical coordinates straight after taking the Cartesian gradient.