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


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

Re: bug ?

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-10-26 21:37 +0000
Last post2011-10-26 21:37 +0000
Articles 1 — 1 participant

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: bug ? DrMajorBob <btreat1@austin.rr.com> - 2011-10-26 21:37 +0000

#5885 — Re: bug ?

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-10-26 21:37 +0000
SubjectRe: bug ?
Message-ID<j89uis$t97$1@smc.vnet.net>
That's odd!

If f is continuous, all eight outputs should represent the same number,  
but N gives 4 distinct results:

Clear[f, s]
f[s_] = -(((s (4 s - 5)^2 - (5 + 3 Sqrt[17])/
            8 (4 s + 1)) ((4 s - 5)^2 -
          4 (5 + 3 Sqrt[17])/8 (4 s - 7)))/(16 s^2 - 32 s - 1)^2);
rp = 1/4 (4 + Sqrt[17]);
four = {Limit[f@s, s -> rp], f@rp, Simplify@f@rp, f@N@rp};
Grid@{four, N@four}

(output suppressed)

four//Column
1/544 (331-19 Sqrt[17])
-((((-1+Sqrt[17])^2-1/2 (-3+Sqrt[17]) (5+3 Sqrt[17])) (1/4 (-1+Sqrt[17])^2  
(4+Sqrt[17])-1/8 (5+Sqrt[17]) (5+3 Sqrt[17])))/(-1-8  
(4+Sqrt[17])+(4+Sqrt[17])^2)^2)
1/16 (1+2 Sqrt[17])
0.09375


N@four//Column
0.46445
0.
0.577888
0.09375

Bobby

On Tue, 25 Oct 2011 05:16:06 -0500, swiss <gregoire.nicollier@hevs.ch>  
wrote:

> Following rational function has a double pole matched by a double root  
> at (4+\sqrt{17})/4. The first result is correct, the other ones are  
> false, but come without warning. Can somebody explain this to me?
>
> In[50]:= Limit[-(((s (4 s - 5)^2 - (5 + 3 Sqrt[17])/
>       8 (4 s + 1)) ((4 s - 5)^2 -
>      4 (5 + 3 Sqrt[17])/8 (4 s - 7)))/(16 s^2 - 32 s - 1)^2),
>  s -> 1/4 (4 + Sqrt[17])]
>
> Out[50]= 1/544 (331 - 19 Sqrt[17])
>
> In[51]:= 1/544 (331 - 19 Sqrt[17]) // N
>
> Out[51]= 0.46445
>
> In[52]:= -(((s (4 s - 5)^2 - (5 + 3 Sqrt[17])/
>        8 (4 s + 1)) ((4 s - 5)^2 -
>       4 (5 + 3 Sqrt[17])/8 (4 s - 7)))/(16 s^2 - 32 s - 1)^2) /.
>   s -> 1/4 (4 + Sqrt[17]) // Simplify
>
> Out[52]= 1/16 (1 + 2 Sqrt[17])
>
> In[53]:= 1/16 (1 + 2 Sqrt[17]) // N
>
> Out[53]= 0.577888
>
> In[54]:= -(((s (4 s - 5)^2 - (5 + 3 Sqrt[17])/
>       8 (4 s + 1)) ((4 s - 5)^2 -
>      4 (5 + 3 Sqrt[17])/8 (4 s - 7)))/(16 s^2 - 32 s - 1)^2) /.
>  s -> 1/4 (4 + Sqrt[17.])
>
> Out[54]= 0.09375
>


-- 
DrMajorBob@yahoo.com

[toc] | [standalone]


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


csiph-web