# Is $f(x)=\frac{\sin x}{x}$ for all $x\neq 0$ differentiable?

The function $f(x)$ is defined by $$f(x)=\frac{\sin x}{x}$$ for any $x≠0$. For $x=0$, $f(x)=1$.

My work:

Determine if the function is continuous, differentiable and if the latter, find its derivative at $0$.

$$f(x) =\begin{cases}\dfrac{\sin x}{x}, & x \ne 0 \\ 1 & x = 0 \end{cases}$$

I proved the continuous condition using L'Hopital's rule on the following

\begin{equation} f(0) = \lim_{x\to 0} \frac{\sin x}x = 1 \end{equation}

For the defferentiable condition I think I proved it

\begin{align*} \lim_{x\to0} \frac{f(x) - f(0)}{x-0} &= \lim_{x\to0} \frac{\frac{\sin x}x - 1}{x-0} \\ &= \lim_{x\to0} \frac{\sin x - x}{x^2} \\ &= \lim_{x\to0} \frac{\cos x-1}{2x} \\ &= \lim_{x\to0} \frac{-\sin x}{2} \\ &= 0 \end{align*}

Now the derivative of $f(x)$ is \begin{equation} \frac{x\cos x - \sin x}{x^2} \end{equation}

But what does it mean "find its derivative at $0$" ?

The only thing that came to my mind is to find its limit as $x\to 0$

\begin{equation} \lim_{x\to0}\frac{x\cos x - \sin x}{x^2} = 0 \end{equation}

Did I understand and do everything correctly?

• The derivative at $0$ is equal to the limit: $$\lim_{x\to 0} \frac{f(x)-f(0)}{x-0}$$ Which you've already proven to be equal to 0. – Kitegi Feb 16 '16 at 0:01
• Use \to to show $\to$. Formatting tips here. – Em. Feb 16 '16 at 0:05

The function defined by

$$f(x)=\begin{cases}\frac{\sin(x)}{x}&,x\ne 0\\\\1&,x=0\end{cases}$$

is not only differentiable at $$x=0$$, it is continuously differentiable there.

NOTE:

I thought it would be instructive to present a way forward that relies only on a standard, elementary inequality and the squeeze theorem. To that end, we proceed.

The derivative at $$x=0$$ is given by

$$f'(0)\equiv \lim_{h\to 0}\frac{\frac{\sin(h)}{h}-1}{h} \tag 1$$

Recalling from elementary geometry that the sine function satisfies the inequalities

$$\cos(h) \le \frac{\sin(h)}{h}\le 1 \tag 2$$

for $$|x|\le \pi/2$$, we see that the term under the limit in $$(1)$$ satisfies the inequalities

$$-2\sin^2(h/2)= \cos(h)-1\le \frac{\sin(h)}{h}-1\le 0 \tag 3$$

Then, taking absolute values, dividing by $$|h|$$, and using the right-hand side inequality in $$(2)$$ yields

$$0 \le \left|\frac{\frac{\sin(h)}{h}-1}{h}\right|\le \frac12 |h| \tag 4$$

whereupon applying the squeeze theorem to $$(4)$$ produces the limit

$$\lim_{h\to 0}\frac{\frac{\sin(h)}{h}-1}{h}=0$$

Therefore, $$f'(0)=0$$.

For $$x\ne 0$$, we have

$$f'(x)=\frac{x\cos(x)-\sin(x)}{x^2}$$

To see that $$f'(x)$$ is continuous at $$x=0$$, we need to show that

$$\lim_{x\to 0}\frac{x\cos(x)-\sin(x)}{x^2}=0$$

Again, using $$(2)$$ we see that

$$0\le \left|\frac{x\cos(x)-\sin(x)}{x^2}\right|\le\left|\frac{1-\cos(x)}{x}\right| \le \frac12 |x| \tag 5$$

whereupon applying the squeeze theorem to $$(5)$$ produces the limit

$$\lim_{x\to 0}\frac{x\cos(x)-\sin(x)}{x^2}=0$$

Therefore,

$$\lim_{x\to 0}f'(x)=0=f'(0)$$

which shows that $$f'$$ is continuously differentiable at $$0$$.