Where does the second total derivative live? Let $f:M \to \mathbb{R} $ be a smooth function.  Then the total derivative of $f$ is a function on the tangent bundle:  
$Df: TM \to \mathbb{R}$
Locally $TM$ is just the product of an open subset of $M$ with the tangent space of $M$. So, to compute $Df$, we pick a point on M, a direction in the tangent space at that point, and we output a real number.
Continuing in this manner, we can look at the total derivative of the total derivative: 
$D^{2}(f) = D(D(f)):T(TM) \to \mathbb{R}$
Let $m = dim M$. Then $T(TM))$ has dimension $4m$.  This is what is confusing me, because it seems like the second derivative should live in a space of dimension $3m$.  One should be able to pick a point of the manifold, and two directions in the tangent space, and output a number.
Whereas here, to compute $D^{2}(f)$, it seems like we have to input an extra $m$ coordinates. We must choose a point on the manifold, a direction in the tangent space - this gives us our point $(x,v)$ on the manifold $TM$, and we want to compute the total derivative of the function $Df$.  Then we pick a direction in the tangent space $T_{(x,v)}(TM)$, say $w \in T_{(x,v)}(TM)$. But $w$ lives in a space of dimensinon $2m$, not of dimension $m$.  
So, just where does $D^{2}(f)$ live?  Along the lines of the discussion above, one would be led to say $D^{2}(f) \in T^{*}(TM)$.  Is this correct?  
If so, and if we are led to agree that the notion of a connection rectifies this conundrum, then where does the extraneous data go? As in, we've gone from dimension $4m$ to dimension $3m$, so what happened to the extra $m$ coordinates?  
 A: Let $M$ be a two dimensional manifold with local coordinates $x,y$. The coordinates give a local trivialisation of the tangent bundle and the tangent tangent bundle (and the tangent tangent tangent bundle, ...) and let $dx, dy$ and $\partial x, \partial y$ be coordinates of two different tangent vectors at $(x,y)$ and let $\partial dx,\partial dy$ be coordinates of a vertical second order tangent vector ("acceleration vector") at $(x,y,dx,dy)$.
For a function $f(x,y)$ on $M$ the first differential is
$$
Df = f_xdx+f_ydy
$$
and the second differential becomes
$$
D^2f = f_{xx}\partial xdx+f_{xy}\partial ydx+f_{xy}\partial xdy+f_{yy}\partial ydy+f_x\partial dx+f_y\partial dy
$$
So the second differential takes as input a point $(x,y)$, two tangent vectors $(dx, dy)$ and $(\partial x, \partial y)$ and an acceleration vector $(\partial dx,\partial dy)$.
A connection is a specification of how the acceleration vector is linearly computed from the the two tangent vectors and the acceleration then gets defined as
\begin{align*}
\partial dx &= -(\Gamma_{11}^1\partial xdx+\Gamma_{12}^1\partial ydx+\Gamma_{21}^1 \partial xdy+\Gamma_{22}^1\partial ydy)\\
\partial dy &= -(\Gamma_{11}^2\partial xdx+\Gamma_{12}^2\partial ydx+\Gamma_{21}^2 \partial xdy+\Gamma_{22}^2\partial ydy)
\end{align*}
