# Complete the square to solve for velocity?

I'm going to ask my question, explain my problem, show my work, and then re-state my question.

Question: how is my solution for velocity different than another solution that I have found in literature?

Explanation of my problem: I have a (hyperbolic? or is it quadratic?) equation relating pressure drop and velocity, $v$: $$\tag{1} -(dp/dx-\rho g)=\frac{\mu}{kk_{rf}}v+\beta\rho v^2$$ I want to solve this equation for the velocity variable $v$.

My solution: I have performed the "complete the square" method, e.g., rearranging Eqn (1) $$\tag{2} \beta\rho v^2+\frac{\mu}{kk_{rf}}v=-(dp/dx-\rho g)$$ dividing through by $\beta\rho$ $$\tag{3} v^2+\frac{1}{\beta\rho}\frac{\mu}{kk_{rf}}v=\frac{-(dp/dx-\rho g)}{\beta\rho}$$ completing the square by adding $\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2$ to both sides: $$\tag{4} v^2+\frac{\mu}{\beta\rho kk_{rf}}v+\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2=\frac{-(dp/dx-\rho g)}{\beta\rho}+\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2$$ simplifying the LHS: $$\tag{5} \left(v+\frac{\mu}{2\beta\rho kk_{rf}}\right)^2=\frac{-(dp/dx-\rho g)}{\beta\rho}+\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2$$ taking the squareroot of both sides: $$\tag{6} v+\frac{\mu}{2\beta\rho kk_{rf}}=\pm \sqrt{\frac{-(dp/dx-\rho g)}{\beta\rho}+\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2}$$ and solving for $v$: $$\tag{7} v=-\frac{\mu}{2\beta\rho kk_{rf}}\pm \sqrt{\frac{-(dp/dx-\rho g)}{\beta\rho}+\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2}$$ For the equation to make sense I would take the positive root: $$\tag{8} v=-\frac{\mu}{2\beta\rho kk_{rf}}+\sqrt{\frac{-(dp/dx-\rho g)}{\beta\rho}+\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2}$$

Back to the question: The other solution I have found in literature is this: $$\tag{9} v=\frac{1}{2k\rho\beta}\left[-\frac{\mu}{k_{rf}}+\sqrt{\left(\frac{\mu}{k_{rf}}\right)^2-4k^2\rho\beta\left(dp/dx+\rho g\right)}\right]$$ Are Equations 8 and 9 equivalent? If so, how? (Also, is Eqn 1 a hyperbolic or quadratic equation?)

• I found my solution, but I will leave this question up so that someone may answer if they wish. – Armadillo Dec 12 '17 at 18:59

$$v=\frac{1}{2k\rho\beta}\left[-\frac{\mu}{k_{rf}}+\sqrt{\left(\frac{\mu}{k_{rf}}\right)^2-4k^2\rho\beta\left(dp/dx+\rho g\right)}\right]$$

$$v=-\frac{\mu}{2\beta\rho kk_{rf}}+\frac{1}{2k\rho\beta}\sqrt{\left(\frac{\mu}{k_{rf}}\right)^2-4k^2\rho\beta\left(dp/dx+\rho g\right)}$$

$$v=-\frac{\mu}{2\beta\rho kk_{rf}}+\sqrt{\frac{1}{4k^2\rho^2\beta^2}\Bigg(\left(\frac{\mu}{k_{rf}}\right)^2-4k^2\rho\beta\left(dp/dx+\rho g\right)\Bigg)}$$

Distribute within the radical to acquire

$$v=-\frac{\mu}{2\beta\rho kk_{rf}}+\sqrt{\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2-\frac{(dp/dx-\rho g)}{\beta\rho}}$$

Rearrange to get

$$v=-\frac{\mu}{2\beta\rho kk_{rf}}+\sqrt{\frac{-(dp/dx-\rho g)}{\beta\rho}+\left(\frac{\mu}{2\beta\rho kk_{rf}}\right)^2}$$ as needed.