$\frac{\sin(\pi x)}{\pi x}$ is differentiable in $0$ Define a function $g:\mathbb{R}\rightarrow\mathbb{R}$ by $g(x)=\frac{\sin(\pi x)}{\pi x}$  if $x\neq0$ and $g(x)=1$ if $x=0$. I want to show that $g$ is two times differentiable and i want to compute $g'(0)$ and $g''(0)$. Can someone help me with this? Can you do something with L'Hospital? since both functions are differentiable? Or do you have to do something more basically? Thanks a lot.
 A: It's better to consider
$$
G(x)=\begin{cases}
\dfrac{\sin x}{x} & \text{if $x\ne0$}\\[6px]
1 & \text{if $x=0$}
\end{cases}
$$
because $g(x)=G(\pi x)$ and $g$ is (twice) differentiable if and only if $G$ is.
The function $G$ is continuous at $0$, by a well known limit. The derivative, for $x\ne0$, is
$$
G'(x)=\frac{x\cos x-\sin x}{x^2}
$$
and
$$
\lim_{x\to0}G'(x)=
\lim_{x\to0}\frac{x(1-\frac{1}{2}x^2+o(x^2))-x+\frac{1}{6}x^3+o(x^3)}{x^2}=0
$$
Thus $G$ is differentiable at $0$, by l'Hôpital. Consequently, $g'(0)=\pi G'(0)=0$.
Can you compute the second derivative and argue similarly?

There's an alternative way, with Taylor expansion:
$$
\sin(\pi x)=\pi x-\frac{\pi^3 x^3}{3!}+o(x^3)
$$
so
$$
g(x)=1-\frac{\pi^2 x^2}{6}+o(x^2)
$$
so (in a neighborhood of $0$),
$$
g'(x)=-\frac{\pi^2 x}{3}+o(x)
$$
and
$$
g''(x)=-\frac{\pi^2}{3}+o(1)
$$
so $g''(0)=-\pi^2/3$.
A: At zero, the function is continuous and you can use the bilateral definition of the first derivative,
$$\lim_{h\to0}\frac{f(h)-f(-h)}{2h}.$$
As the function is even, the limit is $0$.
Then,
$$f''(0)=\lim_{h\to0}\frac{f(h)-2f(0)+f(-h)}{h^2}=2\lim_{h\to 0}\frac{\sin(\pi h)-\pi h}{\pi h^3}=-2\lim_{h\to 0}\frac{\pi^2\sin(\pi h)}{6\pi h}=-\frac{\pi^2}3,$$
applying L'Hospital twice.
