# Differentiating the function $x^3\cdot\min\{x,9\}$

Today I came across the function $x^3\cdot \min\{x,9\}$.

My teacher differentiated it and wrote it directly again as $3x^2\cdot\min\{x,9\}$

I was wondering how come the $\min\{x,9\}$ part is not affected by differentiation. Any ideas please? Or am I missing something pretty obvious?

-
What is "my sir"? You are correct to ask, because $3x^2\cdot\min\{x,9\}$ is wrong. I recommend considering the 2 cases $x<9$ and $x>9$, and checking that the function is not differentiable at $9$. – Jonas Meyer Nov 28 '11 at 8:42
i meant, it was the intermediate step of a question that sir asked us to solve in the class and i got struck here, and he without any doubt whatsoever directly differentiated it to which i was a bit stunned – Bhargav Nov 28 '11 at 8:44
and i apologize for bad usage of english, i am not so fluent with my english usage – Bhargav Nov 28 '11 at 8:45

1
It sounds like your teacher made a mistake. Can you see how the formula simplifies in the two cases where $x<9$ and $x>9$? (No need to apologize, and thank you for clarifying. I hope that changing "sir" to "teacher" conveys the intended meaning well.) – Jonas Meyer Nov 28 '11 at 8:47

## 2 Answers

Another way of looking at the mistake made by your teacher is that he forgot how to differentiate the product of two functions. The derivative of the first factor $f(x)=x^3$ is, indeed, $f'(x)=3x^2$, but the derivative of the second factor $g(x)=\min\{x,9\}$ is $g'(x)=1,$ if $x<9$, and $g'(x)=0$, if $x>9$. As others have pointed out, $g(x)$ is not differentiable at the point $x=9$. The correct derivative is thus $$\frac d{dx}\,\big(f(x)g(x)\big)=f'(x)g(x)+f(x)g'(x),$$ wherever the two derivatives both exist.

It is, of course, an easy exercise to verify that this formula coincides with the answer David Mitra gave.

-

You have a piecewise defined function here: if $x<9$, then $\min(x,9)=x$ and $f(x)=x^3\cdot x=x^4$. But if if $x>9$, then $\min(x,9)=9$ and $f(x)=x^3\cdot 9=9x^3$.

So, your function is $$f(x)=\cases{ x^4, &x<9\cr 9x^3,&x\ge9}$$

You'll have to find the derivative separately for each piece:

For $x<9$, $$\tag{1}f'(x)=(x^4)'=4x^3.$$

For $x>9$, $$\tag{2}f'(x)=(9x^3)'=27x^2.$$

At $x=9$, in order to determine if $f'(9)$ is defined, you need to see if the above formulas "match up" at $x=9$. That is, you need to check that the "derivative at 9" given by (1) and (2) are the same. So, you need to compute the limit of the expression in (1) as $x$ approaches 9 from the left, and the limit of the expression in (2) as $x$ approaches 9 from the right: $$\lim_{x\rightarrow 9^-} 4x^3=4\cdot 9^3.$$

$$\lim_{x\rightarrow 9^+}27x^2=27\cdot9^2=3\cdot 9^3.$$ Since the two are different, $f'(9)$ is undefined.

See Jonas' astute observation below.

Looking at the graph of $f$ and the expressions (1) and (2), it is not too hard to see that $f'(9)$ exists if and only if the two limits above exist and are equal. The previous statement, however, is not true in general.

-

4
Technically to show that $f'(9)$ is undefined it might be better to show that the left-hand and right-hand limits of the difference quotients don't match up. It is true that if the left-hand and right-hand limits of the derivative exist at a point and are unequal then the function can't be differentiable there, but that is a little more work to show. – Jonas Meyer Nov 28 '11 at 8:54
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 36, "mathjax_display_tex": 6, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9540322422981262, "perplexity_flag": "head"}