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
Asked
Active
Viewed 131 times
4 Answers
2
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}]
J. W. Perry
- 1,080
- 1
- 6
- 11
2
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}}}]

Dr. belisarius
- 115,881
- 13
- 203
- 453
1
We can use properties of Interval earlier:
f = Sin[#] + Interval[{-10, 10}]&;
IntervalIntersection @@ Array[f, 14] // N
Interval[{-9.00939, 9.00001}]
Kuba
- 136,707
- 13
- 279
- 740
0
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[14]]], 10 + Min[Sin[Range[14]]]}
{10 - Sin[14], 10 + Sin[11]}//N
{9.00939, 9.00001}
bill s
- 68,936
- 4
- 101
- 191