# Rearranging equation involving multiple variables, roots and powers

I am having a really tough time crunching this basic rearranging formula problem that is a part of a physic problem. It takes me literally days to figure it out and I still can't wrap my head around it.

My textbook basically starts with a formula :

sqrt(2h/g) + h/v=t

and it asks me to find the value of "h" (it leads to a quadratic formula with 2 solutions, one of them being nonsensical.

According to a textbook, after "simple rearrangements" this equation becomes:

gh2 - 2v(v+gt)h +gv^2 t^2 = 0

a messy, quadratic equation, its two roots are:

h1 = vt + (v^2 ) / g - v/ g * sqrt(v^2 + 2vgt)

h2 = vt + (v^2 ) / g + v/ g * sqrt(v^2 + 2vgt)

The way that I try to solve it is:

I. remove root from denominator (multiply by '1")

sqrt(2h/g) becomes: sqrt(2h)/sqrt(g) * sqrt(g)/sqrt(g) = sqrt(2hg)/g

II. remove denominators from starting formula

a) sqrt(2hg) / g + h/v = t / multiply by "gv" b) sqrt(2hg) * v + hg = tgv

III. now I would love to somehow obtain "h", but no matter how I rearrange this expression, I always end up with h under root and no way of simplifying it any further...

sqrt(2hg)*v + hg = tgv /squaring both sides to remove root.

v2 * 2hg + 2vhg * sqrt(2hg) + h^2 * g^2 = t^2 * g^2 * v^2

IV. [Dividing all by "g"]

2h * v^2 + 2hvsqrt(2hg) + gh^2 = g * t^2 * v^2

I have NO idea how the texbook got gh2 - 2v(v+gt)... [as written above] from evaluating this starting equation. How did they remove that square root of 2hg? It is tremendously hard and disheartening for me... I looked everywhere on the internet to better learn how to solve multi-variable equations with roots and exponents, but most examples are just too basic to be of any help or not explained step in step... Any help would be greately appreciated! If it is possible, I would love you to explain it as simply as possible, step by step.

We get by isolating the square root: $$\sqrt{\frac{2h}{g}}=t-\frac{h}{v}$$ squaring both sides: $$\frac{2h}{g}=t^2+\frac{h^2}{v^2}-\frac{2ht}{v}$$ using the quadratic formula we obtain $$h_1=-\frac{\sqrt{2 g t v^3+v^4}}{g}+\frac{v^2}{g}+t v$$ or $$h_2=\frac{\sqrt{2 g t v^3+v^4}}{g}+\frac{v^2}{g}+t v$$