I need to find a,b real so that $f:\mathbb{R}\rightarrow \mathbb{R},f(x)=x\cdot|x-a|+|x-b|$ is a differentiable function. I took the case $a
Find a,b so that f is differentiable function
1
$\begingroup$
ordinary-differential-equations
1 Answers
2
Notice that if $a = b$ you can factor the absolute value and get $$ f(x) = |x-a| (x + 1), $$ so $a = b = -1$ is a trivial solution since then $f(x) = (x+1)|x+1|$ is differentiable everywhere, which is easy to show.
Otherwise you can break your function into cases, e.g. $$ f(x) = \begin{cases} x(x-a) + (x-b), & x \ge \max{a,b} \\ -x(x-a) - (x-b), & x \le \min{a,b} \\ \ldots \end{cases} $$ which you can organize into subcases $a