For what values of x is #f(x)= e^x/(x^2-x) -e^x# concave or convex?

1 Answer
Jul 18, 2018

The function is convex for # x < -1.660 #, #0 < x < 1#, #x > 1.928#

Explanation:

We need to find points of inflection for this function, i.e. where the second derivative is 0.

#f(x) = e^x/(x^2-x) - e^x #
#f'(x) = (e^x(x^2-x) - e^x(2x-1))/(x^2-x)^2 - e^x#
#f''(x) = ((x^2-x)^2[e^x(x^2-3x+1) + e^x(2x-3) ])/(x^2-x)^4 - (e^x(x^2-3x+1)* 2 (x^2-x)(2x-1))/(x^2-x)^4 - e^x#

Setting this equal to zero, we know that the #e^x# will never go to zero, so we can divide that out. Similarly, we can multiply by the #(x^2-x)^4# in the denominator by specifying that #x ne 0, 1#.

Therefore, we end up with
# 0 = (x^2-x)^2[x^2-3x+1 + 2x-3] - 2(x^2-3x+1)(x^2-x)(2x-1) - (x^2-x)^4 #
# 0 = (x^2-x)[(x^2-x)(x^2-x-2) - 2(x^2-3x+1)(2x-1) - (x^2-x)^3]#
i.e. we have one degree of #x^2-x# which doesn't cancel out the 4 we multiplied, so we can forget about it as well. Now we have to expand out this sixth degree polynomial:

# 0 = x(x-1)(x^2-x-2) - 2(x^2-3x+1)(2x-1) - x^3(x-1)^3#
# 0 = -x^6 + 3x^5 -2x^4 -5 x^3 + 13x^2 - 8x + 2#
# 0 = x^6 - 3x^5 + 2x^4 + 5x^3 - 13x^2 + 8x - 2 #

If you try to find some rational roots, it turns out that none of the candidates #(pm1, pm2)# work, hence the roots are all irrational.
We can plot this function to see:

graph{x^6-3x^5+2x^4+5x^3-13x^2+8x-2 [-3, 3, -10, 10]}

And see there are two real solutions at around
#x_1 = -1.66 and x_2 = 1.928 #

The new problem is that the original function has these breaks at #x = 0, 1# so the regions are
I: # x < x_1 #
II: #x_1 < x < 0#
III: #0 < x < 1#
IV: #1 < x < x_2#
V: #x_2 < x#

We know that the actual second derivative is
#f''(x) = (-e^x(x^6 - 3x^5 + 2x^4 + 5x^3 - 13x^2 + 8x-2))/(x^2-x)^3 #

We can see that only terms that will determine the sign of the function are the two polynomials since #e^x > 0#

From the above graph, we see that in region I and V, the long polynomial is positive and regions II-IV it is negative.

We can also see that #x^2 - x# is negative only in region III.

This means that the regions have alternating concavities, starting with convex.