Solve for $y$, $\sin(x)=y+\cos(y)$

I’m helping a friend of mine solve an equation:

Solve for $y$, $\sin(x)=y+\cos(y)$

Substituting $y$ multiple times isn’t what he wants, he wants an exact explicit function. I tried doing $\sin(x)-y=\cos(y)$ and then trying to expand and solve, but it did nothing. Is this even possible? Graphing it in Desmos creates a function that doesn’t have the different y-values for the same x, but is it still possible?


Solution 1:

It's an explicit function in terms of x, but still an approximation though a good one: https://www.desmos.com/calculator/nuupo9dj9m

To prove this:

Level 1 approximation by substituting cos(y) with the first two terms of its Taylor Series: $$f(x,y)=y+\cos(y)-\sin(x)$$ $$f(x,y)≈y+(1-y^2/2)-\sin(x)$$ Equation to be solved in terms of y: $f(x,y)=0$ $$ ~ 0 = -y^2/2+y+(1-\sin(x))$$ Applying the quadratic equation to solve for y, we get: $$ y = 1-\sqrt{1+2(1-\sin(x))}$$ (considered the lower of the two roots)

Now we can use this level 1 approximation as a base for the newton's method to get better approximations: Original equation: $y+\cos(y)-\sin(x)=0$ $$y_{n+1}(x) = y_{n}(x)-\frac{f(x,y)}{\frac{\partial f(x,y)}{\partial y}}=y_n(x)-\frac{y+\cos(y)-\sin(x)}{1-\sin(y)}$$ We previously found $y_0(x) = 1-\sqrt{1+2(1-\sin(x))}$.

So $y_{0,1,2,...}(x)$, would look like: $$y_0(x) = 1-\sqrt{1+2(1-\sin(x))}$$ $$y_1(x) = 1-\sqrt{1+2\left(1-\sin x\right)}-\frac{1-\sqrt{1+2\left(1-\sin x\right)}+\cos\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)-\sin\left(x\right)}{1-\sin\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)}$$ $$\begin{split}y_2(x)=1-\sqrt{1+2\left(1-\sin x\right)}-\frac{1-\sqrt{1+2\left(1-\sin x\right)}+\cos\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)-\sin\left(x\right)}{1-\sin\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)}-\frac{1-\sqrt{1+2\left(1-\sin x\right)}-\frac{1-\sqrt{1+2\left(1-\sin x\right)}+\cos\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)-\sin\left(x\right)}{1-\sin\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)}+\cos\left(1-\sqrt{1+2\left(1-\sin x\right)}-\frac{1-\sqrt{1+2\left(1-\sin x\right)}+\cos\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)-\sin\left(x\right)}{1-\sin\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)}\right)-\sin x}{1-\sin\left(1-\sqrt{1+2\left(1-\sin x\right)}-\frac{1-\sqrt{1+2\left(1-\sin x\right)}+\cos\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)-\sin\left(x\right)}{1-\sin\left(1-\sqrt{1+2\left(1-\sin x\right)}\right)}\right)}\end{split}$$

The $y_n$ approximations keep getting better with each subsequent recursion.

Solution 2:

The solution is $y=y_1(\sin(x))$, where $y_1(t)$ is defined by equation $y_1(t)+\cos(y_1(t))=t$ for $t\in[-1;1]$.

The function $y_1(t)$ cannot be expressed in closed-form (without using special functions). Special functions are usually defined by equations or series, so one can consider $y_1(t)$ as "user-defined" special function.

One can easily obtain some properties of $y_1(t)$. This function is monotonically increasing.

EDIT: The function is not odd. The series of $y_1(t)$ can be found using expression for $y+\sin(y)$ case: $y_1(t)=-\frac{\pi}{2}+\frac{t+\pi/2}{2}+\frac{(t+\pi/2)^3}{96}+\frac{(t+\pi/2)^5}{1920}+\ldots$.