Consider a renewal process $\{N(t), t ≥ 0\}$ whose interarrival times $\{X_i\}$ are $IID$ continuous random variables. Assume that $E[X_1^2]$ is finite (so $E[X_i^2]$ is finite in general).
Prove that $E[S_{N(t)+1}^2]=E[X_1^2](m(t)+1) - 2E[X_1] \int_{0}^{t} m(x) dx$ where $m(t)$ is the renewal function.
Facts that could be useful:
We proved that $E[S_{N(t) + 1}] = E[X_1](m(t) + 1)$, which looks very similar to the first part of the expression above. Perhaps using this or modifying the proof for this in some way? In the proof, we used the renewal equation $m(t) = F(t) + F * m(t)$ and in another proof we first calculated $E[\gamma_t]$ by conditioning on $X_1$ and then using the renewal equation, then as $\gamma_t = S_{N(t) + 1} - t$, we can extract the expectation of $S_{N(t) + 1}$ from it. Any help would be great!