Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2015

Re: Why Indeterminate?

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Why Indeterminate?
Date 2011-05-01 10:21 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ipjc6m$j03$1@smc.vnet.net> (permalink)

Show all headers | View raw


On 4/30/11 at 5:53 AM, tmatsoukas@me.com (Themis Matsoukas) wrote:

>Consider this expression:

>A[a_List, x_] := x (1 - x)  \!\( \*UnderoverscriptBox[\(\[Sum]\),
>\(j = 1\), \(2\)] \*FractionBox[\(a[[j]] \*SuperscriptBox[\((1 - 2\
>x)\), \(j - 1\)]\), \(1 - a[[3]] \((1 - 2  x)\)\)]\)
>a = Range[3];

>Evaluation at x=0.5 gives

>A[a, 0.5]

>Indeterminate

>..but I can get the right answer if I use

>A[a, x] /. x -> 0.5

>0.25

>What puzzles me is that there is no obvious indeterminacy in the
>original expression at x=0.5.

But there is an indeterminate term. When x = 0.5, 1 - 2 x is 0.
This term appears both in the numerator and denominator of your
expression as a multiplicative term giving 0/0 an indeterminate
expression as reported by Mathematica.

But when you do the sum symbolically it reduces to:

In[25]:= A[a, x] // Simplify

Out[25]= ((x - 1)*x*(4*x - 3))/(6*x - 2)

which has no zero term when x = .5

A couple of asides. First, your post would be much easier to
read had you first converted your expression to input form
before pasting in to the email. That is:

A[a_List, x_] :=
  x*(1 - x)*Sum[(a[[j]]*(1 - 2*x)^(j - 1))/(1 - a[[3]]*(1 - 2*x)),
        {j, 1, 2}]
a = Range[3];

is much easier to read and understand than what you posted.

Second, the way I quickly found the problem was by making use of
Trace. When you run into problems like this, going through the
output of Trace will often make the problem more apparent.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Why Indeterminate? Bill Rowe <readnews@sbcglobal.net> - 2011-05-01 10:21 +0000

csiph-web