Re: Problem with Interval Calculations?
- To: mathgroup at smc.vnet.net
- Subject: [mg30886] Re: [mg30868] Problem with Interval Calculations?
- From: BobHanlon at aol.com
- Date: Sun, 23 Sep 2001 02:16:26 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 2001/9/21 4:11:43 AM, garnold at mbvlab.wpafb.af.mil writes:
>Mathematica 4.1 gives me the following:
>
>In[1]:= expr=a*(1-a)
>Out[1]= (1-a) a
>
>In[2]:= expr /. a->Interval[{1,2}]
>Out[2]= Interval[{-2,0}]
>
>In[3]:= Expand[expr]
>Out[3]= a - a^2
>
>In[4]:= Expand[expr] /. a->Interval[{1,2}]
>Out[4]= Interval[{-3,1}]
>
>What gives? Should the answer be the same? I believe the expanded answer,
>but I'm not sure expanding every problem before assigning the interval
>is
>practical.
>
expr = a*(1-a);
expr /. a -> Interval[{1, 2}]
Interval[{-2, 0}]
Expand[expr] /. a -> Interval[{1, 2}]
Interval[{-3, 1}]
Plot[expr, {a, 1,2}];
I believe the first result. Applying Simplify or FullSimplify before
assigning the interval would produce better results.
Bob Hanlon
Chantilly, VA USA