Where does $W_{net} = \Delta K_e + \Delta P_e$ come from? 
I was learning how to derive Bernoulli's equation and saw that he was using the work-energy theorem as $$W_{net} = \Delta K_e + \Delta P_e.$$
What I know is that Work-energy theorem says that,  $W_{net} = \Delta K_e$. How did he come up with the change in potential energy term?
Also, my book uses the same formula while deriving the Bernoulli's equation as Conservation of energy.
Isn't it supposed to be $K_i + U_i = K_f + U_f$?
I am really confused about the formula, how it came up and what's it called.
I found a similar question as mine on this site but I still don't get it.
Question:
Work-energy theorem and Conservation of energy formula
 A: You need to add surnames to just "work."
W-E theorem is
$$W_\text{total}=\Delta K_e$$
For conservative forces
$$W_\text{cons}=-\Delta P_e $$
Consequently, if you combine both formulae, since total work is $W_\text{total}=W_\text{cons}+W_\text{non cons}$, you get
$$ \boxed{\Delta K_e + \Delta P_e = W_\text{non cons} }$$
So, obviously, if there are no non-conservative forces, then $W_\text{non cons}$ will be $0$, and then $\Delta E=0$, so enery will be conserved. That's why they're called conservative forces. If there are only conservative forces, then mechanical energy is conserved.
In summary, your $W_\text{net}$ must be referring to work done by non conservative forces.
A: In mechanics, the work $W$ done is $\int_{r_0}^{r_1} \vec F \cdot d \vec r$ where  $\vec F$ is the net external force and $\vec r$ is the path. The work done is the change in the kinetic energy, $KE$: $W = \Delta KE$.  (For a system of particles, this is for the center of mass.)  A conservative force is one for which the work done is independent of the path. For a conservative force the change in potential energy is defined as the negative of the work done by the force, so $0 = \Delta KE + \Delta PE$, if only a conservative force acts and $\Delta PE$ is the potential energy for that force.  The change in potential energy is just a convenient way to quantify the work done by a conservative force, and it simplifies the evaluation of that work.  For example, for the force of gravity near the earth, regardless of the complicated path taken, the work done is $W = -mg\Delta z = - \Delta PE$ where $z$ is elevation taken positive upwards, and $0 = \Delta KE + mg \Delta z$.  For cases where other than a conservative force act, $W = \Delta KE + \Delta PE$ where W is the work done by the non-conservative forces.
Gravity and the electrostatic force are two examples of conservative forces.
As for the Bernoulli equation, it deals with fluid flow, and the energy balance is more complicated. The $(P_1 - P_2) V$ term is associated with the change in enthalpy for fluid in at position 1 and out at position 2.  You are dealing with an open thermodynamic system in which mass flows in and out of the control volume.  See discussions on the first law of thermodynamics for an open system in a thermodynamics text, such as one by Sontag and Van Wylen.
In the "modified" Bernoulli equation the work done by a "driver" such as pump, and the loss of energy due to friction  "head loss" term are included in addition to the potential energy associated with gravity.  See Is Bernoulli's principle applicable in viscous liquids?, Centrifugal Pump Head, and other Bernoulli-related questions on this exchange.
A: The confusion lies in what the work energy theorem says and what it doesn't say. The work-energy theorem states:
The net work done on an object equals its change in kinetic energy
Note that the work energy theorem does not say that there can be no change in potential energy when the net work is zero. It only requires that net work be done in order for there to be a change in kinetic energy.
To illustrate the point, consider two scenarios of work done on an object in a gravitational field.
Scenario 1:
I lift the object of mass $m$ initially at rest on the ground and bring it to rest at a height $h$ off the ground. I do positive work of $mgh$ and the force of gravity, since its direction is opposite the displacement of the object, does an equal amount of negative work $-mgh$. The net work done on the object is zero. Since the object begins and ends at rest, the change in kinetic energy of the object is obviously zero. The work energy theorem is satisfied.
However, we know that the object now has gravitational potential energy of $mgh$, or more importantly to be correct, the combination of the object and the earth has acquired potential energy of $mgh$, since potential energy is a system property. Objects alone don't possess potential energy. The reason the object-earth system has this energy is because when gravity did negative work it took away the energy I gave the object and stored it as gravitational potential of the earth-object system.
In this example of the theorem, net work was zero due to a conservative force, gravity, doing the negative work. When a conservative force does negative work energy is stored as potential energy. But if a non-conservative force like kinetic (sliding) friction did the negative work, the energy I transferred to the object would have been dissipated as heat.
Scenario 2:
We repeat the beginning of scenario 1 but instead of bringing the object to rest at the height $h$, the object has a vertical upward velocity of $v$ when I bring it to the height $h$. In this instance at the height $h$ the object has kinetic energy of $\frac{mv^2}{2}$ because the positive work I did exceeded the negative work done by gravity, for net work done on the object.
But here's the important difference. The net work done on the object did not alter the increase in gravitational potential energy. It is the same as in scenario 1 when the net work done on the object was zero.
Hope this helps.
A: Those two are essentially the same thing, it all depends on how we define $W$ and that we stay consistent.
For example imagine a ball is dropped from $h$, we can either say $K_i=0,  U_i=0,  W=mgh$, or $K_i=0,  U_i=mgh,  W=0$
The latter states: Ball begins at rest with gravitational potential $mgh$, no work is done on the ball.
The former states: Ball begins at rest, the force of gravity does $mgh$ work on the ball.
Both result in the same dynamics.
