Check if $\sin(x) = O(x)$ for all real numbers

3.9k Views Asked by At

Check if $\sin(x) = O(x)$ for all real numbers

For this proposition to be true we must find such $C > 0$ that $$|\sin(x)| \le C|x|$$ But since it is known that $|\sin(x)| \le |x|$ it's enough to pick $C = 1$ and this works.
Is it the correct solution or I'm missing something? I have just learned about the big-O notation still don't feel comfortable with it.

1

There are 1 best solutions below

1
On BEST ANSWER

For the standard definition of $O$ used in computer science, a function $f(n)$ to be big $O$ of $g(n)$ as $n \to \pm \infty$, it must be the case that there exists $x_0 \in \Bbb R$ and $M >0$ such that for all $|x| \ge x_0$, $|f(x)| \le M|g(x)|$. That is, $f$ be bounded by a multiple of $g$ eventually as $x \to \infty$.

So certainly you could take $C = 1$ and then $|\sin x| \le 1\cdot|x|$ so $\sin(x) = O(x)$. But $\sin x + 1$ is also $O(x)$ even though $|\sin 0 + 1| \not\le C|0|$ for any $C > 0$. It doesn't matter what happens to your function at small values of $x$, just as $x \to \infty$. (So we may, for example take $C =1$ and $x_0 = 1$ and $|\sin x| \le 1 \le 1|x|$ for all $|x| \ge |x_0|$.) Also $\sin x$ is in fact $O(1)$, even ($C = 1$ would work.)


As mentioned in the comment's by ClementC and the Wikipedia page, big $O$ notation can also be used as $x \to a$ for any real number $a$. ($a = 0$ is used quite commonly in numerical analysis and physics.) If what you mean when you said $\sin x = O(x)$ "for all all real numbers" was to find if $\sin x = O(x)$ as $x \to a$ for every $a \in \Bbb R$, then your global bound $|\sin x| \le |x|$ does indeed establish this.