For a convex function $f: \mathbb{R} \to \mathbb{R}$, define the Moreau envelope
$$f_{\mu}(x) = \inf_y \left\{ f(y) + \frac{1}{2\mu} (x-y)^2 \right\}$$
and the proximal operator
$$\text{prox}_{\mu f}(x) = \text{arg min}_y \left\{ f(y) + \frac{1}{2\mu} (x-y)^2 \right\}$$
Prove: $\text{prox}_{\mu f}(x) = x - \mu \frac{df_{\mu}(x)}{dx}$
I'm looking for a proof that uses just basic calculus and avoids concepts from optimization theory such as conjugates, etc.
What I've tried:
$$f_{\mu}(x) = \frac{x^2}{2\mu} + \frac{1}{\mu} \inf_y \left\{ \mu f(y) + \frac{y^2}{2} - xy \right\}$$
so $$\frac{df_{\mu}(x)}{dx} = \frac{x}{\mu} + \frac{1}{\mu} \frac{dg(x)}{dx}$$
At this point, it appears the next step would be to show that the derivative of
$$g(x) = \inf_y \left\{ \mu f(y) + \frac{y^2}{2} - xy \right\}$$
should be $$\frac{dg(x)}{dx} = -\text{arg min}_y \left\{ \mu f(y) + \frac{y^2}{2} - xy \right\} \\ = -\text{arg min}_y \left\{ \mu f(y) + \frac{y^2}{2} - xy + \frac{x^2}{2} \right\} = -\mu \text{prox}_{\mu f}(x)$$
where the second equality holds because we're just adding a constant. From here on its just a matter of rearranging the variables. But why is the first equality true?
I'm not sure about the approach you've taken, but we know by the envelope theorem that
$$ \frac{\mathrm d f_\mu}{\mathrm d x} = \frac 1 \mu \left[ x - \text{prox}_{\mu f}(x) \right]. $$
The result you wish to prove is then just a matter of rearrangement.
The version of the envelope theorem I'm appealing to is as follows. Suppose we have the following minimisation programme
$$ V(a) = \min_{x \in X} f(x,a). $$
Let $$ x^*(a) = {\arg\min}_{x\in X} f(x,a). $$
Then,
$$ \frac{\mathrm d V}{\mathrm d a} = \left.\frac{\partial f}{ \partial a}\right\vert_{x=x^*(a)}. $$