$f'(x)=f(\cos(x))$

Let $x_0\in(0,\pi)$ be the solution to $x_0 = \cos(x_0)\approx 0.739$. If we let $$ f(x) = \sum_{n=0}^\infty a_n(x-x_0)^n $$ and expand the differential equation in power series, we get $$ \sum_{n=0}^\infty (n+1)a_{n+1}(x-x_0)^n = \sum_{n=0}^\infty a_n(\cos(x)-x_0)^n = \sum_{n=0}^\infty a_n(x-x_0)^n\left[\frac{\cos(x)-\cos(x_0)}{x-x_0}\right]^n. $$ Now $([\cos(x)-\cos(x_0)]/[x-x_0])^n$ can itself be written as some power series $\sum_{m=0}^\infty b_{mn}(x-x_0)^m$. So we have $$ \sum_{n=0}^\infty (n+1)a_{n+1}(x-x_0)^n =\sum_{n=0}^\infty a_n(x-x_0)^n\left[\frac{\cos(x)-\cos(x_0)}{x-x_0}\right]^n \\= \sum_{n=0}^{\infty}\sum_{m=0}^\infty a_nb_{mn}(x-x_0)^{n+m}= \sum_{k=0}^\infty \left[\sum_{n=0}^ka_nb_{(k-n)n}\right](x-x_0)^k. $$ Swapping the dummy indices $k$ and $n$ then gives a recursion relation for the coefficients: $$ a_{n+1} = \frac{1}{n+1}\sum_{k=0}^n a_kb_{(n-k)k}. $$ Unfortunately I'm not aware of a nice expression for the $b_{mn}$. Calculating the first 30 terms numerically and taking advantage of symmetry gives me this for $f(x)$

f(x)

and a comparison of $f'(x)$ (blue) with $f(\cos(x))$ (yellow)

f'(x) vs f(cos(x))

The series matches up well out until about $x_0 + 1.4$, and applying the root test to the coefficients suggests it has a finite radius of convergence of about $1.8$, so I think this is getting the right solution. This is consistent with a function that has a singularity at $i\pi/2$, so it's possible there's a global solution on $\mathbb R$ that this method can't quite catch. All other solutions are constant multiples of this one (which is $f(x_0) = 1$).

EDIT: Actually, since this method does give $f(x)$ for $x\in [-1,1]$, we have $f(\cos(x))$ for all $x\in \mathbb R$. We should be able to get the function on the rest of $\mathbb R$ by just integrating $f(\cos(x))$. This gives a function of the form $f(x) = f(0) + f(0)x + g(x)$, where $g(x)$ is some oscillatory function with period $2\pi$ and average value $0$ that looks sort of like $\sin(x)$. Not sure how much better we can do analytically.