So I have a steady isothermal flow of an ideal gas through a smooth duct (no frictional losses) and need to compute the mass flow rate (per unit area) as a function of pressures at any two different arbitrary points, say 1 and 2. I have the following momentum equation in differential form:
\begin{equation} \rho vdv + dP = 0\end{equation} where $v$ is the gas the flow velocity and $P$ is static pressure. The mass flow rate per unit cross section $G$, can be calculated by integrating this equation between points 1 and 2. This is where it gets confusing. I do the integration by two ways:
1) Use the ideal gas equation $P = \rho RT$ right away and restructure the momentum equation: \begin{equation} vdv + RT\frac{dP}{P} = 0\end{equation}, integrate it between points 1 and 2 and arrive at:
\begin{equation} v_1^2-v_2^2 + 2RTln\frac{P_1}{P_2} = 0 \end{equation}
Since the flow is steady, I can write $G = \rho_1 v_1 = \rho_2 v_2$, again use the ideal gas law to write density in terms of gas pressure and finally arrive at the mass flow rate expression:
\begin{equation} G^2 = \frac{2ln\frac{P_2}{P_1}}{RT(\frac{1}{P_1^2}-\frac{1}{P_2^2})} \end{equation}
2) In another way of integrating (which is mathematically correct), I start by multiplying the original momentum equation by $\rho$ to get
\begin{equation} \rho^2 vdv + \frac{1}{RT}PdP = 0\end{equation} write $\rho^2v = G^2/v$, integrate between points 1 and 2 to arrive at
\begin{equation} G^2ln\frac{v_2}{v_1} = \frac{P_1^2 - P_2^2}{2RT} \end{equation} Using the ideal gas law the velocity ratio can be written as the pressure ratio to finally arrive at the mass flow rate equation
\begin{equation} G^2 = \frac{P_1^2 - P_2^2}{2RTln\frac{P_1}{P_2}} \end{equation}
Both the expressions are dimensionaly sound and I know that the second expression is the correct one. My question is, whats wrong with first expression.