I was asked to find for what values of x the function is differentiable and write down the derivative.
$f(x)=\lfloor{x^2 \rfloor} \sin^2(\pi x)$ for $x \geq 0$.
There are two steps:
- When $x \in (\sqrt{n},\sqrt{n+1})$ we get $f'(x)=\pi n \sin(2 \pi x)$.
- If $x=\sqrt{n}$ then:
- I need to find $\lim_{x \rightarrow \sqrt{n}^+} \frac{f(x)-f(\sqrt{n})}{x-\sqrt{n}}=\lim_{x \rightarrow \sqrt{n}^+} \frac{n \sin^2(\pi x)-n \sin^2(\pi \sqrt{n})}{x-\sqrt{n}}$
- I need to find $\lim_{x \rightarrow \sqrt{n}^-} \frac{f(x)-f(\sqrt{n})}{x-\sqrt{n}}=\lim_{x \rightarrow \sqrt{n}^-} \frac{(n-1) \sin^2(\pi x)-n \sin^2(\pi \sqrt{n})}{x-\sqrt{n}}$
I just don't know how to find the limits :\ We haven't covered L'hopital yet, so I need to use other methods.
Of course, after finding both limits, we need to write $f'_{-}(\sqrt{n})=f'_{+}(\sqrt{n})=f'(\sqrt{n})=\pi n \sin(2\pi \sqrt{n})$. This is true if and only if $\sqrt{n} \in \mathbb{N}$ (limits are all 0), otherwise the function is not differentiable in $x=\sqrt{n}$.
Please show how to continue, thanks!
$$\begin{align} \lim_{x\to\sqrt n^+}\frac{f(x)-f(\sqrt n)}{x-\sqrt n}&=\lim_{x\to\sqrt n^+}\frac{n\sin^2(\pi x)-n\sin^2(\pi \sqrt n)}{x-\sqrt n}\\ &=n \frac{\text d}{\text dx}\sin^2(\pi x)|_{x=\sqrt n}\\ &=2\pi n\sin(\pi \sqrt n)\cos(\pi\sqrt n)=\pi n\sin(2\pi\sqrt n) \end{align}$$ However, the limit below is: \begin{align} \lim_{x\to\sqrt n^-}\frac{f(x)-f(\sqrt n)}{x-\sqrt n}&=\lim_{x\to\sqrt n^-}\frac{(n-1)\sin^2(\pi x)-n\sin^2(\pi \sqrt n)}{x-\sqrt n}\\ &=\lim_{x\to\sqrt n^-}\frac{n\sin^2(\pi x)-n\sin^2(\pi \sqrt n)}{x-\sqrt n}-\frac{\sin^2(\pi x)}{x-\sqrt n}\\ &=\lim_{x\to\sqrt n^-}\pi n\sin(2\pi\sqrt n)-\frac{\sin^2(\pi x)}{x-\sqrt n}\\ \end{align} If $n=0$, then we have $$\lim_{x\to 0}\frac{\sin^2(\pi x)}{x}=\lim_{x\to0}\frac{(\pi x)^2}{x}=\lim_{x\to 0}\pi^2x=0.$$
Otherwise, the limit approaches infinity since $\sin^2(\pi x)$ approaches a nonzero finite value, while the denominator approaches $0$.