Let $M$ be a Riemannian manifold. $r:M\to [0,+\infty]$ denotes the function assigns to $p\in M$ the injectivity radius $r_p$ of the exponential map $\exp_p$.
Is this function $r$ is continuous or even smooth? If not, what additional conditions could guarantee the continuity of $r$?
[Edit: Asaf Shachar has pointed out a mistake in the last paragraph of the proof below. I'm no longer sure whether the stated claim is even true.]
If $M$ is complete, then $r$ is continuous. (I'm not sure of an example where $M$ is not complete and $r$ is not continuous, so it may also be that $r$ is continuous in this case as well.)
I'll give a proof. I use the phrase "$\gamma$ is a geodesic segment at $p$" to indicate that $\gamma$ is a unit speed geodesic map $\gamma: [0,L] \to M$, where $\gamma(0) = p$. Call $\gamma(L)$ is the endpoint of $\gamma$. $\gamma$ is minimizing if $d(\gamma(a), \gamma(b)) = |a-b|$ for all $a,b \in [0,L]$.
It's easy to see that the limit of a sequence of minimizing geodesic segments is a minimizing geodesic segment.
From this it follows easily that $r$ is upper semicontinuous, that is, that $$ \limsup_{p_n \to p} r(p_n) \leq r(p). $$ To see this, suppose otherwise; then there's some infinite sequence $p_n \to p$ with $r(p_n) > r(p) + \epsilon$. Fix a non-minimizing geodesic segment $\gamma$ at $p$ of length $r(p) + \epsilon$; we can write $\gamma$ as the limit of a sequence of geodesic segments $\gamma_n$ at $p_n$, all of length $r(p) + \epsilon$, and hence all minimizing; this leads to a contradiction.
Likewise, $r$ is lower semicontinuous. We wish to show $$ \liminf_{p_n \to p} r(p_n) \geq r(p). $$ Again suppose otherwise. Then there's an infinite sequence $p_n \to p$ with $r(p_n) < r(p) - \epsilon$. For each $n$ we can choose a non-minimizing geodesic segment $\gamma_n$ of length $r(p)$ at $p_n$. Let $\sigma_n$ be a minimizing geodesic segment from $p_n$ to $\gamma_n(r(p))$; by hypothesis, the length of $\sigma_n$ is no greater than $r(p) - \epsilon$. Passing to some subsequence of the $p_n$'s, we can assume that the $\gamma_n$ converge to some geodesic segment $\gamma$ at $p$ of length $r(p)$, and that the $\sigma_n$ converge to some geodesic segment $\sigma$ at $p$ of length $L \leq r(p) - \epsilon$. But $\sigma$ and $\gamma$ have the same endpoint, so $\gamma$ cannot be minimizing, a contradiction.