What are the local extrema, if any, of #f(x)= (4x-3)^2-(x-4)/x #?

1 Answer
May 31, 2018

The only extremum is #x=0.90322...#, a function minimum

But you have to solve a cubic equation to get there and the answer is not at all 'nice' - are you sure the question is correctly typed in? I have also included suggestions for how to approach the answer without going into the amount of analysis shown fully below.

Explanation:

1. Standard approach points us in a laborious direction

First calculate the derivative:
#f(x)=(4x-3)^2-(x-4)/x#
so (by chain and quotient rules)
#f'(x)=4*2(4x-3)-(x-(x-4))/x^2=32x-24-4/x^2#

Then set this equal to 0 and solve for #x#:
#32x-24-4/x^2=0#
#32x^3-24x^2-4=0#
#8x^3-6x^2-1 =0#

We have a cubic equation, which is solvable by radicals, but this is far from an easy process. We know that this equation will in general have three roots, but not that they will all be real, although at least one of them will be - that at least one will be we know from the Intermediate Value Theorem - https://en.wikipedia.org/wiki/Intermediate_value_theorem - which tells us that because the function goes to infinity at one end and minus infinity at the other, then it must take all values in between at one point or another.

Trialling a few simple values (1 is often an informative and quick value to try), we see that there is a root somewhere between 1/2 and 1, but we don't find any obvious solutions to simplify the equation with. Solving a cubic equation is a long and tedious process (which we'll do below), so it is worth trying to inform one's intuition before doing so. Trialling solutions further, we find that it is between 0.9 and 0.91.

2. Solve a simplified problem

The function consists of the difference of two terms, #f_1(x)=(4x-3)^2# and #f_2(x)=(x-4)/x#. For much of the range of #x#, the first of these will dominate hugely, as the second term will be close to 1 for all values of #x# away from small values. Let us ask how the two individual terms behave.

First term, #f_1#
#f_1(x)=(4x-3)^2#
#f_1^'(x)=4*2(4x-3)=8(4x-3)#

Set this equal to zero: #x=3/4#. This is in the region of the zero of the function that we found, but it isn't very close to it.

#f(1)# is a parabola in #x#, one that touches the #x# axis at #x=3/4#. Its derivative is a steep straight line of gradient 32 that crosses the x-axis at the same point.

Second term, #f_2#
#f_2(x)=(x-4)/x=1-4/x#
#f_2^'(x)=4/x^2#

Set this equal to zero: there are no solutions in #x#. So #f_2# has no extrema as a function on its own. It does however have a point at which it blows up to infinity: #x=0#. It goes to positive infinity as it approaches 0 from the negative side, and to negative infinity as it approaches 0 from the positive side. Far away from this point, the curve tends to the value 1 on both sides. #f_2# is a hyperbola centred on #(x,y)=(0,1)#. Its derivative is a curve in two pieces, for negative and positive #x#. It goes to positive infinity from both directions at #x=0# and is always positive.

Note that #f_1^'(x)<0# for all #x<0#. There can be no intersections of #f_1^'# and #f_2^'# on the negative #x# axis. Over the positive #x# axis there must be exactly one intersection - one curve goes from less than 0 to infinity as #x# does the same while the other goes from infinity to 0. By an application of the Intermediate Value Theorem (see above) they must cross exactly once.

So now we are certain that we are only looking for one solution but we do not have a good answer for it.

3. Numerically approximate the answer

In professional situations requiring the solution of these kinds of problems, often the quickest way to get to where you need to get is to perform a numerical approximation. A pretty good one for finding roots of a function is the Newton-Raphson method (https://en.wikipedia.org/wiki/Newton%27s_method).

Which is: to find a root of a function #f#, first make a guess #x_0# at a root, and then iterate round and round according to this formula:
#x_1=x_0-f(x_0)/(f'(x_0))#
#x_1# is a better guess than #x_0#, and one just repeats this until the desired precision is reached.

Recall our function and its derivative:
#f(x)=(4x-3)^2-(x-4)/x#
#f'(x)=8(4x-3)-4/x^2#

So we might guess 0.5 as our root, making #x_0=0.5#, #f(x_0)=8#, #f'(x_0)=-24#. Thus #f_1=0.5+8/24=0.5+1/3=0.8333....#, indeed a closer answer. Repeating brings us to the value of approximately 0.9 mentioned above.

So we can find the answer with arbitrary precision, but the full answer requires an analytic solution, something that we noted above would be hard. So here we go...

4. Solve the full problem, slowly and painfully

Now let's do the full cubic solution (you're going to have to love algebra to solve this one properly):

First, divide through to make the leading term have coefficient 1 :
#8x^3-6x^2-1=0#
#x^3-3/4 x^2 - 1/8=0#

Second, make the following substitution to the variable #y# to remove the #x^2# term:
Substitute #x=y+1/4#. More generally, for an equation of the form #ax^3+bx^2+cx+d=0#, one would substitute #x=y-b/(3a)#. If you work through the algebra, you'll see that this always causes the #x^2# term to vanish. In this case we obtain:
#x^3 -3/4 x^2 - 1/8=0#
#(y+1/4)^3 -3/4 (y+1/4)^2 - 1/8=0#
(Expand brackets, remembering the Binomial theorem: https://en.wikipedia.org/wiki/Binomial_theorem)
#y^3+3/4 y^2+3/16 y+1/64-3/4 y^2-3/8y-3/64-1/8=0#
(Notice that the two #y^2# terms exactly cancel out)
#y^3-3/16y=5/32#
We now have the same number of terms as we did before, because we previously had no #y# term. Losing the #y^2# term is a mathematical profit, promise!

Third, make another substitution (Vieta's substitution: http://mathworld.wolfram.com/VietasSubstitution.html) to turn this into a quadratic:
Substitute #y=w+1/(16w)#. More generally, for an equation of the form #y^3+py=q#, this substitution is #y=w-p/(3w)#.
#y^3-3/16y=5/32#
#(w+1/(16w))^3-3/16(w+1/(16w))=5/32#
#w^3+3/16w+3/(256w)+1/(4096w^3)-3/16w-3/256w=5/32#
(Notice that both #w# and #1/w# terms cancel out exactly)
#w^3+1/(4096w^3)=5/32#
#w^6-5/32w^3+1/4096=0#
(Now, you may well ask what on earth the benefit of this is - we've fiddled with our degree 3 equation until we have a degree 6 equation, surely a loss... But we can now think of it as a quadratic equation in #w^3#, and we can solve quadratic equations...)

Fourth, solve the quadratic equation for #w^3#
#w^6-5/32w^3+1/4096=0#
#(w^3)^2-5/32(w^3)+1/4096=0#
Using the quadratic equation:
#w^3 = (5/32+-sqrt(25/1024-1/1024))/2#
#w^3 = (5/32+-sqrt(24/1024))/2= (5/32+-sqrt(24)/32)/2#
#w^3 =(5+-sqrt(24))/64=(5+-2sqrt(6))/64#

We have an answer! Now we just have to relate it back to our original variable #x#.

Fifth, convert back to our original terms
#w^3 =(5+-2sqrt(6))/64#
Take the cube root:
#w =[(5+-2sqrt(6))/64]^(1/3)#
#w =([5+-2sqrt(6)]^(1/3))/4#
Recall how we related #y# to #w# earlier: #y=w+1/(16w)#

#y=([5+-2sqrt(6)]^(1/3))/4+1/(4[5+-2sqrt(6)]^(1/3))#

Now #1/([5+-2sqrt(6)]^(1/3))#
#=1/([5+-2sqrt(6)]^(1/3))*([-5+-2sqrt(6)]^(1/3))/([-5+-2sqrt(6)]^(1/3))#
#=([-5+-2sqrt(6)]^(1/3))/([(5+-2sqrt(6))(-5+-2sqrt(6))]^(1/3))#
#=([-5+-2sqrt(6)]^(1/3))/([-25+4*6]^(1/3))#
#=([-5+-2sqrt(6)]^(1/3))/(-1)=-[-5+-2sqrt(6)]^(1/3)#
(Socratic doesn't seem to offer a minus-plus opposite of plus-minus, so we have to write it this way)

Thus
#y=([5+-2sqrt(6)]^(1/3))/4-([-5+-2sqrt(6)]^(1/3))/4#

If we multiply out the minus signs in the second large term we can see that we obtain two identical expressions, so we can drop the quadratic plus/minus signs, and simplify to

#y=1/4([5+2sqrt(6)]^(1/3)+[5-2sqrt(6)]^(1/3))#

Finally (!) recall that we set #x=y+1/4#.
Thus
#x=(1+[5+2sqrt(6)]^(1/3)+[5-2sqrt(6)]^(1/3))/4#

Sixth, deduce how many of these roots are real
The two expressions in the cube roots each have one real root and two conjugate imaginary roots. A real number #a# has three cube roots #a^(1/3)#, #a^(1/3)(1/2+isqrt(3)/2)#,#a^(1/3)(1/2-isqrt(3)/2)#. Now we know that both expressions inside the cube roots are positive (notice #5=sqrt(25)>sqrt(24)=2sqrt(6)#), and so the imaginary components in the second and third values for #x# cannot sum to zero.

Conclusion
Therefore there is only one real root for #x# (as we concluded far above by a simpler analysis), and hence only one local extreme on the curve you're asking about, given by the expression
#x=(1+[5+2sqrt(6)]^(1/3)+[5-2sqrt(6)]^(1/3))/4#
or, in decimal
#x=0.90322...#

We can deduce that this is a minimum of the function by the fact that there is only one extremum and the function tends to positive infinity at both ends.