To check if the function is convex or concave we have to findf''(x)
If color(brown)(f''(x)>0) then color(brown)(f(x)) is color(brown)(convex)
If color(brown)(f''(x)<0) then color(brown)(f(x)) is color(brown)(concave)
first let us find color(blue)(f'(x))
f'(x)=((e^x)/x)'-(x^3)'-(3)'
f'(x)=(xe^x-e^x)/x^2-3x^2-0
color(blue)(f'(x)=(xe^x-e^x)/x^2-3x^2)
Now let us find color(red)(f''(x))
f''(x)=
((xe^x-e^x)'x^2-(x^2)'(xe^x-e^x))/(x^2)^2-6x
f''(x)=((e^x+xe^x-e^x)x^2-2x(xe^x-e^x))/x^4-6x
f''(x)=(x^3e^x-2x^2e^x-2xe^x)/x^4-6x
Let us simplify the fraction by x
color(red)(f''(x)=(x^2e^x-2xe^x-2e^x)/x^3-6x)
Now let us compute color(brown)(f''(-1)
f''(-1)=((-1)^2e^(-1)-2(-1)e^(-1)-2e^(-1))/(-1)^3-6(-1)
f''(-1)=(e^(-1)+2e^(-1)-2e^(-1))/(-1)+6
color(brown)(f''(-1)=-e^(-1)+6)
color(brown)(f''(-1)>0
So,f''(x) >0 at x=-1
Therefore,f(x) is covex at x=-1
graph{e^x/x - x^3 -3 [-20, 20, -20, 20]}