18
$\begingroup$

Given that $f$ and $g$ are two real functions and both are differentiable, is it true to say that $h=\max{(f,g)} $ is differentiable too?

Thanks

$\endgroup$
4
  • 9
    $\begingroup$ If you are interested, there is a function soft max that approximates the max-function smoothly. $\endgroup$
    – Eff
    Commented Apr 22, 2015 at 12:24
  • 3
    $\begingroup$ As a slightly weaker argument -- $max(f,g)$ should at least always be piecewise-differentiable, correct? $\endgroup$
    – hBy2Py
    Commented Apr 22, 2015 at 17:53
  • $\begingroup$ @Brian I'm pretty sure that's true, though it's possibly a separate question to be asked. $\endgroup$ Commented Apr 22, 2015 at 18:56
  • $\begingroup$ @Matt Separate question asked $\endgroup$
    – hBy2Py
    Commented Apr 22, 2015 at 19:08

4 Answers 4

61
$\begingroup$

No. Consider $f(x)=x$ and $g(x)=-x$. You get $\max(f(x),g(x))=|x|$.

$\endgroup$
1
  • $\begingroup$ simplest and easiest approach. wonderful $\endgroup$
    – Priya
    Commented Jul 15, 2015 at 6:33
23
$\begingroup$

No, $h(x)=\max(\cos x,\sin x)$ is not differentiable at $x=\dfrac\pi4+k\pi$.

This is because when you switch from $f$ to $g$, the slopes have no reason to be equal.

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ may i ask what software you use to generate this graph? $\endgroup$
    – Nighty
    Commented Apr 22, 2015 at 7:40
  • 3
    $\begingroup$ @LeeKM: Microsoft Mathematics. It's free and does symbolic computation as well. $\endgroup$
    – user65203
    Commented Apr 22, 2015 at 7:41
  • 2
    $\begingroup$ I'll remember this answer if I ever need to draw a pair of lips in a Mathematica plot. $\endgroup$ Commented Apr 22, 2015 at 11:27
19
$\begingroup$

not quite. Observe that: $\text{max}(f,g) = \dfrac{f+g + |f-g|}{2}$, thus if we simply let $f(x) = 2x, g(x) = x$, then we run into problem at $|x|$.

$\endgroup$
2
  • 4
    $\begingroup$ This is a nice answer; a little more work gives a precise condition for exactly when $\max(f,g)$ will be differentiable. $\endgroup$ Commented Apr 22, 2015 at 12:24
  • 6
    $\begingroup$ The condition is: whenever $f(a) = g(a)$, $f'(a) = g'(a)$. $\endgroup$ Commented Apr 22, 2015 at 12:26
1
$\begingroup$

$f(x) > g(x)$ Then $F:={\rm max}\{f,g\} =f$ is differentiable at $x$

If $f(x)=g(x)$ and $f(y)< g(y),\ y< x$ and $f(z)> g(z),\ z>x$, then $ \frac{F(y)-F(x) }{y-x}$ goes to $g'(x)$ when $y$ goes to $x$

And $ \frac{F(z)-F(x) }{z-x}$ goes to $f'(x)$ when $z$ goes to $x$. Hence in general $f'(x)\neq g'(x)$ so that it is not differentiable.

$\endgroup$

You must log in to answer this question.

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