I would like to minimize the following function with respect to x:

f[x_] := b/Sqrt[x] + ( 4.5 c x^6 Log[x] )^(1/3)

where b and c are constants. That is, I would like to find x, as a function of b and c, that minimizes f.

I've tried using Minimize[f, x]. I have also tried solving df/dx = 0 to find the turning point (and therefore finding the minimum). However, neither of these approaches work.

From what I can tell, one problem is that f doesn't have a minimum for all values of b and c. However, for the ranges of values of b and c that I'm interested in, f does have a minumum. But I can't work out how to put restictions on b and c.. Specifically, I want:

0< c < 1 && b > 0, && x > 1

How can I minimze f with respect to x, with the above constraints? I've worked through Mathemica's help pages, but can't find a working solution to this.

If this problem above isn't solvable, then a simpler but still useful problem would be to minimize f for a given value of b. For example, take b = 10 then find x as a function of c that minimizes f. Again, the constraints 0 < c <1 and x > 1 hold.

  • $\begingroup$ Start by defining f as f[x_, b_, c_] := ... so the dependence on $a,b,c$ is made evident. You could then try Minimize[{f[x, b, c], 0 < c < 1, b > 0, x > 1}, {x, b, c}]. Can you also elaborate on how you know that the function has a minimum under those conditions? $\endgroup$
    – MarcoB
    Jul 5, 2017 at 18:11
  • $\begingroup$ As a simple example plot would suggest, this function has no global minimum in the case b=10 and c=1/2 because the boundary point 1 is not feasible. $\endgroup$ Jul 5, 2017 at 21:19
  • $\begingroup$ I was a bit vague saying that I know that f does have a minimum, but here's my thinking: first I should say that c=1/n, and my whole goal in this is to find how large n has to be to make f close to zero. Now fix b>0 and n>0. For x->zero the left hand term, b/sqrt(x), tends to infinity. But for x->infinity the right hand term also tends to infinity. But somewhere in the middle, where sqrt(x)>b and x^6<n, both terms are small. Hence there must be intermediate values of x that minimise f! $\endgroup$
    – Paul K
    Jul 7, 2017 at 15:53

1 Answer 1


There seems to be no way to find the minimum analyticaly.

A way out is to "FindRoot" of the x where the first derivative is zero for given b an c.

f[x_, b_, c_] = b/Sqrt[x] + (45/10 c x^6 Log[x])^(1/3)

dequ[x_, b_, c_] = 
   FullSimplify[D[f[x, b, c], x] == 0, {0 < c < 1, b > 0, x > 1}]

(*    6^(2/3) c^(1/3) x^(5/2) (1 + 6 Log[x]) == 3 b Log[x]^(2/3)     *)

Find the x value of the minimum for given b and c, ignoring error messages.

fr21[b_, c_] := (xf = x /. FindRoot[dequ[x, b, c], {x, 2, 1, 100}]) //

Plot3D[fr21[b, c], {b, 0, 12}, {c, 10^-3, 1}]

enter image description here

Control it, showing the minimum for given b,c

pl[b_, c_] := 
   Plot[f[x, b, c], {x, 1, 12}, 
    Epilog -> {PointSize[Large], Red, 
      Point[{fr21[b, c], f[fr21[b, c], b, c]}]}]

Manipulate[pl[b, c], {{b, 10}, 0, 20}, {{c, 1/2}, 0, 1}]

enter image description here

  • $\begingroup$ Thanks for this Akku, this is very helpful. $\endgroup$
    – Paul K
    Jul 7, 2017 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.