Let $g\in C(\Bbb R)$ be given, we want to find a solution $f\in C(\Bbb R)$ of the equation

$$ f(x+1) + f(x) = g(x). $$

We may rewrite the equation using the right-shift operator $(Tf)(x) = f(x+1)$ as $$ (I+ T)f=g. $$ Formally, I can say that the solution of this equation is

$$ f= (I+ T)^{-1} g. $$

Of course, I am aware that there are infinitely many solutions to the equation since the kernel of $(I+T)$ consists of all $h\in C(\Bbb R)$ such that $h(x+1)=-h(x)$, e.g. $\sin(\pi x)$, but please bear with me for a moment here.

By the theory of operator algebra, **if** $f,g$ are from some nice Banach space $X$ **and** our linear operator $T:X\to X$ satisfies $\|T\|<1$, then we have
$$
f = \left(\sum_{n=0}^\infty (-T)^n \right)g.
$$

However, it is not unreasonable to expect that we should have $\|T\|=1$ for a right-shift operator in most reasonable function spaces so let's try to solve the equation $$ f= (I+\lambda T)^{-1} g. $$ for $|\lambda| <1$ first then we'll take $\lambda\to 1$. Note that all the steps until now is purely formal since $C(\Bbb R)$ is not a normed space.

To illustrate what I meant, let's say we take $g(x) = (x+2)^2$. We now try to implement the above method (for $|\lambda|<1$) to get $$\begin{align} f(x) &= \left(I - \lambda T + \lambda^2 T^2 - \dots \right) g(x) \\ &= (x+2)^2 -\lambda (x+3)^2 + \lambda^2 (x+4)^2 + \dots \\ &= \left(1-\lambda+\lambda^2-\dots \right)x^2 + \left(2-3\lambda+4\lambda^2-\dots \right)2x + \left(2^2-3^2\lambda+4^2\lambda^2-\dots \right) \\ &= \frac{1}{1+\lambda} x^2 + 2 \frac{2+\lambda}{(1+\lambda)^2} x + \frac{4+3\lambda + \lambda^2}{(1+\lambda)^3}. \end{align}$$ We shall be brave here and substitute $\lambda=1$ even though the series doesn't converge there. This gives $$ f(x) = \frac 12 x^2 + \frac 32 x + 1 $$ but voilà, for some mysterious reasons unknown to me, this $f$ actually solves our original equation $f(x+1) + f(x) = (x+2)^2$ !

My question is simply:

What are the hidden theories behind the miracle we observe here? How can we justify all these seemingly unjustifiable steps?

I can't give you a reference to this method because I just conjured it up, thinking that it wouldn't work. To my greatest surprise, the answer actually makes sense. I am sure that similar method is probably practiced somewhere, probably by physicists.

**Remark**: I posted an isomorphic question on MSE earlier and one of the commenters mentioned that this could be related to the *holomorphic functional calculus* (HFC), specifically the part where I let $\lambda \to 1$. I once learned HFC just for an exam and don't have much memory of it so I don't immediately see if we can make the above method fully rigorous using merely the standard HFC or not.

oscillatory integralwould be the counterpart of what I am looking for in my question. $\endgroup$