When I have a pipe (1) that branched into 2 pipes (2 and 3). I noticed that Bernoulli's equation can be applied between point 1 and 2 or 1 and 3. So my question is how is this valid? Isn't Bernoulli just an energy balance so the energy at point 1 in the the original pipe should be equal to the sum of energies at point 2 and 3? I tried starting with this equation and dividing by the mass flow rate at each point (taking into consideration the continuity equation) and ended up with this $$\dot{m_2}e_1+\dot{m_3}e_1 = \dot{m_2}e_2+\dot{m_3}e_3 $$where e is the energy per mass passing in the pipe per second. But this doesn't strictly imply that $e_1 = e_2$ or $e_1 = e_3$.
Also can Bernoulli's equation be applied on points 2 and 3 (between the 2 branched pipes)?