Differentiability of $t \mapsto \mathbb E_{u,v}[f(u)f(tu+(1-t^2)^{1/2}v)]$ given that $f$ is continuously-differentiable almost-everywhere. 
*

*Fix two integers $k\ge 1$ and $n \ge 2$.

*Define $S_{n-1} := \{x \in \mathbb R^n \mid \|x\|_2 = 1\}$, the unit-sphere on $\mathbb R^n$

*Let $a,b:[-1,1] \times S_{n-1} \to \mathbb [-1,1]$ be functions which are on $[-1,1] \times S_{n-1}$ and $t \mapsto a(t,x)$ and $t \mapsto b(t,x)$ are $k$ times continuously-differentiable on $(-1,1)$, for every $x \in S_{n-1}$.

*

*An example of a pair of functions verify these conditions is given by $a(t,x):=x_1$ and $b(t,x) := tx_1+(1-t^2)^{1/2}x_2$, for any $x=(x_1,\ldots,x_n) \in S_{n-1}$.



*Let $f:[-1,1] \to \mathbb R$ be a function which is almost-everwhere $k$ times continuously-differentiable on $(-1,1)$. Recall that this means there exists a measurable set $B$ such that

*

*The Lebesgue measure of $B$ is $0$.

*For any $t$ not in $B$, $f$ is $k$ times continuously-differentiable on an open neigborhood of $t$.



An example of a function verifying this condition is given by $f(t):=\max(t,0)$.

*

*Let $X$ be uniformly distributed on $S_{n-1}$, and define a function $g:[-1,1] \to \mathbb R$ by
$$
g(t) := \mathbb E_X[f(a(t,X))f(b(t,X)].
$$

Question. Is it true that $g$ is $k$ times continuously-differentiable on $(-1,1)$ ?

Note. I'm really only interested in the case where $f$ is $k$ times continuously-differentiable on $(-1,1)$, except for a finite number of points (e.g the case where $f(t) := \max(t,0)$).
 A: The answer is no. Let $b(t,x) \equiv 1$,  $a(t,x) = t$ and set $f(t) := \max(t,0)$. Then $g(t) = f(t)$, which is not continuously differentiable in $0$.
A: Consider the case where $a(t,x) = x_1$ and $b(t,x) := tx_1 + (1-t^2)^{1/2}x_2$. For simplicity, define $F(t,x) := f(a(t,x))f(b(t,x))=f(x_1)f(tx_1+(1-t^2)^{1/2}x_2)$.


Assumption. (1) $f$ is differentiable everywhere except at $0$.
$f$ is Lipschitz continuous on $(-1,1)$.

Under the above assumptions, let's proof the following

Claim. $g$ is differentiable on $(-1,1)$ with derivative $g'(t)=\mathbb E_X[F'(t,X)1_{X \in E_t}]$, where $E_t$ is the null set defined by
$$
E_t := \{x \in S_{n-1} \mid tx_1+(1-t^2)^{1/2}x_2 \ne 0\}.
$$

Proof. For $t \in (-1,1)$ and $\epsilon>0$ sufficiently small that $[t-\epsilon,t+\epsilon] \subseteq (-1,1)$, consider the event
$$
E_{t,\epsilon}:=\{tX_1+(1-s^2)^{1/2}X_2 \ne 0 \,\forall s \in [t-\epsilon,t+\epsilon]\}.
$$
Note that $E_{t,\epsilon}$ is a decreasing sequence of (measurable) sets with
$$
\lim_{\epsilon \to 0^+}E_{t,\epsilon} = E_t:= \{tX_1+(1-t^2)^{1/2}X_2 \ne 0\},
$$
an event which occurs with probability $1$.

Fact 1. For any $t \in (-1,1)$ and for sufficiently small $\epsilon>0$, we have $\mathbb P(E_{t,\epsilon}) \le 1 - \mathcal O(\epsilon)$, where the constants only depend on $t$. In fact, one can show that
$$
\mathbb P(E_{\epsilon,t}) = 1-\dfrac{2}{\pi(1-t^2)^{3/2}}\epsilon+\mathcal O(\epsilon^3).
$$

(The above statement is proved here https://mathoverflow.net/a/406943/78539)
Now, for $z \in \{\pm \epsilon\}$, can split
$$
\frac{g(t+z)-g(t)}{z} = \mathbb E_X\left[\frac{F(t+z,X)-F(t,X)}{z}1_{E_{t,\epsilon}}\right] + \mathbb E_X\left[\frac{F(t+z,X)-F(t,X)}{z}1_{E_{t,\epsilon}^c}\right].
$$
Let $M_t:=\sup_{x \in S_{n-1}}|a'(t,x)|$. Note that $M_t \le 1+(1-t^2)^{1/2} < \infty$. We deduce from Assumption 2 that for $x \in S_{n-1}$ the function $t \mapsto F(t,x)$ is $M_t|f(x_1)|$-Lipschitz. Thus,
$$
\sup_{x \in S_{n-1}}\left|\frac{F(t+z,x)-F(t,x)}{z}\right| \le M_t|f(x_1)| \le CM_t,
\tag{1}
$$
where the last inequality is because $f$ is continuous and therefore bounded on $[-1,1]$. We may apply the Dominated Convergence Theorem to get
$$
\begin{split}
\lim_{z \to 0}\frac{g(t+z)-g(t)}{z}1_{E_{t,\epsilon}} &= \mathbb E_X\left[\lim_{z \to 0}\frac{F(t+z,X)-F(t,X)}{z}1_{E_{t,\epsilon}}\right]\\
&= \mathbb E_X\left[\left(\lim_{z \to 0}\frac{F(t+z,X)-F(t,X)}{z}\right)\left(\lim_{z \to 0}1_{E_{t,\epsilon}}\right)\right]\\
&=\mathbb E_X[F'(t,X)1_{E_t}]=\mathbb E_X[F'(t,X)].
\end{split}
$$
On the other hand, (1) gives
$$
\begin{split}
\left|\frac{g(t+z)-g(t)}{z}1_{E_{t,\epsilon^c}}\right| &= \left|\mathbb E_X\left[\frac{F(t+z,X)-F(t,X)}{z}1_{E_{t,\epsilon}^c}\right]\right|\\
&\le \mathbb E_X\left[\left|\frac{F(t+z,X)-F(t,X)}{z}\right|1_{E_{t,\epsilon}^c}\right]\\
&\le CM_t\cdot\mathbb E_X[1_{E_{t,\epsilon}^c}] = CM_t\cdot \mathbb P(E_{t,\epsilon}^c) = \mathcal O(\epsilon) \overset{z \to 0}{\longrightarrow} 0,
\end{split}
$$
where the last step is thanks to Fact 1. $\quad\quad\quad\quad\Box$
