Find all the functions such that $$ f'(x)+f(-x) = 0$$
Attempt
I tried using mean value theorem to substitute $$a=f'(c) = \frac{f(x)-f(-x)}{2x}$$but this strategy failed when I tried to integrate it over the course of the attempt since $f'(c)$ does depend on $x$.
Can somebody provide me an appropriate substitution to solve this question?
While taking the derivative of the equation is a quick way to solve this, you can also obtain this answer without assuming that $f$ is twice differentiable -- you're given a first order differential equation for $f$, which in itself only implies that $f$ is continuously differentiable, not more.
The key is to realise that you can write every function (also non-differentiable ones) as a sum of a symmetric and an antisymmetric function: $$ f(x) = f_s(x) + f_a(x),\tag{1} $$ where $f_s(-x) = f_s(x)$ and $f_a(-x) = - f_a(x)$. You can easily show this by writing $$ f_s(x) = \frac{f(x)+f(-x)}{2}\quad\text{and}\quad f_a(x) = \frac{f(x) - f(-x)}{2}. \tag{2} $$ It's also important to realise that this splitting is unique.
We can use this symmetric/antisymmetric splitting as follows. We have $$ f(-x) = f_s(-x) + f_a(-x) = f_s(x) - f_a(x) \tag{3} $$ and $$ f'(x) = f_s'(x) + f_a'(x). \tag{4} $$ Now, we use the observation that the derivative of a symmetric function is antisymmetric, and vice versa; you can also derive this fact using $(2)$. Because the symmetric/antisymmetric splitting is unique, we know that the symmetric part of $(3)$ must be equal to minus the symmetric part of $(4)$, and the same holds for the antisymmetric part. So, we have \begin{align} f'_a(x) &= - f_s(x) \quad\text{(symmetric parts)},\\ f'_s(x) &= f_a(x) \quad\text{(antisymmetric parts).} \end{align} Now we can call $f_s(x) = y(x)$ and $f_a(x) = z(x)$, and we have \begin{align} y' &= z,\\ z' &= -y, \end{align} which a) implies that $y$ and $z$ are indeed twice differentiable, and b) is easy to solve, because it is just the harmonic oscillator. Since $y$ is symmetric and $z$ is antisymmetric, we have $$ y(x) = y_0 \cos(x)\quad\text{and}\quad z(x) = z_0 \sin(x), $$ so $$ f(x) = y_0 \cos(x) + z_0 \sin(x). \tag{5} $$ You can now find a relation between $y_0$ and $z_0$ by substituting $(5)$ into the original equation $f'(x) + f(-x) = 0$.