Does the equation $ \sin(x)-x+1=0 $ have any roots? I plotted the graph of the function and it has a root at x=1.93, so it has exactly one root. I think that the Intermediate Value Theorem  theorem would be useful to find the root, but how can I do this?
 A: The theorem you are looking for is the Intermediate Value Theorem (which is probably what you meant by middle value theorem). 
Since $f(x) = \sin(x) - x + 1$ is continuous, it suffices to find values of $x$ for which $f(x)$ is positive and negative. Then there will be a root between.
Note that $f(0) = 1 >0$ and $f(\pi) = 1 - \pi < 0$. Therefore there is a root between $0 \text{ and } \pi$.
Edit: Arthur raises a good point. I didn't explain how to get an approximation for the root. To do so, we will employ the bisection method (which is essentially repeatedly using the Intermediate Value Theorem).
We know that there is a root in the interval $(0, \pi)$. Cut this interval in half. The midpoint is $\frac{\pi}{2}$. $f(\frac{\pi}{2}) = 2 - \frac{\pi}{2} > 0$. Since $f$ is positive at $\frac{\pi}{2}$ and negative at $\pi$, the Intermediate Value Theorem tells us that $f$ has a root in $(\frac{\pi}{2},\pi)$. So we have narrowed down the interval where our root lies. If you repeat this process, you can estimate a root of $f$ with arbitrary accuracy.
A: $\sin(x)$ is always bounded between $-1$ and $1$, hence all the real solutions of $\sin(x)=x-1$ have to lie in the interval $[0,2]$. Over such interval we have $\sin(x)\geq 0$, hence all the real solutions of $\sin(x)=x-1$ have to lie in the interval $[1,2]$. Over such interval $\sin(x)\geq\sin(1)\geq\frac{4}{5}$, hence all the real solutions of $\sin(x)=x-1$ have to lie in the interval $I=\left[\frac{9}{5},\frac{10}{5}\right]$. Over such interval $\sin(x)$ is a concave and decreasing function, while $x-1$ is a convex and increasing function. Since $\sin(x)-x+1$ takes opposite signs at the endpoints of $I$, there is a single real solution of $\sin(x)=x-1$ and it lies in $I$. By Newton's method and convexity, the iteration given by
$$ x_0=2,\qquad x_{n+1}=x_n-\frac{\sin(x_n)-x_n+1}{\cos(x_n)-1} $$
converges monotonically and quadratically to such a root, $\approx 1.93456321$.
A: Let $f(x)=\sin(x)-x+1$
$\forall x\in (0,\pi) f'(x)=\cos(x)-1<0.$
$f$ is strictly decreasing at $(0,\pi).$ 
thus, there is only one root in $(0,\pi).$
A: 
This $\texttt{C++}$ script makes the job $\left(~Bisection\ Method~\right)$ with $\,\mathrm{f}\left(\,x\,\right) \equiv \sin\left(\,x\,\right) - x + 1$. It yields:


Iterations = 52
root = 1.93456321075202;   f(root) = 0


// bisection0.cc Felix Marin 26-oct-2016.
#include <cfloat>
#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;

inline double f(double x) { return sin(x) - x + 1.0; }

inline int result(double m,double fm,size_t iter) // iter: iterations.
{
 cout<<"Iterations = "<<iter<<endl;
 cout<<"root = "<<m<<";   f(root) = "<<fm<<endl;
 return 0;
}

inline signed char sign(double x) { return (x > 0) - (x < 0); }

int main()
{
 double   a = 0;
 double  fa = f(a); 
 const signed char sfa = sign(fa);
 cout<<setprecision(15);
 if (sfa == 0) return result(a,fa,0);

 double   b = 2.0;
 double  fb = f(b); 
 const signed char sfb = sign(fb);
 if (sfb == 0) return result(b,fb,0);

 double mAnt = (abs(fa) < abs(fb)) ? a:b;
 double m,tol;
 signed char sfm;
 size_t n = 1;
 do {
     m = (a + b)/2.0;
     sfm = sign(f(m));
          if (sfm == sfa) a = m;
     else if (sfm == sfb) b = m;
     else                 return result(m,f(m),n);
     tol = abs((mAnt + m)/2.0);
     tol = (tol > 0) ? (abs(m - mAnt)/tol):abs(m - mAnt);
     if ((tol < DBL_EPSILON) || (++n == 1000U)) break;
 } while (true);

 return result(m,f(m),n);
}

