# How to plot a function $\Psi (r, \theta, 0)$ and its **rot** in polar coordinates? [closed]

The function is:

$$\boldsymbol{\Psi}(\rho, \theta, 0)=-\left(2+\frac{8}{\rho}\right) \operatorname{Sin} \theta \boldsymbol{e}_{\boldsymbol{\theta}}+\left(2 \rho-\frac{8}{\rho}\right) \operatorname{Cos} \theta \boldsymbol{e}_{\boldsymbol{\rho}}$$

with $$r \in [2,6]$$, $$\theta \in [0,2\pi]$$.

How could I graph this vector function and its curl in mathematica? is it mandatory to convert it to Cartesian coordinates?

• In Italian language seno(=sinus), shortened as 'sen', is it what is Sen stands for here? Nov 11, 2021 at 7:57
• @yarchik Oh I'm sorry! yes I mean sin Nov 11, 2021 at 8:04
• As a started, try this r[x_, y_] := Sqrt[x^2 + y^2] VectorPlot[{(2 r[x, y] - 8/r[x, y]) x/r[x, y], -(2 + 8/r[x, y]) y/r[x, y]}, {x, -1, 1}, {y, -1, 1}, StreamPoints -> 10] Nov 11, 2021 at 8:04
• @yarchik I think you missed the transformation of  e[Rho], e[Theta]? Nov 11, 2021 at 8:31
• @UlrichNeumann yes, I missed a lot of things, like curl, region boundaries, transformations. But the poster missed a lot of things too, like typing the equation in Mathematica format, showing some minimal efforts. Nov 11, 2021 at 8:38

Based on @yarchik's comment try

\[Psi] = -(2 + 8/\[Rho]) Sin[\[Theta]] e\[Theta] +(2 \[Rho] - 8/\[Rho]) Cos[\[Theta]] e\[Rho]


Transformation polar->cartesian

trafo = {e\[Rho] -> {Cos[\[Theta]], Sin[\[Theta]]},
e\[Theta] -> {-Sin[\[Theta]], Cos[\[Theta]]  },
\[Rho] -> Sqrt[x^2 + y^2], \[Theta] -> ArcTan[x, y]}

VectorPlot[Evaluate[\[Psi] //. trafo], {x, -1,1}, {y, -1, 1}, StreamPoints -> 10] The curl evaluates to

rot\[Psi] = Curl[Evaluate[\[Psi] //.trafo], {x, y }] // Simplify
Plot3D[rot\[Psi], {x, -1, 1}, {y, -1,1},MeshFunctions -> {#3 &}] • Thank you! I had a lot of trouble with the Mathematica commands as I'm still a newbie but this cleared up a lot for me and I'm sorry to inconvenience anyone Nov 11, 2021 at 8:52
• You're welcome. Mathematica stackexchange is a helpful place to deepen Mathematica knowledge. Nov 11, 2021 at 9:14