# Speeding up minimization problem related to a minimal surface

I am trying to find the minimum of the function $$f(x)=\int_0^1(1+t^x)\sqrt{1+x^2 t^{2(x-1)}}dt$$ which arises from trying to minimize the surface area of a function rotated around the $$x$$ axis. Here I am letting that function be equal to $$1+t^x$$ to obtain an upper bound on the minimum value. Anyway, I used

FindMinimum[ Integrate[(1 + t^x)(1 + x^2 t^(2(x - 1)))^(1/2), {t,0,1}], {x,0,10}]


to find the minimum, and it just kept loading. Is it possible to make it easier for Mathematica to compute it quicker? I have only started to use Mathematica a few days ago and not regularly, so please avoid any "jargon" in your answer.

Edit: After checking Mathematica it says:

This is not true because $$f(0)=2$$.

Apparently it is lagging this hard?

• Welcome to the Mathematica Stack Exchange. Does this integral evaluate to a function?
– Syed
Jan 31 at 3:47
• @Syed Yes, notice that we are integrating with respect to $t$ and not $x$. Jan 31 at 4:56

Calculating the integral without any assumptions we obtain a ConditionalExpression which may not work quite seamlessly with FindMinimum. When we tackle an involved analytic expression and we expect that it takes a while to find a symbolic integral and a natural remedy might be a numeric definition of the function.

Numeric definition

fn[x_?NumericQ] := NIntegrate[(1 + t^x) (1 + x^2 t^(2 (x - 1)))^(1/2), {t, 0, 1}]
Plot[ fn[x], {x, 0.1, 5}, AxesOrigin -> {0, 2}]


and one can find the minimum, e.g.

FindMinimum[ fn[x], {x, 0.1, 3}]

{2.08127, {x -> 1.65739}}


Symbolic definition

We can also calculate the integral analytically, however it takes a minute or so, but one shouldn't expect much faster processing when hypergeometric functions are involved. We define a piecewise function:

fi[x_, a_] := Integrate[(1 + t^x) (1 + x^2 t^(2 (x - 1)))^(1/2), {t, 0, 1},
Assumptions -> a]
f[x_] = Piecewise @ Table[{fi[x, a], a}, {a, {0 < x < 1, x == 1, x > 1}}];


and now we can find the maximum e.g.

NMinimize[{f[x], 1 < x < 3}, x]

{2.08127, {x -> 1.65739}}

Plot[f[x], {x, 0.1, 5}, AxesOrigin -> {0, 2},
Epilog -> {Red, PointSize[0.02], Point[{1.65739, 2.08127}]}]


Sometimes one could also find a symbolic expression for the minimum but this is a different story which cannot be always successful especially when hypergeometric functions are involved.

Surface

RevolutionPlot3D[f[x], {x, 0.01, 3}, Exclusions -> x == 1.65739,
Boxed -> False, Axes -> False,
PlotStyle -> Directive[Yellow, Specularity[White, 30], Opacity[0.3]],
RevolutionAxis -> { 1, 0, 0}, Mesh -> {6, 15},
MeshFunctions -> {#1 &, #2 &}, MeshStyle -> {Red, Darker@Cyan}]


• That’s what I got through Desmos as well. So the moral here is if Mathematica can’t integrate then we make it analytically integrate? Jan 31 at 4:57
• We should take a chance to calculate a numeric integral instead of symbolic one when we expect an immediate result. Analytic expressions are worthy but also expensive. Jan 31 at 5:22