I'm using a very simple numerical method to find solutions to an equation. Start with an equation $\operatorname{f}(x)=0$ that you need to solve. Rearrange to give $x=\operatorname{g}(x)$ and then use the recurrence relation $x_{n+1} = \operatorname{g}(x_n)$ to hopefully tend towards a solution.
I'm trying to find an interesting example where starting with $x_0 < \ell$, but very close to $\ell$, gives a sequences tending towards one limit, while starting with $x_0 > \ell$, but very close to $\ell$, gives another. (Where $\operatorname{f}(\ell) \neq 0)$ I can find unintesting examples where negative $x_0$ gives a negative limit and positive $x_0$ gives a positive limit.
Can anyone suggest an interesting example. For example, for some $x_0 > 2$, very close to $2$. gives a sequence tending towards a negative limit and for some $x_0 < 2$, very close to $2$ gives a sequence tending towards a positive limit.
EDIT: I am looking for a single, smooth function $\operatorname{g}$. I want a good old-fashioned elementary function. If possible, a polynomial or rational function would be great.
Let try to take it stepwise.
As your title says, I guess you are seeking for some type of (deterministic) chaotic behaviour on a one-dimensional iterative process that sends from $\Bbb R$ to $\Bbb R$. Also I guess this because you are seeking for initial condition sensitivity as is in deterministic chaos a prrequisite.
For such system behaviour, necessary is:
(1) that $g$ is non-linear with respect to $x_n$ and/or some $x_{n-i}$ (associative memory) where $i<n$ and a positive integer
(2) that there are at least $2$ discrete elementary modes (better $3$); an intuition would be to have the second mode either via memory constructed into the non-linear memory parts $x_{n-i}$ or if not possible then as a separate variable or variables, then $\overrightarrow x_n$ a vector (this possibly fits to your case).
An alternative would be indeed to try a fractal version where a process sends from $\Bbb C$ to $\Bbb C$, complex domain.
Are these conditions something you could accept in your approach?
A posterior
what the answer distinguishes is not an issue of the Real domain, rather key is the fact that your proposition seems to pursue only one elementary mode, chaos is provoked by a certain type of self organisation at higher order that demands at least 2-3 elementary modes that cooperate in this self-organisation process. A one-modal equation will not provide this precondition.
Either you would need more dimmensions via a vector over Real e.g.
$$\overrightarrow x_{n+1}(=[x_{n+1,1},x_{n+1,2},x_{n+1,3},\dots]^T)=\overrightarrow g(x_{n,1},x_{n,2},x_{n,3},\dots)$$
or such memory over the Real e.g.
$$x_{n+1}(=[x_{n},x_{n-1},x_{n-2},\dots]^T)=g(x_{n},x_{n-1},x_{n-2},\dots)$$
or both and in both case $g$ a proper non-linear function. Your case probably would possibly fit in (2).
In case you regard (2) suggest you have a look on the simple example of the logistic map.
Hope that the above Latex Art works is correct.