# Coordinate systems for divergence

1. Mar 21, 2009

### jaejoon89

1. The problem statement, all variables and given/known data

Compute the divergence in cylindrical coordinates by transforming the expression for divergence in cartestian coordinates.

2. Relevant equations

F = F_x i + F_y j + F_z k
div F = ∂F_x/∂x + ∂F_y/∂y + ∂F_z/∂z .......... (divergence in cartesian coordinates)

I need to transform this into

divF = (1/rho)(∂(rho*F_rho)/∂rho) + (1/rho)(∂F_theta/∂theta) + ∂F_z/∂z ...... (divergence in cylindrical coordinates)

3. The attempt at a solution

Using the chain rule,
∂F_x/∂x = (∂F_x/∂rho)(∂rho/∂x) + (∂F_x/∂theta)(∂theta/∂x) + (∂F_x/∂z)(∂z/∂x)
∂F_y/∂y = (∂F_y/∂rho)(∂rho/∂y) + (∂F_y/∂theta)(∂theta/∂y) + (∂F_y/∂z)(∂z/∂y)
∂F_z/∂z = (∂F_z/∂rho)(∂rho/∂z) + (∂F_z/∂theta)(∂theta/∂z) + (∂F_z/∂z)(∂z/∂z)

∂rho/∂x = x/∂ = costheta
∂theta/∂x = -y/rho^2 = -sintheta/rho
∂z/∂x = 0
∂rho/∂y = y/∂ = sintheta
etc. (these are the transformational equations)

Then I try inputing this into the cartesian definition for divergence and obtain
divF = [(∂F_x/∂rho)costheta + (∂F_x/∂theta)(-sintheta/rho)] + [(∂F_y/∂rho)sintheta + (∂F_y/∂theta)(costheta/rho)] + ∂F_z/∂z

But how does that simplify to the expression in cylindrical coordinates?