<s>[INST] How to show the concavity of a function with an undefined point? Look at this function: $f(x)=\left\{\begin{array}{ll}
\frac{x(1-x^2)}{1-x^3}\\
2/3
\end{array}\right.$. Here $2/3=\lim_{x\to1}\frac{x(1-x^2)}{1-x^3}$. I can show that the second derivative of $\frac{x(1-x^2)}{1-x^3}$ is non-positive for $0\leq x<1$ and $x>1$; however, $\frac{x(1-x^2)}{1-x^3}$ is undefined at $x=1$. So in this case, how to show $f(x)$ is concave rigorously? (I think a point won't change the concavity of a function, but I don't know how to show it.)
 [/INST] If $x\neq1$, then
$$f(x)=\frac{x(1-x^2)}{1-x^3}=\frac{x(1-x)(1+x)}{(1-x)(1+x+x^2)}=\frac{x(1+x)}{1+x+x^2}.$$
And plugging in $x=1$ into $\dfrac{x(1+x)}{1+x+x^2}$ also yields $2/3$.
This means that the given function is in fact $f(x)=\dfrac{x(1+x)}{1+x+x^2}$ for all real numbers. Now you can the second derivative.
</s>