To derive Euler's equation of inviscid fluid flow of a fluid element one needs to use the equation $$- \nabla P+ \rho \overrightarrow{g} = \overrightarrow{F} \tag{1} $$ where $ \nabla P $is the pressure gradient, $ \rho $ is the density of the fliud, $\overrightarrow{F}$ is the net force on the fluid, and then use the convective derivative $\dfrac{D}{Dt}$ to obtain the formula $$\rho \dfrac{D \overrightarrow{v}}{Dt}=- \nabla P+ \rho \overrightarrow{g} \tag{2} $$ where $\overrightarrow{v}$ is velocity vector field of the fluid.
I know how to arrive at (2) if I start from (1), which the book I am using now names Euler's equation of inviscid flow, but I have really forgotten how to derive (1).
**My attempt**
The scanty memory that I have tells me that I must assume that the fluid is at rest and hence consider that the only forces exerted on the fluid are pressure and gravitational pull and that the force due to pressure is given by $$ \nabla P dxdydz $$ and the force due to possible outward acceleration $\overrightarrow{a}$ is $$\overrightarrow{F} $$ so that the total outward force is $$ \nabla P dxdydz + \overrightarrow{F} $$
And by newton III, that is $F_{AB}=-F_{BA}$ , I think that this force is reacted back by the weight of the liquid $ g dm = g \rho dxdydz$ where $dm$ is elemental mass in the fluid and hence I can write $$ \nabla P dxdydz + \overrightarrow{F} = - g \rho dxdydz \overrightarrow{ k }$$
So my main confusion is about how the $dxdydz$ disappear for me to arrive at (1).
It is making me think that maybe I should put $\overrightarrow{F}=dm \overrightarrow{a} = \rho \overrightarrow{a} dxdydz= \overrightarrow{f} dxdydz$ where $\overrightarrow{f}=\rho \overrightarrow{a}$, so that i obtain
$$ \nabla P dxdydz + \overrightarrow{f} dxdydz = - g \rho dxdydz \overrightarrow{ k }$$
and then I can put $ \overrightarrow{g} = \langle 0,0,-g \rangle=- g \overrightarrow{ k } $ and hence obtain $$ - \nabla P+ \rho \overrightarrow{g} = \overrightarrow{f} \tag{3} $$
Guys please tell me if I am in the right direction.