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.
