# How to solve a non-local self-consistent equation

I have been struggling lately with solving numerically an equation of the form:

$$g(x\pm x_{0}) = F[ g(x) ]$$

where $$g(x)$$ is a matrix satisfying the condition $$g(x\to\pm\infty)=0$$. My question is on how does one solve this recursively. I am running over some predefined sets $$S=\{x_{n}\}_{n=1}^{N}$$ of arguments where the function is supposed to be evaluated, so ideally the algorithm should run over a loop that yields: $$g(x_{1}\pm x_{0})$$ $$g(x_{2}\pm x_{0})$$ $$\vdots$$ $$g(x_{N}\pm x_{0})$$

in this order with $$x_{1} for $$x<0$$ $$\forall x\in S$$ and $$x_{1}>x_{2}> ... >x_{N}$$ for $$x>0$$ $$\forall x\in S$$. Any help would be greatly appreciated thanks!

Edit: For clarity, consider the example:

$$A(x-x_{0})=B(x) + C(x)A(x)D(x)$$ and we know $$A(x\to\infty)=0$$ and B,C,D are matrices that also depend on $$x$$.

More of an example:

Let's say I start with a value $$x = -a<0$$. My desired goal is to calculate a matrix product for that specific value of x that has the form $$M(x) = inv( D(x) + T(x)g_{1}(x - x_{0})C(x) + S(x)g_{2}(x+x_{0})P(x) )$$ where all quantities are matrices but the only unknown ones are $$g_{1},g_{2}$$. Note that $$g_{1},g_{2}$$ represent two different matrices. Now, what we know about these matrices is that they satisfy $$g_{1,2}(x \to \pm \infty) = 0$$. And, additionally, the recursion relation of each of them ( $$g_{1}$$ and $$g_{2}$$) has the form written in the edit. More specifically:

$$g_{1}(x-x_{0}) = H( g_{1}(x) )$$ $$g_{2}(x+x_{0}) = H(g_{2}(x))$$

and both need to be evaluated for that specific value of $$x=-a$$. My question is on how to do that, since eventually, I want to do it not only for $$x=-a<0$$, but for an entire grid of $$\{x\}$$ that includes both positive and negative values.

• What is the meaning of $\pm$ in your $x\pm x_0$? Do the signs generate two different equations that have to be considered simultaneously? If not, choose $x+x_0$ for example and rewrite your equation as the recurrence $g(x) = F[g(x-x_0)]$. Then, assigning an arbitrary value to $g(x)$ on the interval $[a,a+x_0)$, the recurrence uniquely defines $g(x)$ for any $x>a+x_0$. – Igor Khavkine May 6 at 16:41
• Thanks for the quick reply. The $\pm$ sign represent independent cases. For a fixed value of $x$, I want to solve for the case $x-x_{0}$ and $x+x_{0}$. – user2261553 May 6 at 16:47
• So I guess my suggestion was not what you were looking for? But then your "for clarity" edit writes exactly the same kind of equation as I wrote. There's still something not very clear about the question. What is known (the input to the problem) and what is unknown (the desired output) about $g(x)$? – Igor Khavkine May 6 at 19:24
• Aha, the problem is that the recurrence relation leaves $g_1$ and $g_2$ highly underdetermined, unless their values are known on some interval of width $x_0$. It seems that you want to fix that underdeterminacy by the boundary conditions $g_{1,2}(x\to\pm \infty) = 0$. That might work, but it means that you need to solve the recurrence relation on the entire real line (or at least an infinite sub-grid) before being able to determine the value of $g_{1,2}(x)$ at any given $x$. So there is no algorithm that will give you the solution that involves only finitely many points $\{x_n\}_{n=1}^N$. – Igor Khavkine May 7 at 10:43
• So a proposed solution was to start with the boundary condition as initial value, and then iterate the solution, but I am having serious difficulties trying to understand this and how this might work numerically. Because what I want to do eventually is to evaluate $g_{1,2}$ on my fixed set of points $\{\x_{n}}$ to later carry out the matrix product, which has to be one to one, that is, for a fixed value of $x$ of my original grid $\{x_{n}\}$ I want to know $g_{1}(x-x_{0})$ in order to carry out the products. – user2261553 May 7 at 16:27