# Partial Derivative

## Main Question or Discussion Point

I have the equation

$\frac{d\rho}{dt}$=-$\nabla$$\cdot$$\rho v$

where the vector v depends only x and t.

I want to take the partial derivative of this whole equation with respect to t.

Just not sure how to take the partial of the divergence. Thanks!

SteamKing
Staff Emeritus
Homework Helper
Why don't you write out the equivalent equation, replacing the del operator with the partial derivatives incorporated in its meaning?

$\frac{\partial}{\partial t} \left(\nabla\cdot\rho v\right)$

v a vector again x component only

$\frac{\partial\rho}{\partial t}$$\cdot v$+$\rho$$\frac{dv}{dx}$

knowing rho is with respect to time and v with x.

Yay or nay?

HallsofIvy
Well, that's not the same problem now! In your first post you stated that v was a function of both x and t and did not say anything about $\rho$. Assuming the most general case, that both v and $\rho$ are functions of both x and t, and writing v= f(x,t)i+ g(x,t)j+ h(x,t)k then we have $\rho v= \rho(x,t)f(x,t)i+ \rho(x,t)g(x,t)j+ \rho(x,t)h(x,t)k$ and
$$\nabla\cdot \rho v= \frac{\partial \rho f}{\partial x}+ \frac{\partial\rho g}{\partial y}+ \frac{\partial \rho h}{\partial z}$$
$$= \frac{\partial\rho}{\partial x}f+ \rho \frac{\partial f}{\partial x}+ \frac{\partial\rho}{\partial y}g+ \rho \frac{\partial g}{\partial y}+ \frac{\partial\rho}{\partial z}h+ \rho\frac{\partial h}{\partial z}$$
$$= \nabla\rho\cdot v+ \rho \nabla\cdot v$$