# How to draw nested functions in TikZ?

I'm trying to draw a frequency modulated sinusoidal in a polar domain with the following code.

\documentclass[tikz,border=10]{standalone}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}

\def\amp{1.0}
\def\n{11}
\def\myphi{90}

\draw [domain=0:6.29,samples=500,smooth] plot (xy polar cs:angle=\x r,

\end{tikzpicture}

\end{document}

When I compile this, however, the inner sinusoidal is completely ignored. In other words, tikz seems to read the following line instead.

Why does this happen, and how do I get the intended result?

Edit: Frequency modulation is a mathematical operation which modifies the argument of a function. In my example, the argument of the cosine function is modified by a sine function. As explained, this inner sine function is, for some reason, ignored when I compile the code. I'm curious about why, and I wish to know how I can draw a function where nothing is ignored.

Visualized by Wolfram Alpha, the first image shows the intended function, and the second image shows the function LaTeX compiles. They are not the same.

Edit2: I have shortened and changed the example. It should now be easier to read the function in the code above. Hopefully I didn't remove anything essential.

-
All users are not familiar with frequency modulated sinusoidal graph. What do produce your code? Please give us an example. –  ferahfeza Apr 2 '14 at 22:04
Consider using PGFPlots for doing polar plots: tex.stackexchange.com/questions/146671/… –  juliohm Apr 2 '14 at 22:12
I included the two images of the two figures you linked to. They seem identical to me and identical to the function I get running your MWE (just missing the axis). –  Peter Grill Apr 2 '14 at 23:29
@Peter, by removing the Wolfram Alpha (WA) links, you also removed the expressions as shown in WA, which should indeed make it clearer that they are not the same. –  eiterorm Apr 2 '14 at 23:35
Have added the links back. Sorry about that. It was difficult for me to see the difference without having them on the same page, and including the images here seems to show that they are same graph. –  Peter Grill Apr 2 '14 at 23:36