Is there a way to simplify the following expression:
$\lgroup{\int^A_0 x(s)ds}\rgroup ^2$
I'm looking for an expression that can possibly get rid of the squared term, so that I can have just an integral of the first order.
Is there a way to simplify the following expression: $\lgroup{\int^A_0 x(s)ds}\rgroup ^2$ I'm looking for an expression that can possibly get rid of the squared term, so that I can have just an integral of the first order. 


I'm not sure about simplifying, but you can easily write your objective functional in Bolza form like this: $$ \begin{align} &\min_{u(t) \in \Omega(t)} \, J = z(T)^2 + \int_{0}^{T} s(t)u(t)dt \\ s.t. &\frac{dz(t)}{dt} = r(t)u(t),\quad z(0) = 0 \end{align} $$ 


For instance, the derivatives wrto $A$ of the two expressions coincide choosing $s(x):=2r(x)\int_0^xr(\xi)u(\xi)d\xi$. So the two expressions coincide for all $A$ since they both vanish at $A=0$. 

