Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Math Problem in Mathematica

In article <694bda$>, Daniel <>

> The problem I would like to formulate in Mathematica is: Let f[i,j] =
> Abs[Sqrt[1-(i/n)^2]-j/n]. i and j run from  1 to n, and n is a fixed
> integer >=1.  I want to find the  sum S of the minimum of f over j, for
> each i for given n.
> Example: n=7.  Min (i=1, j from 1 to 7)= .01
>                Min (i=2, """          )= .04
>                Min (i=3, ...           = .05
>                etc.
> and the sum S = 0.20.   
> FindMinimum seemed like the right idea, but I don't know how to make it
> work for a function of discrete values.
> The problem appears as Problem 10365 in AMM. 
> Daniel Tisdale

This simple implementation seems to be what you want  (it used the
function Min); but, I dont seem to get exactly  the same numerical
results that you note in your post.   Perhaps I misunderstood...or...?



f[i_,j_,n_] :=Abs[Sqrt[1-(i/n)^2]-j/n];

MinfOverj[i_,n_]:=Min[Table[ f[i,j,n], {j,1,n}]];


Here are the minima for n=7 for i=1 to 7

In[2]:= Table[MinfOverj[i,7],{i,1,7}]//N



And this is the sum:

In[3]:= SumMins[7]//N

Out[3]= 0.348436

David Reiss
To send personal email, remove the words  "nospam" and "NOSPAM" from the
email address

  • Prev by Date: permutation groups
  • Next by Date: Re: Easy question: Infinite Series, Infinite Sequences
  • Prev by thread: Re: Math Problem in Mathematica
  • Next by thread: Re: Math Problem in Mathematica