# Thread: Computing Curl of a function?

1. ## Computing Curl of a function?

If r = (x, y, z) and r = norm(r), compute curl [f(r)r], where f is a differentiable function.

I'm confused at what [f(r)r] means. Would I take each partial derivative of r and dot product it with r?

2. Originally Posted by hashshashin715
If r = (x, y, z) and r = norm(r), compute curl [f(r)r], where f is a differentiable function.

I'm confused at what [f(r)r] means. Would I take each partial derivative of r and dot product it with r?
The Key Idea is that $f(r)=f(\sqrt{x^2+y^2+z^2})$ is a scalar and $\mathbf{r}$ is a vector.

This gives in Cartesian coordinates

$f(\sqrt{x^2+y^2+z^2})\left( x\mathbf{i}+y\mathbf{j}+z\mathbf{k}\right)= xf(\sqrt{x^2+y^2+z^2})\mathbf{i}+yf(\sqrt{x^2+y^2+ z^2})\mathbf{j}+zf(\sqrt{x^2+y^2+z^2}) \mathbf{k}$

Now we just need to take the curl so we get

$\begin{bmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\\frac{\partial }{\partial x} & \frac{\partial }{\partial y} & \frac{\partial }{\partial z} \\xf(\sqrt{x^2+y^2+z^2}) & yf(\sqrt{x^2+y^2+z^2}) & zf(\sqrt{x^2+y^2+z^2}) \\ \end{bmatrix}$

Note that this is using first principles there are product rules for the divergence, gradient, curl ect.
http://en.wikipedia.org/wiki/Vector_...ifferentiation

But you should know how to work them this way as well.