I need to dynamically solve an equation for a function $g(t)$ which is multiplied by another expression involving an integral of $g(t)$.
Specifically, I have \begin{align} \tag{1} \sigma^{target}(t) = g(t) \sigma^{input} \sqrt{\frac{1}{T_i} \int_{0}^{T_i} g^2(s) ds} \end{align}
I know $\sigma_{target}$ and $\sigma_{input}$. Furthermore, $$ g(t) = \begin{cases} 1 & 0 \leq t \leq T_{i-1} \leq T_i \\ ? & T_{i-1}\leq t \leq T_{i} \end{cases} $$
Without the part involving the integral, this would be straightforward and I'd use a iterative/bootstrapper to solve for g(t) for $t \in [0, T_i]$ but the integral complicates this task as I'd need $g(t)$ to determine that integral.
I want to find some empirical estimate of g(t) for some grid $t \in (t_0, ..., t_n = T_i)$
I was suggested to first give a guess of $\sqrt{\frac{1}{T_i} \int_{0}^{T_i} g^2(s) ds}$, then solve for $g(t)$ and iteratively updated my guess until I arrive at the root of equation $(1)$.