Determining acceleration in order to meet a space-time-velocity reservation An Example
A train on a single line track is told to be at position $x_{res}$, at time $t_{res}$, and to be moving at exactly $v_{res}$ when it hits that point. Where $_{res}$ denotes the reservation.
The train driver knows the current time ($t_{cur}$), it's current speed ($v_{cur}$) and it's current position ($x_{cur}$). Where $_{cur}$ denotes the current value.
Provide an equation that gives the acceleration the train driver must apply at $t_{cur}$, in order to be on track to meet the reservation.
The train could need to accelerate to faster than $v_{res}$ then slow down. It could instead have to constantly accelerate, or even maintain the exact same speed. It all depends on the situation.
The equation must be solvable at any time, without any past knowledge.

I'm looking to determine acceleration as a function of time, in order to meet a space-time-velocity reservation. - That is: be at location $x$, at time $t$, with final velocity $v$.
The problem domain can be considered 1 dimensional.
Available Values


*

*Current and final location ($x_1$ & $x_2$), thus $\Delta x$.

*Current and final time ($t_1$ & $t_2$), thus $\Delta t$

*Current and final velocity ($v_1$ & $v_2$), thus $\Delta v$
I am aware there are likely infinite acceleration curves that would technically solve this problem, an ideal solution would result in a curve with the least extreme accelerations.
The final answer should be an equation giving acceleration using the available values above. 
I would appreciate it if you could explain how you found your answer, and your patience with the limited knowledge of a laymen.

What I've tried
I'm familiar with equations of motion under constant acceleration, however varied acceleration like this is still a little over my head. I have posted this question on Reddit, and received an answer, however that too is over my head, and I am unable to work through it, though I have attempted to. You can see this post and my attempts at working through it here
I am not a Physicist or a Mathematician, so please excuse any mistakes or misconceptions on my part. I would be truly grateful for any help.
 A: You might as well start at the origin with zero velocity by defining new variables that are the $2$ subscript minus the $1$ subscript.  For $x$ you also have subtract the effect of the velocity you subtracted, so $x=x_2-x_1-v_1t.$  Then the relevant equations become
$$x(t)=\int_0^t v(\tau)d\tau \\v(t)=\int_0^t a(\tau) d\tau$$
and we are looking for $a(t)$ that satisfies these two equations.  I believe that finding the solution that minimizes acceleration would be a calculus of variations problem, which you probably don't want.  We have two constraints, so we need two degrees of freedom.  We can just assume the acceleration is constant in two periods, the first half and the second half of the time.  We will call them $a_1, a_2$ and the final time $T$.  Then at the end of our time we have 
$$v(T)=\frac 12T(a_1+a_2)\\
x(T)=\frac 12a_1(\frac T2)^2+\frac 12a_1\frac T2+\frac 12a_2(\frac T2)^2$$
These are two simultaneous equations for $a_1,a_2$ which you can solve.  The same approach will work with more steps, giving you freedom to adjust the accelerations to keep them small.
A: Let's say the position is a function of time $x(t)$, so the velocity is $v(t)=x'(t)$ and the acceleration is $a(t)=x''(t)$.
There are many ways to define what it means for the trajectory to have "the least extreme accelerations". Two mathematically natural ways are (i) minimizing the total squared acceleration, $\int_{t_1}^{t_2}a(t)^2\,\mathrm dt$, and (ii) minimizing the maximum absolute acceleration, $\sup\limits_{t\in[t_1,t_2]}|a(t)|$.
In case (i), one can show via calculus of variations that the optimal trajectory has constant $a'(t)$, so the position is a cubic $x(t)=c_0+c_1x+c_2x^2+c_3x^3$. There are four unknowns, which can be determined using the four equations $x(t_1)=x_1,x(t_2)=x_2,x'(t_1)=v_1,x'(t_2)=v_2$. This is cubic Hermite interpolation, and the closed-form solution is given in the above link.
In case (ii), I conjecture that the optimal solution consists of two intervals $[t_1,t_*]$ and $[t_*,t_2]$, each having constant acceleration with equal magnitude but opposite sign, $a_*$ and $-a_*$. Then, knowing $x(t_1)=x_1,x'(t_1)=v_1$, we can integrate twice each to find $x(t_*),x'(t_*)$ and then $x(t_2),x'(t_2)$ in terms of the two unknowns $t_*,a_*$. Solving the two equations $x'(t_1)=v_1,x'(t_2)=v_2$ then fixes the solution.
I don't have time to work out the details for either case, so I'm marking this community wiki in the hope that someone else can come along and help out.
