# taylor expansion in cylindrical coordinates

If I have a function Y($r$,$\theta$) in cylindrical polar coordinate system, then how do I Taylor expand this function around some point ($r_0$,$\theta_0$)? I want the exact formula for Taylor expansion about a point in cylindrical polar coordinates. Also, how do I expand this function if this was a function in spherical polar coordinates?

The Taylor expansion of a scalar function $$f(\vec{x})$$ around $$\vec{x_0}$$ can be written as: $$f(\vec{x})=f(\vec{x_0}) +(\nabla f)(x_o) \cdot (\vec{x}-\vec{x_0}) + \frac{(\vec{x}-\vec{x_0})^T(Hf(\vec{x_0}))(\vec{x}-\vec{x_0})}{2!}\ +...$$

Where:

• $$f(\vec{x_0})$$ is the value of the function at $$\vec{x_0}$$
• $$(\nabla f)(x_o)$$ is the gradient of the function evaluated at $$\vec{x_0}$$
• H denotes the Hessian matrix.

I will assume you only need the linear term. So, all you need is to calculate the gradient of your function and evaluate it at $$\vec{x_0}$$. For doing so you can use this formula:

$$\nabla f(\rho,\theta, z)= \frac{\partial}{\partial \rho}f(\rho,\theta, z) \hat{\rho}+\frac{1}{\rho}\frac{\partial}{\partial \phi}f(\rho,\theta, z) \hat{\phi}+\frac{\partial}{\partial z}f(\rho,\theta, z) \hat{z}$$

You can find the gradient in several coordinate systems here.

If you need to calculate the quadratic term, you'll need the Hessian matrix that is a little harder to compute.

• I would need the Hessian. I assume that the terms in the Hessian would be products of the terms appearing in the gradient? – Abhijit Jul 29 '15 at 5:12

The taylor expansion in cylindrical coordinates is similar to the Taylor expansion in cartesian coordinates: $Y(r, \phi) = Y(r_0, \phi_0) + (\frac{\partial}{\partial r}Y)(r_0, \phi_0)(r-r_0) + (\frac{\partial}{\partial \phi}Y)(r_0, \phi_0)(\phi-\phi_0) + \frac{1}{2!}(\frac{\partial^2}{\partial r^2}Y)(r_0, \phi_0)(r-r_0)^2 + ...$

And Taylor expansion in spherical coordinates is also very similar.

• @kyromaxim I don't think that your expression is correct, because it does not take account of the direction in which we wish to Taylor expand the function. There should be a cos($\theta$) term somewhere there I think. – Abhijit Feb 4 '15 at 13:51
• When deriving above Taylor expansion partially either by $r$ or $\phi$ and then substituting the point $(r_0, \phi_0)$ would be true. However, one has to be more carefully dealing with differential operators like rot,grad,div. – kryomaxim Feb 4 '15 at 13:57
• @kyromaxim So could you please tell me how to deal with the grad operator, for example. – Abhijit Feb 4 '15 at 14:09
• Here, the gradient is described: link. It is also possible to make a taylor expansion in terms of the gradient, but will lead to the same result as above. – kryomaxim Feb 4 '15 at 14:11
• This is a different coordinate system and has scale factors which do not appear in Cartesian coordinates. If you can explain why your answer is better than the other answer -- noting why your expression doesn't have those scale factors, I'd upvote this. – jvriesem Sep 28 '16 at 23:35