Check whether $f \mapsto f+ \frac{df}{dx}$ is injective or surjective

Consider maps $C^{\infty} \to C^{\infty}$ s.t $f \mapsto f+ \frac{df}{dx}$. We have to check whether this map is injective or surjective.

My try: The map is clearly not injective as $x$ and $x+e^{-x}$ maps to $x+1$.

Now to check whether the map is surjective. Consider $g \in C^{\infty}$. Then I was thinking in this way that considering $\int_0^xg$ then $f=g-\int_0^xg$ now $f+\frac{df}{dx}=g-\int_0^xg+\frac{dg}{dx}-g=-\int_0^xg+\frac{dg}{dx}$ still I am not getting a proof whether it is surjective or not.


Checking surjectivity is the same as solving the ODE $f'+f = g$ for $f$ and seeing if you assume that $g$ is smooth, then $f$ is also smooth. This indeed happens, as we can solve the ODE by usual methods: since the solutions to $f'+f=0$ are of the form $f(x) = Ce^{-x}$, we try to look for general $f$ of the form $f(x) = C(x)e^{-x}$. Then $$g(x) = f'(x)+f(x) = C'(x)e^{-x}-C(x)e^{-x} + C(x)e^{-x} = C'(x)e^{-x}$$implies that $C(x) = \int e^xf(x)\,{\rm d}x$, and of course $$f(x) = e^{-x}\int_0^x e^tg(t)\,{\rm d}t$$is smooth if $g$ is.


Have you seen integrating factors before?

If you want $f^\prime(x) + f(x) = g(x)$, then multiplying by $e^x$ to get $$ (e^x f(x))^\prime =e^xf^\prime(x) + e^x f(x) = e^x(f^\prime(x) + f(x)) = e^xg(x)$$ should let you find an $f$ that works.