Background
I'm trying to solve an optimal control problem using Pontryagin's Principle. The problem involves finding a control function that minimizes the time from a given initial state to a given final state. I get stuck when trying to find initial/final conditions for solving the differential equations that come up when apply Pontryagin's principle (or at least that's when I first notice issues cropping up).
Problem Setup
The dynamic system I'm looking at has a state function $x: \mathbb{R}_{\geq 0} \to \mathbb{R}^4$ and control function $\alpha: \mathbb{R}_{\geq 0} \to \mathbb{R}$. Letting $g \in \mathbb{R}_{>0}$ be a constant, the system is governed by equation $\dot{x} = f(x,\alpha)$, where $f: \mathbb{R}^2 \to \mathbb{R}^4$ is given by $$ f\left(\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix}\right) = \begin{bmatrix} x_3 \\ x_4 \\ -g + \cos^2\alpha \\ \cos\alpha\sin\alpha \end{bmatrix} $$ In other words, we have $$ \begin{bmatrix} \dot{x}_1(t) \\ \dot{x}_2(t) \\ \dot{x}_3(t) \\ \dot{x}_4(t) \end{bmatrix} = \begin{bmatrix} x_3(t) \\ x_4(t) \\ -g + \cos^2\alpha(t) \\ \cos\alpha(t)\sin\alpha(t) \end{bmatrix} $$ Given a starting point $x^0 = x(0)$, I'm looking for a choice of $x(t)$ and $\alpha(t)$ that minimizes the time to the origin (i.e. such that the first $T$ with $x(T) = 0$ is minimal).
Progress so far
From the literature I've read it seems like the way to proceed is first to identify the cost functional, which in this case is $$J=\int_0^T1dt.$$ We then extract the integrand of this cost functional, calling it $L$ (the "Lagrangian"), and form from it $H$ (the "Hamiltonian"), defined by: $$H = L + \lambda \cdot f.$$ Here $\lambda: \mathbb{R}_{\geq 0} \to \mathbb{R}^4$ is the "co-state" function. We then need to solve the following system of differential equations: $$\dot{x_i} = \frac{\partial H}{\partial \lambda_i}$$ $$\dot{\lambda_i} = -\frac{\partial H}{\partial x_i}$$ $$0 = \frac{\partial H}{\partial \alpha}.$$ The solution(s) to this system will contain the optimal control function $\alpha^*$ and the corresponding optimal state function $x^*$.
Where I get stuck
When trying to solve the above system, I find I only have initial/final conditions for the state equations, so it's not clear how to go about solving the whole system. In the literature I do see mentions of additional conditions that constrain the co-state function, e.g. conditions on the value of the $H$ at $T$ or conditions derived from the fact that $x(0)$ and $x(T)$ are fixed. However, I haven't been able to figure out how to use them with my problem.
My question(s)
How can I find the optimal state/control functions for this problem? What am I missing or what have I done wrong in applying Pontryagin's Principle? How can would I use additional conditions like those mentioned above to get initial/final conditions for the co-state equations?
I appreciate any and all advice.