What is the derivative of this piece wise function at $x=0$?

97 Views Asked by At

I was to find the derivative at $x=0$.

$$f(x) = \begin{cases} \dfrac{1-\cos(x)}{x}, & \text{if $x\ne 0$} \\ 0, & \text{if $x$ is equal to zero} \end{cases}$$

I approached the solution by taking the following limit as for the derivative of the above function to exist at $x=0$, the limit must have existed.

$$\lim \limits_{h \to 0}\frac{f(x+h)-f(x)}{h} =\lim \limits_{h \to 0}\frac{\frac{1-cos(x+h)}{x+h}-0}{h}.$$

Put $x=0$, and simplify and we get this:

$$\lim \limits_{h \to 0}\frac{1-\cos(h)}{h^2}$$

Now apply the limit and we get the following fraction:

$$\frac{1-1}{0}=\frac{0}{0}=\infty.$$

So, the limit clearly doesn't exist and so as far as I can tell, the derivative of the function at x=0 also doesn't exist.

But you know what? I got zero on that question and the teacher won't tell me anything but to keep practicing to get better.

Help me understand please.

3

There are 3 best solutions below

2
On BEST ANSWER

$$\frac00$$ is not infinity. If I take any number $x$ and multiply by $0$, then I get $0$. So we say that $0/0$ is undefined.

Here are the rules.

Suppose that $f(x)\to a$ and $g(x)\to b$.

  • If $b\ne 0$, then $\frac{f(x)}{g(x)}\to\frac{a}{b}$

  • If $a\ne 0$ and $b=0$, then $\frac{f(x)}{g(x)}\to\infty$

  • If $a=0$ and $b=0$, then we can't immediately say anything about the limiting behaviour of $\frac{f(x)}{g(x)}$. In this case, it can be useful to use L'Hôpital's rule:

If $f(x)\to 0$ and $g(x)\to 0$ and if the derivatives of $f,g$ exist in a neighbourhood of $0$, then

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

as long as the second limit exists.

0
On

$$\lim \limits_{h \to 0}\frac{1-\cosh}{h^2}=\frac{1}{2}$$ since $\cos h=1-\frac{h^2}{2}+o(h^2)$ by taylor's theorem.

0
On

An argument, via L'Hospital's rule, is as follows: Note that at zero, $\frac{1-\cos(h)}{h^2}$ is an indeterminate form of the type $0/0$. So we can apply L'Hospital to get $$ \lim_{h\to 0} \frac{1-\cos(h)}{h^2} \overset{\text{LH}}{=} \lim_{h\to 0} \frac{\frac{\mathrm{d}}{\mathrm{d} h} (1-\cos(h))}{\frac{\mathrm{d}}{\mathrm{d} h} h^2} = \lim_{h\to 0} \frac{\sin(h)}{2h} = \frac{1}{2} \lim_{h\to 0} \frac{\sin(h)}{h} = \frac{1}{2}. $$


A more elementary approach is the following: recall the half-angle formula $$ \cos(2\theta) = 1 - 2\sin(\theta)^2. $$ From this, it follows that $$ 1-\cos(h) = 1 - \left( 1 - 2\sin\left( \frac{h}{2} \right)^2 \right) = 2\sin\left( \frac{h}{2} \right)^2. $$ Substituting this into the original limit and applying some algebraic jiggery-pokery, we obtain $$ \lim_{h\to 0} \frac{1-\cos(h)}{h^2} = 2 \lim_{h\to 0} \frac{\sin(h/2)^2}{h^2} = 2 \lim_{h\to 0} \frac{\sin(h/2)^2}{4h^2/4} = \frac{1}{2} \lim_{h\to 0} \frac{\sin(h/2)^2}{(h/2)^2}. $$ As $\lim_{\theta \to 0} \frac{\sin(\theta)}{\theta} = 1$ and the function $x \mapsto x^2$ is continuous, we have $$ \lim_{h\to 0} \frac{1-\cos(h)}{h^2} = \frac{1}{2} \lim_{h\to 0} \frac{\sin(h/2)^2}{(h/2)^2} = \frac{1}{2} \left( \lim_{h\to 0} \frac{\sin(h/2)}{(h/2)}\right)^2 = \frac{1}{2} \cdot 1^2 = \frac{1}{2}. $$