<s>[INST] If $b>a,$ find the minimum value of $|(x-a)^3|+|(x-b)^3|,x\in R$ If $b>a,$ find the minimum value of $|(x-a)^3|+|(x-b)^3|,x\in R$

Let $f(x)=|(x-a)^3|+|(x-b)^3|$
When $x>b,f(x)=(x-a)^3+(x-b)^3$
When $a<x<b,f(x)=(x-a)^3-(x-b)^3$
When $x<a,f(x)=-(x-a)^3-(x-b)^3$
I am stuck here.The answer given in my book is $\frac{(b-a)^3}{4}.$
 [/INST] Let $a<x<b$.
Hence, since $f(x)=x^3$ is a convex function, by Jensen we obtain:
$$|(x-a)^3|+|(x-b)^3|=(x-a)^3+(b-x)^3\geq2\left(\frac{x-a+b-x}{2}\right)^3=\frac{(b-a)^3}{4}$$
Let $x\geq b$. Hence,
$$|(x-a)^3|+|(x-b)^3=(x-a)^3+(x-b)^3\geq(b-a)^3>\frac{(b-a)^3}{4}.$$
</s>