Minimizing positional error in movement. Let's say we have some object, $O$. $O$ exists on a one-dimensional plane, and is not massless. For simplicity, let's say friction is not a factor.
Let's say we have some function, $a(t)$ that describes $O$'s acceleration in terms of time ($t$). $a(t)$ is bounded by $\{-a_M \le a(t) \le a_M\}$, and does not neccessarily have to be continuous or differentiable (though I'd imagine not being differentiable might make the problem a bit more complicated). At $t=0$, $O$ is at $x=0$ in space and is not moving or accelerating. $O$'s velocity would then be described as $v(t)=\int_0^t a(x)dx$, and it's position as $p(t)=\int_0^t v(x)dx$. Our final equation for position at any given $t$ would be
$$p(t)=\iint_0^t a(x)dx$$
$O$ has some positional goal, $k$. We can calculate $O$'s positional error from it's goal (in terms of the current time) using $e(t)=|k-p(t)|$. Therefore, our total positional error over the course of some maneuver is
$e_T=\int_0^\infty e(x)dx$
So, (and hopefully I haven't completely bored you to death yet) given all that, what equation for $a(x)$ will achieve the minimum $e_T$? I'm happy to even just be pointed in the right direction, as my main problem so far has been trying to figure out how to find a minimum function (instead of the usual scalar).
To be clear, there are a couple other similar questions, but they all ask to arrive with zero velocity. I'm fine with overshooting a bit, as long as the solution gives the minimum total error.
 A: Your second comment has the correct answer. Below I give not a proof but an illustration of it.
Your error function $e(t)$ punishes deviations from goal, for as long as they exist. This has 2 implications:

*

*If the object doesn't arrive and remain at the positional goal then the error will be infinite. For the error to be finite, the object must be decelerating before arriving at goal. So, we get the inspiration that the object should start its move with acceleration from rest, and end with deceleration to rest.

*For the error to be small, it is preferable for the object to arrive at the destination as soon as possible.

Now, consider the midpoint between start and goal positions. It can be verified that the fastest way to get there is by acceleration at $a_M$. Let's say then the speed of the object will be $v_M$. Because of symmetry of distances and accelerations it is easy to see that from that midpoint and starting at $v_M$, the fastest way to get to the goal position and rest there is by deceleration at $-a_M$ .
We can calculate the time it takes the object to reach the midpoint, that is, the point where it should switch from acceleration to deceleration:
$$\frac{k}{2} = \frac12 a_M t_{switch}^2 $$
$$t_{switch} = \sqrt{\frac{k}{a_M}} $$
The whole trip takes twice that time.
