This questions comprises two independent parts.

(i)  Let \(g:\mathbb{R}\to\mathbb{R}\) be continuous and such that \(g(0)=0\) and \(g(x)g(-x)>0\) for any \(x > 0\). Find all solutions \(f : \mathbb{R}\to\mathbb{R}\) to the functional equation

\[g(f(x+y))=g(f(x))+g(f(y)),\ x,y\in\mathbb{R}\]

(ii) Find all continuously differentiable functions \(\phi : [a, \infty) \to \mathbb{R}\), where \(a > 0\), that satisfies the equation

\[(\phi(x))^2=\int_a^x \left(\left|\phi(y)\right|\right)^2+\left(\left|\phi'(y)\right|\right)^2\mathrm{d}y -(x-a)^3,\ \forall x\geq a.\]
(i) Let \( g:\mathbb{R} \to \mathbb{R} \) be continuous and such that \( g(0) = 0 \) and \( g(x)g(-x) > 0 \) for any \( x > 0 \). We need to find all solutions \( f : \mathbb{R} \to \mathbb{R} \) to the functional equation
\[ g(f(x+y)) = g(f(x)) + g(f(y)), \quad \forall x, y \in \mathbb{R}. \]

1. **Analyzing the properties of \( g \):**
   - Given \( g(0) = 0 \).
   - Given \( g(x)g(-x) > 0 \) for any \( x > 0 \). This implies that \( g(x) \) and \( g(-x) \) must have the same sign for any \( x > 0 \).

2. **Sign consistency of \( g \):**
   - Suppose \( g(a) < 0 \) for some \( a > 0 \) and \( g(b) > 0 \) for some \( b > 0 \). By the Intermediate Value Theorem, since \( g \) is continuous, there must exist some \( c \in (a, b) \) such that \( g(c) = 0 \). However, this contradicts the given condition that \( g(x)g(-x) > 0 \) for any \( x > 0 \). Therefore, \( g(x) \) must have the same sign for all \( x > 0 \).

3. **Assuming \( g(x) > 0 \) for all \( x > 0 \):**
   - Without loss of generality, assume \( g(x) > 0 \) for all \( x > 0 \). If this is not the case, we can replace \( g \) with \( -g \).

4. **Functional equation analysis:**
   - Setting \( x = y = 0 \) in the functional equation, we get:
     \[ g(f(0 + 0)) = g(f(0)) + g(f(0)) \implies g(f(0)) = 2g(f(0)). \]
     Since \( g \) is continuous and \( g(0) = 0 \), it follows that \( g(f(0)) = 0 \). Thus, \( f(0) = 0 \) because \( g \) is zero only at zero.

5. **Setting \( x = -y \):**
   - Setting \( x = -y \) in the functional equation, we get:
     \[ g(f(x + (-x))) = g(f(x)) + g(f(-x)) \implies g(f(0)) = g(f(x)) + g(f(-x)). \]
     Since \( g(f(0)) = 0 \), we have:
     \[ 0 = g(f(x)) + g(f(-x)). \]
     Given that \( g(x) > 0 \) for all \( x > 0 \), it follows that \( g(f(x)) \) and \( g(f(-x)) \) must both be zero. Therefore, \( f(x) = 0 \) for all \( x \in \mathbb{R} \).

6. **Conclusion:**
   - The only solution to the functional equation is \( f(x) = 0 \) for all \( x \in \mathbb{R} \).

\(\blacksquare\)

The final answer is \( \boxed{ f(x) = 0 } \) for all \( x \in \mathbb{R} \).