Re: Why Indeterminate?
- To: mathgroup at smc.vnet.net
- Subject: [mg118520] Re: Why Indeterminate?
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Sun, 1 May 2011 06:20:36 -0400 (EDT)
- References: <ipgm80$8tb$1@smc.vnet.net>
On 30/04/2011 10:54, 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. > > Thanks > > Themis > I presume you realise that when j=1 and x=0.5, you get a term of the form 0^0 - which is indeterminate! The reason substituting x->0.5 afterwords works, is that Mathematica performs the simplification x^0 == 1 on the assumption that x doesn't equal 0. A lot of algebraic expressions have exceptional values at which the expression blows up, but the simplifications take place on the assumption that the variables don't have these critical values. David Bailey http://www.dbaileyconsultancy.co.uk