I want to compute $$\sup_{x\in\mathbb R}\left\{ax-\frac{|x|^p}{p}\right\}$$ where $a\in \mathbb R$ and $p\in ]1,\infty [$.
I have that $$\left(ax-\frac{|x|^p}{p}\right)'=a-\frac{x}{|x|}|x|^{p-1}.$$ If $p\in ]1,2[$ I don't know how to proceed. If $p\geq 2$, I get that the derivate is $$a-x|x|^{p-2}=0\implies x|x|^{p-2}=a,$$ but how can I solve this equation ? I would say that $x=\pm|x|$ and thus that we have $$|x|^{p-1}=\pm a,$$
but now I have problem with condition on positivity of $a$ to at the end get something as $x=\pm\sqrt[p-1]{|a|}$ which is wrong $$\frac{1}{p'}|a|^{p'}$$ where $\frac{1}{p'}+\frac{1}{p}=1$. So I'm far from the result. Any help ?
You have $x\lvert x \rvert^{p-2}=a$. So taking another absolute value, $$\lvert x \rvert^{p-1} = \lvert a\rvert \implies \lvert x \rvert = \lvert a \rvert^{1/(p-1)}.$$ You also have $$ ax = x\lvert x \rvert^{p-2} x = \lvert x \rvert^p $$ since $x^2=\lvert x \rvert^2$. So the maximum has value $$ \lvert x \rvert^p - \frac{\lvert x \rvert^p}{p} = \lvert x \rvert^p \left( 1-\frac{1}{p} \right) = \frac{\lvert a \rvert^{p/(p-1)}}{p'} = \frac{\lvert a \rvert^{p'}}{p'}. $$