If v is the velocity of projected and v' is the velocity at infinity, then we have by energy conservation principle.