[Date Index]
[Thread Index]
[Author Index]
Re: A question on interval arithmetic
*To*: mathgroup at smc.vnet.net
*Subject*: [mg43715] Re: A question on interval arithmetic
*From*: "David W. Cantrell" <DWCantrell at sigmaxi.org>
*Date*: Thu, 2 Oct 2003 02:51:09 -0400 (EDT)
*References*: <blcq5l$p5f$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Oliver Friedrich <oliver.friedrich at tzm.de> wrote:
> the resistance of 2 resistors in parallel is r1*r2/(r1+r2). Now I want to
> introduce tolerances in the resistors and ask for the range of resistance
> of the combination. One may think that e.g
>
> (r1*r2)/(r1+r2)/.{r1->Interval[{10,20}],r2->Interval[{20,40}]}
>
> would lead to the correct result, but there's a trap. If I replace the
> expressions by the intervals, Mathematica evaluates the new expression
> assuming that all four intervals are independant from each other. And
> that's not correct. Taken either the minimum or the maximum from a
> certain interval , Mathematica should stick to that, because it is
> nonsense to take Min[r1] and Max [r1] within the same expression, r1 can
> have only one value at a time.
>
> How can I avoid this problem?
The problem you describe is well known to those who deal with interval
arithmetic. (I think it is referred to as "the problem of dependence".) For
your application, this problem is trivially avoidable by writing the total
resistance using _only one instance_ of each resistance. That is, instead
of your
(r1*r2)/(r1 + r2) /. {r1 -> Interval[{10,20}], r2 -> Interval[{20,40}]}
which gives Interval[{10/3, 80/3}], which is too broad,
just use
1/(1/r1 + 1/r2) /. {r1 -> Interval[{10, 20}], r2 -> Interval[{20, 40}]}
which gives Interval[{20/3, 40/3}], as desired.
[BTW, unrelated to interval arithmetic, another nice advantage of
1/(1/r1 + 1/r2) over (r1*r2)/(r1 + r2) is that the former works
correctly even if one or both of the resistances is infinite.]
David Cantrell
Prev by Date:
**Re: Derivative**
Next by Date:
**Re: A question on interval arithmetic**
Previous by thread:
**Re: A question on interval arithmetic**
Next by thread:
**Re: A question on interval arithmetic**
| |