5
$\begingroup$

I'm given the following function

$$f(x)= \begin{cases} \left(x-a\right)^2\left(x-b\right)^2\;,\quad x \in[a;b]\\ 0\;,\qquad\qquad\qquad\;\; x \notin[a;b] \end{cases}$$

I tried finding the derivative by using the definition, but I couldn't. I am not very familiar with the idea of taking the derivative of a piecewise function, that's why I'm stuck and don't know what to do. I would be great help for me if you could show how to take the derivatives of this kinds of functions or give some hints. Thank you very much.

$\endgroup$
1
  • 3
    $\begingroup$ If $x \in ]a,b[$ just use the usual formula. Same if $x \in \mathbb{R}\setminus [a,b]$. For $x \in \{a,b\}$, try to use the ratio definition: apply it on both sides of $a$ and $b$ and conclude that the ratio does have a limit. $\endgroup$
    – Didier
    Commented Apr 19, 2021 at 18:50

1 Answer 1

2
$\begingroup$

If $x\in\left(a,b\right)$ then there exists a neighbourhood of $x$, namely a small enough $\delta$ such that $f\left(x\right)=\left(x-a\right)^{2}\left(x-b\right)^{2}$. You may derive it the standard way.

If $x>b$ or $x<a$, then using a similar argument as above, $f\left(x\right)=0$ which you can also derive the standard way.

Now you need to check for $x_{0}=a$ and $x_{0}=b$. we will use the definition for that. on the case $x_{0}=a$: $$\lim_{x\to a}\frac{f\left(x\right)-f\left(a\right)}{x-a}=\lim_{x\to a}\frac{f\left(x\right)}{x-a}$$ Now we look at the one-sided limits: $$\lim_{x\to a^{+}}\frac{f\left(x\right)}{x-a}=\lim_{x\to a^{+}}\frac{\left(x-a\right)^{2}\left(x-b\right)^{2}}{x-a}=\lim_{x\to a^{+}}\left(x-a\right)\left(x-b\right)^{2}=0$$ $$\lim_{x\to a^{-}}\frac{f\left(x\right)}{x-a}=\lim_{x\to a^{-}}\frac{0}{x-a}=\lim_{x\to a^{-}}0=0$$ Hence $f$ is differentiable at $x_{0}=a$ and $f'\left(a\right)=0$

You can take it from here on the case $x_{0}=b$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .