A numerical approach is developed to solve differential equations on an infinite domain, when the solution is known to possess a slowly decaying tail. An unorthodox boundary condition relying on the existence of an asymptotic relation for |y|≫1 is implemented, followed by an optimisation procedure, allowing to obtain an accurate solution over a truncated finite domain. The method is applied to −(−∆)γ/2u − u + up = 0 inR, a non-linear integro-differential equation containing the fractional Laplacian, and is easily expanded to asymmetric boundary conditions or domains of a higher dimension.