Knowing that the range is:
$$ R = \frac{v^2\sin2\theta}g $$
Taking the integral of the velocity function we have:
$$ R(T) = (V_i \cos\theta T + x_i)X +\left(-\frac{1}2gT^2+V_i\sin\theta T+y_i\right)Y$$
So, I know it hits the ground at:
$$ \text{time in flight} = \frac{V_i\sin\theta \pm \sqrt{ (V_i\sin\theta )^2 +2gy_i } }g $$
Knowing the time in flight, how would we derive the range?
Would I simply plug it back into the position function on the $x$-axis? (Assuming the object hits the ground when $y = 0$)
Edit:
After messing with it, I found out what the book wanted me to do:
Assuming $y_i = 0:$
$ timeInFlight = \frac{ V_isin\theta + \sqrt{ (V_isin\theta)^2 } }g = \frac{ 2V_isin\theta }g $
$ R_x(T)=V_icos\theta T+x_i $
$R_x(time in flight) = \frac{2V_i^2sin\theta cos\theta}g + x_i = \frac{V_i^2sin2\theta}g + x_i$
Hint your formula for range is wrong its $$\frac{v^2\sin(2\theta)}{g}$$ and for knowing range using time of flight we can use $s=v_x.t+\frac{1}{2}gt^2$ where $v_x$ is velociyy in x direction . s is the displacement. Now we know time of flight is $2v\sin(\theta)/g$ just plug in and get range ie s