Find the extremal of $\int_0^1 \left[\dot{x}^2 + 2x\dot{x} + 2x\right] dt$ with $x(0)=0$, and $x(1)=\frac12$ subject to the constraint $\int_0^1 12tx dt=24$
Could anyone verify the anwer to this?
I have obtained $x=-\frac{9t^3}{16}+\frac{t^2}{2}+\frac{9t}{16}$
Thank you.
Define the functionals
$$F(t,x,\dot{x})= \dot{x}^2 + 2x\dot{x} + 2x,\\G(t,x,\dot{x})= xt$$
An extremal satisfies the (constrained) Euler-Lagrange equation
$$F_x - \frac{d}{dt}F_{\dot{x}} + \lambda\left(G_x - \frac{d}{dt}G_{\dot{x}}\right)=0.$$
This reduces to
$$x''= 1 +\frac{\lambda}{2}t,$$
with general solution
$$x = C_1 + C_2t + \frac1{2}t^2 + \frac{\lambda}{12}t^3.$$
Applying the boundary conditions
$$x = \frac{\lambda}{12}(t^3-t) + \frac1{2}t^2$$
Applying the constraint
$$2 = \int_0^1 t\left[\frac{\lambda}{12}(t^3-t) + \frac1{2}t^2\right]dt=\frac{\lambda}{12}\left(\frac1{5}-\frac1{3}\right)+ \frac1{8}$$
and
$$\frac{\lambda}{12} = \frac{-225}{16}.$$
The extremal is
$$x = -\frac{225}{16}(t^3-t) + \frac1{2}t^2$$