How to find a function with given initial values of other function? I am looking for a continuous function $\theta(t)$ to steer a particle on the trajectory $x(t)$. 
$x$ and $\theta$ relate through this constraint
$\ddot x(t) = Tsin(\theta(t))$ where $T$ is a non-zero positive constant.
$\theta(t)$ must satisfy these initial conditions
$\theta(0) = 0$
$\theta(t_0) = 0$
$x(t)$ must satisfy these initial values.
$$x(0)=x_a, x(t_0)=x_b$$
$$\dot x(0)=0, \dot x(t_0)=0$$
$$\ddot x(0)=0, \ddot x(t_0)=0$$
The two functions $x(t)$ and $\theta(t)$ only need to be continuous between $x_a$ and $x_b$. $x_b$ can be greater or lesser than $x_a$. Further, the function $x(t)$ should be bijective on $[0, t_0]$
This is how I got a solution for $x(t)$. I just guessed what seemed right until I got it working. Perhaps there also exists a polynomial solution.
$$\ddot x=-rsin(t)$$
Thus $\ddot x(0)=0$ and $\ddot x(t_0) \implies t_0 \in 0,\pi,2\pi , ...$
$\dot x(t) = rcos(t) + C_1$
$\dot x(0) = 0 = r + C_1$
$\dot x(t_0) = 0 = rcos(t_0) + C_1$
Since $t_0 \in 0, \pi, 2\pi,...$. We can isolate $C_1$ if we force $t_0 = 2\pi$
Thus $\dot x(t_0) = 0 = r + C_1 \implies C_1 = -r$ 
$x(t)=rsin(t) - rt + C_2$
$x(0) = x_a = C_2$
$x(t_0) = x_b = rsin(2\pi) - r2\pi + C_2 \implies r = \dfrac{x_a - x_b}{2\pi}$
Therefore, $x(t) = rsin(t) - rx + x_a$, where $r = \dfrac{x_a - x_b}{2\pi}$
Now here is where I am stuck. I do not understand how I can find $\theta(t)$ from the given equation. I tried doing
$\ddot x(t) = Tsin(\theta(t)) = -rsin(t)$
but I'm not sure how to maintain the $x(t)$ constraints
 A: Here is a engineering type solution for some range of parameters. There is some flexibility in the choice of a function $f$, but I give a hard bound below based only on the information given. At the end, I draw a representative example.
Step 1: candidate path $x(t)$
Set $x_a=0, x_b=L$. $L=0$ is impossible by the bijection requirement. Set $L>0$ for notational simplicity. (If $x_b<x_a$, then let the particle go from $x_b$ to $x_a$ instead, and then go backwards in time.) Let $f$ be any function such that
$$f:[0,1]\to[0,\infty), \quad f(0)=f'(0)=f''(0)=f''(1)=f'(1)=f(1) = 0,\\ x\in(0,1)\implies f(x)>0$$
A polynomial example exists;you can consider $-t^3(t-1)^3$. Or you can use the following
$$f:[0,1]\to [0,\infty) , \quad f(t):= \begin{cases}\exp\frac{-1}{1-(2t-1)^2}& x\neq 0 ,1,\\ 0 & x=0,1\end{cases}$$ 
This is up to scaling, a classical function in the theory of PDEs known as a "bump function" or the "standard mollifier". It is $C^\infty$, bounded above, and verifies $$0=f(0)=f(1)=f'(0)=f'(1)=\dots=f^{(k)}(0)=f^{(k)}(1)=\dots$$ It follows that if we integrate it from $0$ to $t$ to get $g(t)$, then $g$ and all required derivatives vanish at 0, while all required derivatives of $g$  vanish at $1$ (but not $g(1)$). Now consider $f_{t_0} : [0,t_0] \to \mathbb [0,\infty)$, achieved by a rescaling
$$ f_{t_0}(t) = cf(t/t_0)$$
where $c$ is chosen so that $\int_0^{t_0} f_{t_0} (s)ds = 1$.
The same is true of $f_{t_0}$ now, but at $0$ and $t_0$. Now define
$$x:[0,t_0]\to[0,L],\quad x(t)= L\int_0^t f_{t_0}(s) ds.$$
It follows from $f>0$ in $(0,1)$ that $x$ is a bijection, and satisfies all boundary conditions. 
Step 2: satisfying the ODE
One now needs to check if $|x''(t)|\le T$ for all $t$. In terms of $f$ this is
$$|Lf_{t_0}'(t)|=\frac{cL}{t_0}|f'(t/t_0)|\le T,$$
so if
$$\sup_{s\in[0,1]}|f'(s)| \le \frac{Tt_0}{cL},$$
then this procedure works. (In snappier notation this is $\|f\|_{L^1}\|f'\|_{L^\infty} \le \frac{Tt_0}{L}$.) Since $c$ depends on $f$ you may get better results with other $f$. 
In fact, the furthest you can go in the + direction is controlled by the solution to  $x'' \equiv T$, which leads to $x(t) = Tt^2/2 + At + B$. $A=x'(0)=0$. $B=x(0)=x_a=0$.  $x_b = x(t_0)= Tt_0^2/2 $.  So this computation gives $L\le Tt_0^2/2 $. If this isn't satisfied, you can go home. 
Step 3: path to angles
This part is easy. Given the above calculations we can invert the relationship for $\theta$. Under the above assumption, we have $x''/T\in[-1,1]$. Just define
$$\theta(t) = \arcsin(x''(t)/T).$$
Here, arcsin is a function $[-1,1]\to[-\pi,\pi]$. There's a unique solution for $\arcsin(x)=0$ which is $x=0$ so the boundary conditions are met. This finishes the construction.
Here's a Desmos graph using the degree 6 polynomial I gave. I followed my construction exactly (but the variable names in Desmos are different). The blue line is $x$. The yellow line is $x'$. The dotted yellow line is $x''$. The green horizontal is $y=T$. The shaded region shows the parts where $x''>T$ ; so this is not a solution but would become one if $T$ were increased enough.

In particular (response to comments) note that $x''(0)=0=x''(L)$.
