# Projectile Motion: finding velocity if given range, angle, and height.

Hey everyone!
I have been asked to find an equation with the subject of V (initial speed) with only the information given, angle above horizontal, range, and initial height above ground. I did attempt this myself and got the formula:
v = initial speed
θ = initial angle
s = range (total)
h = initial height above ground

v3(2s*tanθ) + v2(2h) + s2/cos2θ = 0

It is a cubic and so I left it in this form but I found this to be incorrect (will not show working as it is around a page) and have been over my work multiple times. Please help me with this!

Nevermind, with hard work and starting from scratch I managed to derive this formula!!!!!:

v = initial speed
θ = initial angle
s = range
h = height above ground (also works below)
g = gravitational acceleration (positive)

let a = 0.5 * g * s2
let b = cos2θ * (s * tanθ + h)

v = Math.sqrt(a / b)

and it works!!!!!
thanks for all your hard work guys, it paid off this time