Big-O, what do I need the $|x-a|<\delta$ for? I'm using the following definition for Big-O:

$f(x)$ is $O(g(x))$, when $x \rightarrow a$, if  $\exists \space M > 0$ and $\delta > 0$ s.t. $|f(x)| \leq M|g(x)|$ when $|x-a| < \delta$

Now for example for the function $f(x)=xsin(x)$ it's easy to show that:
Let $M = 1$.
Then $\forall x \in \mathbb{R}$
$$|f(x)| = |x||sin(x)|≤|x|\cdot 1=M|x|$$
i.e. $f(x)$ is $O(x)$, when $x \rightarrow 0$.
But what did/do I need the $\delta$ and the inequality $|x-0|=|x|< \delta$ for?

Let $f: \mathbb R \to \mathbb R$ be defined by 
$f(x)= \begin{cases} 
      5x & x \in [-1,1] \\
      x^3 &\textrm{for}\,,  |x|>1\\
   \end{cases}$
Then $f=O(x)$ at $0$,(or as $x \to 0$), but not outside of this interval, the important thing, is that it is $O(x)$ when you are sufficiently close to $0$. The definition allows you to say something about local properties for functions such as this one, even if it acts oddly far away from the point in question.
