# Finding algebraic expression for local minimum of a function with one unassigned variable

I want to find the local minimum in the region 0.5<x<=1 of a function which has an unassigned variable r (note: r is always a positive integer).

I can make FindMinimum work, but only provided I assign a specific value to r. For example:

FindMinimum[(1 + Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2*r)*x)/(1 + r)])/
(2 + 2*r) /. r -> 2, {x, 0.5}]


But how do I find the minimum in general terms, i.e., in the form {x -> f[r]} for some function f? Or is the issue that there isn't a systematic representation of this local minimum with changing r?

Note that, at least by eye, the local minimum of the original function does seem to converge for large r:

Plot[
{
(1 + Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2 r)*x)/(1 + r)])/(2 + 2 r)/. r -> 1,
(1 + Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2 r)*x)/(1 + r)])/(2 + 2 r)/. r -> 10,
(1 + Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2 r)*x)/(1 + r)])/(2 + 2 r)/. r -> 100,
(1 + Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2 r)*x)/(1 + r)])/(2 + 2 r)/. r -> 1000,
(1 + Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2 r)*x)/(1 + r)])/(2 + 2 r)/. r -> 10000
},
{x, 0.5, 1.05},
GridLines -> Automatic,
PlotRange -> {{0.5, 1.05}, {-0.25, 0.05}},
PlotLegends -> {"r=1", "r=10", "r=100", "r=1,000", "r=10,000"}
]


EDIT:

To clarify, what I am really hoping for is:

1. To define the point on the x axis which the local minimum converges towards with increasing r
2. To find a definition in terms of x (defined at the point of convergence) and r of the value of the original function with increasing r - does the value of the minimum converge on a limit? And can it be defined algebraically?

## 1 Answer

You could use NMinimize

xsol[r_?NumericQ] :=x /. NMinimize[{(1 +Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2*r)*x)/(1 + r)])/(2 + 2*r),0.5 <= x <= 1}   , x][]


xsol is the function "x[r]" you are looking for

Plot[xsol[r] , {r, 0, 100}, PlotRange -> {0, 1 } ] addenum If I understand your comment right you're looking for the asymptotic minimum of the family of curves f[x,r],r -> \[Infinity]? If yes

f[x_, r_] := (1 +Csc[(Pi*x)/(1 + r)]*Sin[(Pi*(1 + 2*r)*x)/(1 + r)])/(2 + 2*r)


the asymptode (plotted in red) and its minimum can be evaluated

asym=Series[f[x, r], {r, Infinity, 0}] // Normal
min=FindMinimum[asym, x]
(*{-0.217234, {x -> 0.715148}}*)

Show[{Table[Plot[f[x, r] , {x, 0.5, 1}], {r, {1, 2, 3, 4, 5, 10, 100, 1000,10000}}], Plot[Sinc[2 Pi x], {x, 0.5, 1}, PlotStyle -> Red]},PlotRange ->{{0.5, 1}, {-.5, .5}},GridLines -> {{{x /. min[], Red}}, {{min[], Red}}}] Perhaps that's what you're looking for?

• Thanks. Two follow-ups: (1) how would I then express xsol algebraically in terms of x and r? (2) I'm particularly interested in whether this function converges (looks likely!), and if so to what - how would I find out? – Richard Burke-Ward Sep 12 '18 at 13:27
• Hi @Ulrich Neumann, I have edited the original question to clarify what I'm looking for. Many thanks for your input; I'm already further ahead than I was! – Richard Burke-Ward Sep 12 '18 at 14:02
• @Richard Burke-Ward I edited my answer hoping it is the answer you 're looking for... – Ulrich Neumann Sep 12 '18 at 15:00
• Amazing. Just one more question: is there a way to give the x value in terms of functions of rational numbers in the same that asym gives Sin[2*Pi*x]/(2*Pi*x)? (I'll mark as answered anyway, just, it would be great if there was a way...) – Richard Burke-Ward Sep 12 '18 at 15:40
• @Richard Burke-Ward I don't expect x to be rational. More details you might find if you look for cardinal sine function – Ulrich Neumann Sep 12 '18 at 18:50