Finding the solutions of $\cos (x) +x = a$ What is the approach to finding the solutions of the following function? I was not able to analytically resolve the solutions - but rather resorted to a graphical approach.
$$\cos (x) + x = 1$$
or in general where $a$ could be any real number,
$$\cos(x) + x = a.$$
EDIT: 
Or when more than one solution exists. 
$$\cos (\pi x) + x = a.$$

Numerical root finding is a perfectly good way to go. If you want to solve 
$\cos (x) + x = a$
you can do a little shuffling to get
$a - \cos(x) = x$
Since $\cos(x)$ will be a number between $-1$ and $1$, you know that that $a - \cos(x)$ will be between $a-1$ and $a + 1$. That means that the $x$ you're looking for must be in the interval $[a-1, a+1]$. Once you know that, a few steps of bisection followed by Newton's method should get you a very accurate answer very fast. 
