# how do I can create a list of the first interval such as [-10+Sin [k], 10+Sin [K]]

A (k) =the closed interval [-10+Sin [k], 10+Sin [k]] How do I can create a list of the first 20 of such interval The find the intersection of the first 14 of them

• Is k integer? Use Range and IntervalIntersetcion[] – Dr. belisarius Dec 1 '13 at 17:01
• Yes k is an integer number – mais Dec 1 '13 at 17:07

c = IntervalIntersection @@ (Array[ Interval[{-10 + Sin[#], 10 + Sin[#]}] &, {20}][[;; 14]])

Graphics[{Array[Line[{{-10 + Sin[#], #}, {10 + Sin[#], #}}] &, {14}],
Red, c /. Interval[{x_, y_}] -> Line@{{x, 0}, {y, 0}}}] The code

ak = N[Table[Interval[{-10 + Sin[k], 10 + Sin[k]}], {k, 1, 20}]];


computes the first 20 as intervals. Remove the N[ ] wrapper for the exact values. You can then compute the intersection of the first 14 as closed intervals with

IntervalIntersection @@ ak[[1;;14]]


Finally this is the correct intersection: Interval[{-9.00939, 9.00001}]

• What's @ means? ? – mais Dec 1 '13 at 17:14
• @Nana @@ -Apply. Difference between @ and @@. – Kuba Dec 1 '13 at 17:14
• .. thank you :-) – mais Dec 1 '13 at 17:18
• I see the problem 1 sec – J. W. Perry Dec 1 '13 at 17:20
• I'm really confuse now... what is the corect code in this case? – mais Dec 1 '13 at 17:21

We can use properties of Interval earlier:

f = Sin[#] + Interval[{-10, 10}]&;
IntervalIntersection @@ Array[f, 14] // N

Interval[{-9.00939, 9.00001}]


You can answer this question without knowing anything about interval functions: the intersection of all the intervals is the interval between (10-largest value of Sin) and (10+smallest value of Sin). With Sin assuming integer values between 1 and 14, this is:

{10 - Max[Sin[Range]], 10 + Min[Sin[Range]]}
{10 - Sin, 10 + Sin}//N
{9.00939, 9.00001}