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


Groups > comp.soft-sys.math.mathematica > #1935 > unrolled thread

Why Indeterminate?

Started byThemis Matsoukas <tmatsoukas@me.com>
First post2011-04-30 09:54 +0000
Last post2011-05-01 10:21 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Why Indeterminate? Themis Matsoukas <tmatsoukas@me.com> - 2011-04-30 09:54 +0000
    Re: Why Indeterminate? David Bailey <dave@removedbailey.co.uk> - 2011-05-01 10:20 +0000
    Re: Why Indeterminate? Stefan <wutchamacallit27@gmail.com> - 2011-05-01 10:21 +0000

#1935 — Why Indeterminate?

FromThemis Matsoukas <tmatsoukas@me.com>
Date2011-04-30 09:54 +0000
SubjectWhy Indeterminate?
Message-ID<ipgm80$8tb$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#2013

FromDavid Bailey <dave@removedbailey.co.uk>
Date2011-05-01 10:20 +0000
Message-ID<ipjc60$ivj$1@smc.vnet.net>
In reply to#1935
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

[toc] | [prev] | [next] | [standalone]


#2018

FromStefan <wutchamacallit27@gmail.com>
Date2011-05-01 10:21 +0000
Message-ID<ipjc7c$j0l$1@smc.vnet.net>
In reply to#1935
On Apr 30, 5:54 am, Themis Matsoukas <tmatsou...@me.com> 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

Themis,

   The message generated is Power::indet: Indeterminate expression
0.^0 encountered. >>
   A closer look shows that in your sum, when the index j is = 1, you
have the expression (1-2*0.5)^(1-1) = 0^0
this is indeterminate, since we dont know anything about how x and j
are related to eachother to do any sort of L'Hopital calculation to
resolve the problem.
When you run it for arbitrary x, it evaluates (1-2x)^(1-1) as
(1-2x)^0, and evaluates this to 1, a perfectly good assumption for all
(1-2x) =/= 0. This is the source of the error, but its hard to say if
its actually a problem or not without context.
-Stefan Salanski

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web