Problem with plotting spherical harmonics [closed]

I am new to Mathematica, trying to plotting spherical harmonics of a wave functon. I want to plot ${}Y^0_3$. So I typed

SphericalPlot3D[5 Cos^3[θ] - 3 Cos[θ], {θ, 0, Pi}, {φ, 0, 2 Pi}]


It gives me an empty plot like this:

When I copy the same equation

(5 Cos^3[θ] - 3 Cos[θ], {θ, 0, Pi}, {φ, 0, 2 Pi})


into Wolfram|Alpha, it gives me a 3d plot looks like "waves"(sorry, I couldn't put the picture because my reputaion is less than 10)

My main question is What's wrong with my input in Mathematica?

closed as off-topic by Szabolcs, MarcoB, corey979, happy fish, ArtesMar 27 '17 at 14:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Szabolcs, MarcoB, corey979, happy fish
If this question can be reworded to fit the rules in the help center, please edit the question.

• I think the constant in the front of the equation is not important for spatial plot. So I didn't write it. – Chao Song Mar 26 '17 at 13:01
• Possible duplicate of problem with coloring spherical harmonics – Artes Mar 27 '17 at 14:28

What is wrong is that Cos^3 is not a function. The following works:
SphericalPlot3D[5 Cos[theta]^3 - 3 Cos[theta], {theta, 0, Pi}, {phi, 0, 2 Pi}]

To debug your issue, you could have tried to plot 5 Cos^3[theta] - 3 Cos[theta] for example and see that it gives an empty plot. Then plot 3 Cos[theta], etc. until you understand what's wrong.
• I try it with ${}Y^1_3$ SphericalPlot3D[ E^(I$\phi$) Sin[$\theta$]] (5 Cos[$\theta$]^2 - 1), {$\theta$, 0, Pi}, {$\phi$, 0, 2 Pi}] It still empty. What's wrong? – Chao Song Mar 26 '17 at 14:08
• E^(I*phi) is complex-valued. What output would you expect? – anderstood Mar 26 '17 at 14:18