I am working through some questions to prepare for an exam and was just hoping someone could assist me in checking if my approach is sound for this problem.
Solve the problem of time optimal control to the origin for $$\begin{array}{rl} \dot{x_1} &= x_2\\ \dot{x_2} &= u\end{array}$$ where $| u (t) |\le 1 $. If $x(0)=(a,b)$ lies above the switching curve, then find the time taken to reach the origin, $t_1$, as a function of $(a,b)$.
My approach
I'm fairly comfortable with deriving the optimal solution. So after applying the PMP and using the costate equations of the Hamiltonian, we arrive at the following:
$$ x(t)= \begin{bmatrix} \frac{ut^2}{2}+\beta t+\gamma\\ ut+\beta \end{bmatrix} \\\ \\x_2^2=2ux_1+\alpha $$
Where, $u=\pm1$ and can switch at most once.
We have two families of curves, a $C_+$ family of quadratics opening towards the positive $x_1$ axis with $x_2$ increasing in $t$ and a $C_-$ family of quadratics opening to the negative $x_1$ axis with $x_2$ decreasing in $t$.
Each only has one curve through the origin, so we end up with the following

If above the paths through the origin, set $u=-1$ and follow a blue $C_-$path down to the origin seeking path before switching to $u=1$, and vice versa for points below.
Now, the challenging part.
If we start above the switching curve at $(a,b)$, our $C_-$ curve can be written as $$ \\x_2^2=-2x_1 + 2a + b^2 $$
And our switching curve is given by $$ \\x_2^2=2x_1 $$
So we will switch at their intercept at $$ (\frac{2a+b^2}{4},-\sqrt{\frac{2a+b^2}{2}}) $$ Now we need to switch to parametric curves for the time.
If we set $t=0$ at $(a,b)$, our $C_-$ curve should be given by:
$$ \\x(t)= \begin{bmatrix} \frac{-t^2}{2}+bt+a\\ -t+b \end{bmatrix} $$
Subbing in the intercept point gives $$ T_1 = b + \sqrt{\frac{2a+b^2}{2}} $$
If we do a similar approach on a $C_+$ curve starting at time $0$ at the switch point, we get $$ \\x(t)= \begin{bmatrix} \frac{t^2}{2}-t\sqrt{\frac{2a+b^2}{2}}+\frac{2a+b^2}{4}\\ t-\sqrt{\frac{2a+b^2}{2}} \end{bmatrix} $$
Subbing in the origin and solving for time
$$ T_2 = \sqrt{\frac{2a+b^2}{2}} $$
So the total time to origin is just $$ T = T_1 + T_2 = b + 2\sqrt{\frac{2a+b^2}{2}} $$
Would be greatly appreciated if someone would be able to confirm if my approach is sound and correct. I feel like that, if this is the solution, there must be a simpler approach that I am missing, so if anyone could point me towards a more timely approach, that would be amazing.