sand15

520 Reputation

10 Badges

4 years, 359 days

MaplePrimes Activity


These are questions asked by sand15

I saw yesterday evening (at home) a very elegant answer to my question "Intersection of real intervals" .
Unfortunately I can't retrieve it this morning (I'm in the office)

It was something like  coulitbe('_x' ...) ... but I don't remember it entirely
I think it came from Carl Love or maybe Mac Dude

 Could you please send me it again ?

 

Thanks

Let A and B two real closed intervals.
I define b(x) as B+x for any real x ; more precisely, if B=[B1, B2], b(x) = [B1+x, B2+x]

I want to build a function f(x) such that :

  1. if  A and b(x) do not overlap then f(x) = 0
  2. otherwise f(x) is some expression of the covering length


For example : if A=[0, 2] and B=[-2,-1], then

  1. f(x) = 0 if  -1+x < 0 or -2+x > 2
  2. otherwise f(x) = L   where L is the measure of the intersection of A and b(x)


I coded a few variants using piecewise or Heaviside functions. 
In some sense I have already answered my own question ... but no one is neither elegant nor concise.

I wonder if there exist a Maple function that returns the measure of the intersection of two real intervals (when they overlap) and 0 otherwise ?

 

First 15 16 17 Page 17 of 17