MHB Find f'(0) from a piecewise function

Click For Summary
To find f'(0) for the piecewise function defined as f(x) = g(x)/x for x ≠ 0 and f(0) = 0, the limit definition of the derivative is used. The limit leads to an indeterminate form, allowing the application of L'Hôpital's rule twice, ultimately yielding f'(0) = 17/2 due to the continuity of g'' at 0. The initial assumption that f'(0) equals 0 is incorrect; the derivative's value at a point does not solely depend on the function's value at that point. The discussion clarifies the importance of checking continuity and using proper limit techniques to evaluate derivatives for piecewise functions. Understanding these concepts is crucial for accurately determining derivatives in calculus.
Dethrone
Messages
716
Reaction score
0
Find $f'(0)$ if:
$$f(x)=\begin{cases}\frac{g(x)}{x}, & x\ne 0 \\[3pt] 0, & x=0 \\ \end{cases}$$
where $g(0)=g'(0)=0$, $g''(x)=17$ and $g''(x)$ is continuous at $0$.

Progress:
First,

$$f'(x)=\begin{cases}\frac{xg'(x)-g(x)}{x^2}, & x\ne 0 \\[3pt] 0, & x=0 \\ \end{cases}$$

Wouldn't $f'(0)$ simply be 0, from above, or is there a flaw in my logic? I mean, I could probably prove that the function is continuous at 0 from the left and right side by l'hopital's rule...tell me if I'm right so far.

EDIT: I think I determined that $\lim_{{x}\to{0^{+/-}}}\frac{xg'(x)-g(x)}{x^2}=\frac{17}{2}$, but why is it not equal to $0$?
 
Last edited:
Physics news on Phys.org
Rido12 said:
Find $f'(0)$ if:
$$f(x)=\begin{cases}\frac{g(x)}{x}, & x\ne 0 \\[3pt] 0, & x=0 \\ \end{cases}$$
where $g(0)=g'(0)=0$, $g''(x)=17$ and $g''(x)$ is continuous at $0$.

Progress:
First,

$$f'(x)=\begin{cases}\frac{xg'(x)-g(x)}{x^2}, & x\ne 0 \\[3pt] 0, & x=0 \\ \end{cases}$$

Wouldn't $f'(0)$ simply be 0, from above, or is there a flaw in my logic? I mean, I could probably prove that the function is continuous at 0 from the left and right side by l'hopital's rule...tell me if I'm right so far.

EDIT: I think I determined that $\lim_{{x}\to{0^{+/-}}}\frac{xg'(x)-g(x)}{x^2}=\frac{17}{2}$, but why is it not equal to $0$?

Hi Rido12,

I can see where you're having trouble. Let's start from the top. To find $f'(0)$, use the limit definition

$\displaystyle f'(0) = \lim_{x \to 0} \frac{f(x) - f(0)}{x}$.

Since $f(0) = 0$ and $f(x) = \frac{g(x)}{x}$ for $x \neq 0$,

$\displaystyle f'(0) = \lim_{x \to 0} \frac{g(x)}{x^2}$.

This limit has indeterminate form $\frac{0}{0}$ since $g(0) = 0$. To proceed, use L'hospital's rule (as you've suggested) to get

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

Since $g'(0) = 0$, the above limit has indeterminate form $\frac{0}{0}$. Apply L'hospital's rule once more to obtain

$\displaystyle f'(0) = \lim_{x \to 0} \frac{g''(x)}{2} = \frac{17}{2}$.

The last equality follows from continuity of $g''$ at 0 with $g''(0) = 17$.

Note that it wasn't necessary to compute $f'(x)$ for $x \neq 0$ to get $f'(0)$.
 
Last edited:
Rido12 said:
, but why is it not equal to $0$?

Consider the special case g(x) = (17/2)x2
When x>0
Then
f(x) = (17/2)x
and
f'(x) = 17/2
 
Euge said:
Hi Rido12,

I can see where you're having trouble. Let's start from the top. To find $f'(0)$, use the limit definition

$\displaystyle f'(0) = \lim_{x \to 0} \frac{f(x) - f(0)}{x}$.

Since $f(0) = 0$ and $f(x) = \frac{g(x)}{x}$ for $x \neq 0$,

$\displaystyle f'(0) = \lim_{x \to 0} \frac{g(x)}{x^2}$.

This limit has indeterminate form $\frac{0}{0}$ since $g(0) = 0$. To proceed, use L'hospital's rule (as you've suggested) to get

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

Since $g'(0) = 0$, the above limit has indeterminate form $\frac{0}{0}$. Apply L'hospital's rule once more to obtain

$\displaystyle f'(0) = \lim_{x \to 0} \frac{g''(x)}{2} = \frac{17}{2}$.

The last equality follows from continuity of $g''$ at 0 with $g''(0) = 17$.

Note that it wasn't necessary to compute $f'(x)$ for $x \neq 0$ to get $f'(0)$.

Hi Euge! (Wave)

I can follow all your steps, and that at the end, $\displaystyle f'(0) = \lim_{x \to 0} \frac{g''(x)}{2}$ is equal to $\frac{17}{2}$ because $g''(x)$ is continuous at $0$.

However, when I differentiated the piece-wise function $f$ at the beginning, I got:

$f'(x)=\begin{cases}\frac{xg'(x)-g(x)}{x^2}, & x\ne 0 \\[3pt] 0, & x=0 \\ \end{cases}$
The question gives us $f(0)=0$ when $x=0$, so it follows that $f'(0)=0$ when $x=0$ because the derivative of $0$ is $0$. I have also determined that $f$ is continuous.

In the above, when $x=0$, then $f'(0)=0$. What's wrong with that conclusion?
 
Rido12 said:
The question gives us $f(0)=0$ when $x=0$, so it follows that $f'(0)=0$ when $x=0$ because the derivative of $0$ is $0$. I have also determined that $f$ is continuous.

In the above, when $x=0$, then $f'(0)=0$. What's wrong with that conclusion?

Let $h(x)=x$.
Since we have $h(0)=0$ when $x=0$, does it follow that $h'(0)=0$? (Wondering)
 
That's true, but I'm getting tangled up here.

Isn't the way I'm getting $f'(x)$ analogous to what you would do with an absolute value function?

$$f(x)=|x|=\begin{cases}x, & x>0 \\[3pt] -x, & x<0 \\ \end{cases}$$

Differentiating both parts of the piecewise function:

$$f'(x)=\begin{cases}1, & x>0 \\[3pt] -1, & x<0 \\ \end{cases}$$

Differentiating yet again:

$$f''(x)=\begin{cases}0, & x>0 \\[3pt] 0, & x<0 \\ \end{cases}$$

I'm aware that we can also redefine $|x|$ as $\sqrt{x^2}$, but I've seen this method used to differentiate $|x|$

Why does this work or not work? Is it because the piecewise function has its domain separated by inequalities ($x<0$ or $x>0$) whereas if there was an equality ($x=0$), this method fails?
 
Hi again Rido12,

The major issue in your argument is the statement "The question gives us $f(0) = 0$ when $x = 0$, so it follows that $f'(0) = 0$ when $x = 0$ because the derivative of $0$ is $0$". What does the derivative of $0$ being $0$ have to do with the value of $f'(0)$?

There's something else I need to add. Even before calculating $f'(0)$ you must check that $f$ is continuous at $0$. I assumed you already did this, but in case you haven't, use L'hospital's rule and continuity of $g'$ with $g'(0) = 0$ to get

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

Thus, f is continuous at $0$.
 
Rido12 said:
That's true, but I'm getting tangled up here.

Isn't the way I'm getting $f'(x)$ analogous to what you would do with an absolute value function?

Not quite.
The absolute value function is not differentiable at 0, while it turns out that your function is.

$$f(x)=|x|=\begin{cases}x, & x>0 \\[3pt] -x, & x<0 \\ \end{cases}$$

Differentiating both parts of the piecewise function:

$$f'(x)=\begin{cases}1, & x>0 \\[3pt] -1, & x<0 \\ \end{cases}$$

Differentiating yet again:

$$f''(x)=\begin{cases}0, & x>0 \\[3pt] 0, & x<0 \\ \end{cases}$$

I'm aware that we can also redefine $|x|$ as $\sqrt{x^2}$, but I've seen this method used to differentiate $|x|$

Why does this work or not work? Is it because the piecewise function has its domain separated by inequalities ($x<0$ or $x>0$) whereas if there was an equality ($x=0$), this method fails?

All true.
However, in this case both $f'(0)$ and $f''(0)$ are undefined.
Euge said:
There's something else I need to add. Even before calculating $f'(0)$ you must check that $f$ is continuous at $0$.

Indeed, I wondered about this at first.
But doesn't the fact that $f'(0)$ turns out to exist, imply that $f$ is continuous at $0$?
 
Going back to the original, I read the piecewise function as the following:

When $x$ is any value but $0$, the function becomes $\frac {g(x)}{x}$. When $x$ is $0$, the function is $f(x)=0$.

The function $f(x)=0$, it is a constant function, where $f'(x)=0$. That is where I'm coming from. This is true for a general function where $f(x)=0$ is everywhere or for all $x$, but not true for a piecewise function where that is true only when $x=0$.
 
  • #10
Rido12 said:
Going back to the original, I read the piecewise function as the following:

When $x$ is any value but $0$, the function becomes $\frac {g(x)}{x}$. When $x$ is $0$, the function is $f(x)=0$.

The function $f(x)=0$, it is a constant function, where $f'(x)=0$. That is where I'm coming from. This is true for a general function where $f(x)=0$ is everywhere or for all $x$, but not true for a piecewise function where that is true only when $x=0$.

If a function is only $0$ at $x=0$, it is not a constant function.

Suppose we define:
$$h(x) = \begin{cases} x & \text{if } x \ne 0 \\ 0 & \text{if } x = 0 \end{cases}$$
Then we still have that:
$$h'(0)=1 \ne 0$$

That is because $h'(0)$ is actually defined as:
$$h'(0) = \lim_{h\to 0} \frac{f(h) - f(0)}{h}$$
where $h\ne 0$. $h$ only approaches $0$. (Nerd)
 
  • #11
Alright! It all makes sense now :D
Thanks everyone (Nod)
 
  • #12
I like Serena said:
Indeed, I wondered about this at first.
But doesn't the fact that $f'(0)$ turns out to exist, imply that $f$ is continuous at $0$?

I meant to say "you should check" rather than "you must check". Sometimes I do that check when dealing with more complicated functions.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
603
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K