Does continuity equation hold if the flow is accelerated? I'm Studying the streamline flow, specifically the continuity equation  Bernoulli's Principle.
Consider the following system where a liquid flows through the pipe of a uniform area of cross section A, from high pressure P2 to low pressure P1, both of which are maintained.
<--------length = r----------->
_______________________________
P2                           P1
_______________________________
           flow ->

Based on the assumptions that 


*

*Difference in pressure is what causes the liquid to flow $P_2 > P_1$

*The continuity equation $A_1v_1 = A_2v_2$ holds

*The Bernoulli's Principle holds


Then my analysis is as follows
The Bernoulli's equation gives
$$ P_2 + \frac{1}{2}\rho v_2^2 = P_1 + \frac{1}{2} \rho v_1^2$$
Therefore, the speed of liquid element will be more at $P_1$ and less at $P_2$ since $P_2 > P_1$
But then 
$$A_1v_1 = A_2v_2$$
and since the Area of cross section is uniform, the velocities must be same, which is contradicting the result from Bernoulli's equation!
There is something wrong with my analysis or assumptions, but I can't figure out what it is
 A: In the form you've stated it ($A_1 v_1 = A_2 v_2$), the continuity equation is only holds for incompressible fluids.  So what you've found is that the type of accelerated flow you're describing cannot happen for an incompressible fluid in a pipe of uniform cross-section.  The more general form for the continuity equation is based on conservation of mass (i.e., mass per time entering = mass per time exiting), and states
$$
Q_m = \rho_1 A_1 v_1 = \rho_2 A_2 v_2,
$$
where $Q_m$ is the mass flow rate (i.e., mass per time). This means that if the fluid increases in velocity, it must decrease in density.  
An analogy here would be cars on a highway.  Suppose you have a highway that leads from the center of a small town out into the country.  Suppose further that the drivers are all perfectly safe drivers and obey the two-second rule, i.e., the cars pass a given point in the highway at a rate of one car every two seconds.  If the speed limit in the town is low, then the cars will be more closely spaced, since two seconds corresponds to less distance.  Thus, the density of cars is higher at this point.  When the cars get out of town and the speed limit increases, the cars get further apart in distance (since two seconds now corresponds to a longer distance), and so the density decreases.
Bernoulli's equation, meanwhile, doesn't hold so simple a form for compressible fluids.  Rather, you have to define a pressure potential $w(P)$ from the equation of state $\rho(P)$:
$$
\frac{1}{2} v^2 + gy + w(P) = \mathrm{const.},
$$
where
$$
w(P) = \int \frac{\mathrm dP}{\rho(P)}.
$$
For the case of an "incompressible" fluid, $\rho(P) = \rho$ is a constant, $w(P) = P/\rho$, and the familiar form of Bernoulli's Law is recovered.  But for a compressible fluid, the equation may look quite different.
A: 
The question is very good but the assumption you have made is wrong!
I agree that the water is moving because of the pressure difference between water and air
As I have shown point $P_1$ and $P_2$ in the diagram.
Now the water moves because of pressure difference between this $P_1$ and  $P_2$ so as the water reaches the end of the tube(according to the diagram) the pressure in the water is still $P_1$ and pressure just next to it (I mean pressure of air next to it) is still $P_2$
Now the mistake you have done is you have taken Bernoulli's equation for air and water which is completely wrong. Bernoulli's equation is valid only for one fluid at a time, but you have taken two separate fluids which is totally wrong.
You may say why the pressure has to be equal at the starting point and at the end point. The reason is fluid is at horizontal level; more over it has uniform cross-section and according to equation of continuity it must have equal velocity. So it has to satisfy Bernoulli's equation that's why pressure should be equal.(because Bernoulli's equation is a property of streamline flowing liquid)

NOTE:-


*

*Bernoulli's equation can be applied for one fluid at a time.

*If fluids are at same horizontal level and have same cross-section then they have same velocity always (streamline flowing liquid only).

A: In pipe flow two terms are added to Bernoulli's equation. Major loss and minor loss terms. Major loss is due to wall friction and minor losses are due to shape change in the pipe. (Valves, elbows etc.)
In the system that you draw the pressure difference overcomes the wall friction. The wall friction increases with velocity of the fluid, therefore, increasing pressure difference increases the fluid velocity. 
