TITLE: how to get a nice "cosine looking" curve following the y=x direction?
QUESTION [8 upvotes]: My aim is to get a "cosine looking" curve rotated 45° counterclockwise. 
When I graph : g(x)= x + cos(x) , I get a curve that has lost the nice and regular wavering of the ordinary  f(x)= cos(x) curve. 
Adding a coefficient does not work, but rather aggravates the change of form. 
Is there a possible equation that would produce the curve I am aiming at? 
Thanks for your help.

REPLY [4 votes]: As pointed out by user76284 in a comment, this can be done by writing an equation like $y-x=\cos(x+y)$. This form helps us to understand why we can't write down a closed-form equation for $y$ in terms of $x$, using only elementary functions. Such an equation would be a solution to a transcendental equation, which normally can't be expressed in this way. It also shows how we could probably write down a closed-form equation if we were willing to resort to special functions. For example, I would guess that you could write this function in terms of the Lambert W function or something similar.