Power of water pump Consider a water pump pushing water through a pipe:

We wish to find the energy which the water pump has to expend to keep the water flowing through the pipe. Writing Newton's second law for water flowing out of a cylindrical cross section of it,
$$ F= v \frac{dm}{dt}$$
Now, $$ P = F \cdot v$$
$$ P= v \frac{dm}{dt} v$$
$$ \frac{dm}{dt} = \rho A v$$
$$ P= v^3 \rho A $$
Now the real answer has a factor of half, where in this derivation have I gone wrong?
 A: The reason different answers disagree is that your question is underspecified. You need to say more about how the water moves.
Scenario 1: steady state flow
Suppose you had a long pipe with water flowing at a constant speed $v$. How much energy is required to keep the water flowing at that speed? Of course, in the absence of viscous or turbulent losses (which I will neglect throughout this answer), the answer is just zero, just like how it takes zero energy to keep a block sliding at constant speed on a frictionless surface.
So to get a nontrivial answer, you need to specify how new water is brought from rest to speed $v$. That is, you need to think about how water enters the pipe.
Scenario 2: conservative flow
Suppose we stick the end of the pipe in a container full of water. We either run a pump to get the water to go through the pipe at the desired speed, or if the water container is high enough, we can just use the preexisting hydrostatic pressure. We will need to spend energy to get water to flow through the pipe, either as electrical energy in the pump or gravitational potential energy in the water in the container. For concreteness, let's say the pipe is attached near the top of the container, so the energy just comes from a pump.
If there are no viscous or turbulent losses, then the power that you need to input is equal to the rate of change of kinetic energy of the water,
$$P = \frac{dK}{dt} = \frac12 \frac{dm}{dt} v^2 = \frac12 \rho A v^3.$$
This is the result given by several of the other answers.
Why doesn't your argument work?
It's somewhat subtle. First, as the other answers have said, if you put a pump at the entrance to the pipe, then it speeds up the water as it passes through. Therefore, you can't use the equation
$$P_{\mathrm{pump}} = F_{\mathrm{pump}} v$$
because the speed of the water is actually continuously increasing from zero to $v$. However, this isn't a complete answer, because you could also place the water pump in the middle of the pipe, where the water is already flowing with a uniform speed $v$. In that case, assuming an ideal pump, your equation $P_{\mathrm{pump}} = F_{\mathrm{pump}} v$ is perfectly correct.
Here the problem is actually your first equation, which implicitly assumes that the pump's force is the only external force in the system. Think about the entrance to the pipe. The water outside it is moving at almost zero speed, while the water inside is moving at substantial speed. Thus, by Bernoulli's principle, the pressure is higher outside the pump, and this pressure difference provides an additional force that helps accelerate the water. In fact, for certain idealized geometries, it is actually exactly equal to $F_{\mathrm{pump}}$, which implies that $F_{\mathrm{pump}}$ is only half the net force. Inserting this factor of $2$ recovers the correct answer.
This factor of $2$ is a well-known effect in plumbing (i.e. applied fluid dynamics), which leads to the phenomenon of vena contracta. It generally isn't mentioned in introductory physics, because it's somewhat subtle, but the pioneers of fluid dynamics always accounted for it, as otherwise all their results would be totally wrong.
Scenario 3: inherently inelastic process
There are also situations where something like your answer is correct. For example, suppose you had a very long circular trough, through which water runs at speed $v$. Now suppose that rain falls onto the trough, increasing the water mass at rate $dm/dt$, while a pump inside the water keeps it going at constant speed. Then your derivation would be correct, because there are no important external forces besides the pump's, so
$$P = \frac{dm}{dt} \, v^2$$
with no factor of $1/2$. On the other hand, by energy conservation we have
$$P = \frac12 \frac{dm}{dt} \, v^2 + \frac{dE_{\mathrm{int}}}{dt}$$
where $E_{\mathrm{int}}$ is the internal energy of the water. These two expressions are compatible if
$$\frac{d E_{\mathrm{int}}}{dt} = \frac12 \frac{dm}{dt} \, v^2.$$
But didn't I say earlier that we were ignoring all viscous and turbulent losses? Well, in this case, you can't. If there was no viscosity or turbulence, then the rain water would just sit still on top of the flowing water, and the pump would require no power at all. Some kind of dissipation is required to get the rain up to speed $v$. Since this is essentially an inelastic collision, it dissipates energy, making the pump power twice as big as the naive result. This is another famous factor of $2$ (unrelated to the previous one) which does show up regularly on tricky high school physics problems.
A: The force applied on an infinitesimal element of mass $\mathrm d m$ by the pump will be
$$\mathrm dF=\mathrm d m \: a =\mathrm dm \frac{\mathrm dv}{\mathrm dt}$$
Now, you can switch $\mathrm dm$ and $\mathrm dv$ to obtain
$$\mathrm dF=\mathrm dv \frac{\mathrm dm}{\mathrm dt}$$
Here $\mathrm dm/\mathrm dt$ is $\rho A v_0$ where $v_0$ is the final velocity with which the water exits, and is thus a constant. So the force expression will be
$$\mathrm dF=\rho A v_0 \:\mathrm dv$$
Now, power applied to the infinitesimal element at any instant will be
$$\mathrm dP=\mathrm dF \: v$$
where $v$ is the velocity of the element at that instant. So upon integrating, you get
$$\int \mathrm dP=\rho A v_0 \int_0^{v_0}v\:\mathrm dv$$
Thus you get
$$\boxed{P=\frac 1 2 \rho A v_0^3}$$
A: The question seeks to evaluate the pump power for a very special case: steady flow in a horizontal pipe with no friction losses where the entrance velocity is small, and where all the pump work goes into creating a constant pressure difference regardless of the flow rate.  The pump power for this special case is not the pump power for a flow network in general, especially considering the change in pump power with flow rate behavior for the commonly used centrifugal pump. Therefore, I provide a general discussion of "flow work" and the application of the Bernoulli equation. Then, at the end of this response I will use the general results to address this special case and reach the same conclusion as other responders to this question; specifically, to explain the ${1 \over 2}$ in the pump power. I include the rather lengthy general discussion to emphasize that the result for the pump power for the special case is not valid in general.
At a position in the pipe where the cross sectional area is $A$ and the fluid velocity is $V$, the rate of energy flow per unit mass is $e_f \dot m_f$ where $e_f$ (J/kg) is the energy per unit mass of the flowing mass $m_f$ (kg), and $\dot m_f$ (kg/sec) is the rate at which mass flows past the cross sectional area $A$. As shown in the figure below, $\dot m_f$ equals $\rho AV$ where $\rho$ is density; $A$ and $V$ can be functions of position. $e_f = h + {V^2 \over 2} + zg$ (J/kg) where $h$ is the enthalpy per unit mass, $V$ the velocity, $z$ the elevation, and $g$ the acceleration of gravity.
There is "flow work" associated with pushing mass across a boundary. The enthalpy per unit mass is defined as $h = u + p/\rho$ where $u$ is the internal energy per unit mass and $p$ is pressure. The $p/\rho$ term is sometimes called "flow work" since it is the work per unit mass done at the boundary by the fluid following $\Delta m_f$ to push $\Delta m_f$ through the distance $V\Delta t$.
For details see a good book on basic thermodynamics, such as Thermodynamics by Obert, where the first law of thermodynamics is developed for an open system, defined as one where mass can enter and leave the system.

It is important to understand the previous discussion is for mass flowing across a fixed boundary. In most applications, we are concerned with the change in energy of a system (an open thermodynamic system), defined as a region between boundaries through which mass can flow. Consider a system with a boundary 1 where mass enters and a boundary 2 where mass exits.  The "flow work" per unit mass done by the surroundings on the system due to fluid in the surroundings pushing mass into the system at boundary 1 is $p_1/\rho_1$. The "flow work" per unit mass done by the system on the surroundings due to fluid in the system pushing mass into the surroundings as boundary 2 is $p_2/\rho_2$.  The energy per unit mass entering the system at boundary 1 is $e_{f_\enspace 1}$ and the energy per unit mass exiting the system at boundary 2 is $e_{f_\enspace 2}$.
The power from the pump is the rate of work done by the pump on a system.  The pump power depends on both the pump head characteristics, and the system head for the flow elements (piping and fittings) that the pump supplies.  The pump head can depend on the flow rate and the flow rate depends on the system head.  Assuming steady state flow for an incompressible liquid, the first law of thermodynamics for a steady flow system can be expressed using the Bernoulli equation. Head has units of distance (meters) and is simply each term in the Bernoulli equation expressed in meters.
Consider the pumping system shown in the figure below using a centrifugal pump.  The pump operates at an operating point determined by where the pump head curve intersects the system head curve.  For a centrifugal pump, pump head $h_{pump}$ decreases with volumetric flow rate $Q$ (cubic meters per sec) and the system head increases with $Q$ due to friction losses in the flow network.  The work per unit mass $W_{mass}$ (J/kg) done by the pump equals $gh_{pump}$ and $h_{pump} = h_{system}$ where $g$ is the acceleration of gravity, $h_{pump}$ is the pump head at the operating point and $h_{system}$ is the system head at the operating point. The power from the pump is $P_{pump} = \rho Qgh_{pump} = \rho Qgh_{system}$ (J/sec) where $\rho$ is the liquid density.  So to evaluate the pump power the operating point is required and that depends on the pump characteristics and the flow system that the pump supplies.  The "brake" power is the power supplied to the pump by the driver (for example, a motor or a turbine) and is equal to the pump power divided by the efficiency of the pump.  For more details, see the Pump Handbook, edited by Karassik et al.

Now consider the special case of a system defined as steady flow in a horizontal pipe with no friction losses where the entrance velocity is small.  To avoid issues with the performance of a real pump, the "pump" here is a head of liquid in a large tank with the pipe at the bottom of the tank.  This example is based on the response by @knzhou to this question. 1 is bottom of the tank and 2 is the end of the pipe.

The Bernoulli equation for the system is ${p_1 \over \rho} + {V_1^2 \over 2} = {p_2 \over \rho} + {V_2^2 \over 2}$. For negligible velocity $V_1$ we have ${(p_1 - p_2) \over \rho} = {V_2^2 \over {2}}$ (J/kg).  The mass flow rate is $\rho AV_2$ (kg/sec) so the power is ${V_2^2 \over {2}} \rho AV_2 = {1 \over 2} \rho A V_2^3$  (J/sec or Watts) due to the pressure difference $p_1 - p_2$. This pressure difference is created by the head of liquid. This is the same approach used by other responders to this question.  As previously discussed, this is the power for this special case, and is not in general the pump power for a flow network.
The power can also be evaluated considering the "flow work". The net flow work per unit mass done on the fluid in the pipe (flow in minus flow out) is ${(p_1 - p_2) \over \rho}$ (J/kg), and as previously shown, for the special case under consideration, this results in the pump power being ${1 \over 2} \rho A V_2^3$.
A: The power is the rate you need to add energy. In each time interval $\Delta t$, you have to accelerate a new slug of water $\Delta m$ from zero up to speed $v$, which requires energy $\Delta E=\frac{1}{2}\Delta m v^2$. Now, $\Delta m=\rho A v \Delta t$, so $$\frac{\Delta E}{\Delta t}=\frac{1}{2}\rho A v^3.$$
As to where in your derivation you went wrong, it is a misapplication of $P=F\cdot v$. This expression is valid if $v$ is constant during the period when $F$ is applied.  That is not the case here: $F$ accelerates the differential mass of water $dm$ from 0 to $v$; its average speed during this process is $v/2$.
A: The engineer takes the easy way out, as follows.
To check your work, remember that power is the product of an effort variable (pressure in this case) and a flow variable (mass flow rate in this case), taking care to keep the units consistent. If you know the source pressure acting on the flowing mass, you then know the power.
So, as Darth Vader could have said but didn't, never underestimate the power of the force times distance divided by time. You have to do it that way in order to make the units come out right.
A: I can drop a similar problem also. For that reason, I love calculus.
Problem from elementary classes (with no calculus... When a student isn’t taught calculus and vectors). Force for spring is $$F=-kx$$ so what's the work of the spring? $$W=-Fx$$ $$=kx^2$$
Where's the $2$ factor? But if you had written $$W=\int \vec F\cdot \mathrm d(-\vec x)$$
Than you can get expected result.

Let's start with Newton's second law. $$\vec F=\frac{d\vec p}{dt}$$
$$=m\vec a+\vec v \frac{dm}{dt}$$
$$m=\rho Ax_0$$ so $$\frac{dm}{dt}=\rho Av_0$$
$$P=\int\frac{dW}{dt}=\int \vec F\cdot d\vec v$$
$$=\int_0^{v_0} [m\frac{d\vec v}{dt}+\vec v \frac{dm}{dt}] \cdot \mathrm d\vec v$$
$dm/dt$ is independent of $v$ so you can consider it as constant. Even you might ask why there's an extra term? The extra is valid if water isn’t flowing with constant velocity.
