An indeterminate expression when calculating derivative.
Good afternoon,
f(x) = x * |cos(pi/x)| I want to know the value of df/dx (2/3) (right and left hand derivatives)
With a standard algorithm, I calculate it this way: d/dx x * |cos(pi/x)| = 1 * |cos(pi/x)| + x * (|cos(pi/x)|/(cos(pi/x))) * (-sin(pi/x)) * (-pi/x^2) = |cos(pi/x)| * (1 + tg(pi/x) * pi / x)
However, tg(3*pi/2) does not have value!
My questions are:
- How is it possible that x * |cos(pi/x)| is differentiable in 2/3 but above expression is indeterminate?
- I was able to solve this by definition (result is 3pi/2 from the right and -3pi/2 from the left). Is there another way of solving this?
Solution 1:
-
$f(x)$ is not differentiable at 2/3 because the left and right hand derivatives differ.
-
You can solve this by noticing that for $x$ slightly smaller than $2/3$, $\cos(\pi/x) > 0$, so you can take $f(x)=x\cos(\pi/x)$ and differentiate that. On the other hand, for $x$ slightly bigger than $2/3$, $\cos(\pi/x)<0$, so that you can differentiate $f(x)=-x\cos(\pi/x)$. Notice that this will be the negative of the previous value.