I have a code that converts x into y using the formula: $y=x+B\sin(x+A)$
with $x, A$ and $B$ known values. $B$ is also very small so that $B\sin(x+A) < 0.035$.
The problem is that in another system I need to revert this operation. So given y, I need to get the original x.
I tried to do: $n=y-B\sin(y+A)$
which provides a good approximation (since y is close to x) but I was wondering if there is a way to get the exact value so that n==x.
I also tried wolframalpha but it didn't help.
Get rid of $a$ with $$y+a=x+a+b\sin(x+a)$$
which is
$$y=x+b\sin(x)$$
after redefinition of the variables.
As $b$ is tiny (in fact it suffices that $|b|<1$), the RHS is monotonic and there is a single solution
$$x\approx y.$$
You can refine it by Newton, and the next approximation is
$$x\approx y-\frac{b\sin(y)}{1+b\cos(y)}.$$