The rate of change of speed when turning back along a straight line I was trying to find how the rate of change of spped at $t$ of an object moving in a straight line relates to its maginitude of it acceleration. The case when it is moving in the direction before and after $t$ is easy.
However, an object is moving along a staight path and turns back at time $t_t$, then its $\vec v$  is $s(t)\hat i$ when $t<t_t$, and $-s(t)\vec i$ when $t>t_t$, where $s$ is the speed function. Differentiating $\vec v$ for $t<t_t$ we have $\vec a=s'(t)\hat i$, and for $t>t_t$ we have $\vec a=-s'(t)\hat i$. Since $s'$ is continuous, the former tends to $s'(t_t)\hat i$ as $t\to t_t^-$, and the latter to $-s'(t_t)\hat i$ as $t\to t_t^+$. Since $\vec a$ is continuous, we have $s'(t_t)=0$.
I have been assuming all functions related to displacement like speed, velocity, and so on are continuous.
But then I considered the following scenario. When a ball is thrown upwards and moves only under the influence of gravity, its $s'$ is $-g$ before and $g$ after its hightest point. So $s'$ is undefined when the ball is at maximum height.
I have been assuming all kinematic functions are continous. Is this wrong?
 A: Let's choose a time coordinate system so that $t=0$ is the moment when the ball reaches it's peak.  Then, by assumption, the speed at time $t$ is the same as the speed at time $-t$, but the velocity is exactly opposite. Then, our velocity function is the following:
$$
\vec{v}(t) = \begin{cases}
s(t)\hat{j} & t\leq0\\
-s(-t)\hat{j} & t > 0
\end{cases}\,.
$$
Note the important $(-t)$ in the argument of $s$ for the way down!  This guarantees that the speed is identical the same amount $\Delta t$ of time before the peak as after the peak:
$$
\left|s\left(t=-\Delta t\right)\right| = \left|-s\left(-\left(t=\Delta t\right)\right)\right|\,.
$$
Once we've established that, then we can take some derivatives.  The acceleration is
$$
\frac{d\vec{v}(t)}{dt} = \begin{cases}
s'(t)\hat{j} & t\leq0\\
-(-1)s'(-t)\hat{j} & t > 0
\end{cases}
= \begin{cases}
s'(t)\hat{j} & t\leq0\\
s'(-t)\hat{j} & t > 0
\end{cases}\,.
$$
Now, the accelerations at equal times on either side of the peak are equal, because $s'(t)$ for $t<0$ is equal to $s'(-|t|)$. In the limit as $t\to0$ from either side, then, the derivatives are the same, which means the derivative exists and is unique there.
Finally, in the case of simple free-fall projectile motion, $s(t)$ on the way up is a decreasing function of time and constant, so $s'(t)=-g$. Thus, throughout the entire trip, the acceleration is $\vec{a} = -g\hat{j}$, and continuity of the acceleration is guaranteed, and hence the velocity and the position are also continuous.

To match the OP, where the time at the peak is $t_i$, we have to shift everything, and that makes it difficult to analyze.  But, here would be the correct velocity function:
$$
\vec{v}(t) = \begin{cases}
s(t)\hat{j} & t\leq t_i\\
-s(-t+2t_i)\hat{j} & t > 0
\end{cases}\,.
$$
Note that for times $t_i-\Delta t$ and $t_i+\Delta t$ (equal times away from the peak on either side), we get
$$
s(t<t_i) = s(t_i-\Delta t)$$
and
$$
s(t>t_i) = \left(-(t_i+\Delta t)+2t_i\right) = s(t_i-\Delta t)\,,
$$
and the speeds are the same!

Finally, what about the "speed function" itself, as mentioned in the OP?  Let's consider the simple case of free-fall again, and think about the graph of the speed as a function of time.  It will look like a shifted absolute-value function, since the speed decreases linearly, hits zero, the increases linearly.  The speed function is continuous at that point but not differentiable!  Hence, the derivative of the speed function is discontinuous.  So, not all kinematic quantities (if you consider the speed function and its derivative as kinematic quantities) need be continuous, even for the mathematically "very nice" case of constant-acceleration motion.
