Re: InverseZTransform numerical issue on some expression, version 8.0.4

*To*: mathgroup at smc.vnet.net*Subject*: [mg126803] Re: InverseZTransform numerical issue on some expression, version 8.0.4*From*: Bob Hanlon <hanlonr357 at gmail.com>*Date*: Fri, 8 Jun 2012 03:37:22 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com

$Version 8.0 for Mac OS X x86 (64-bit) (October 5, 2011) On my Mac, I had to truncate even more to get a result sol1=InverseZTransform[ 1/(0.95122942-1.95122942 z+z^2),z,n]// Simplify \[Piecewise] 0. n<=0 20.5042 -21.5554 E^(-0.05 n) True However, if you add an assumption that n > 0 sol2=InverseZTransform[ 1/(0.9512294245007143-1.9512294245007142 z+z^2), z,n,Assumptions->{n>0}]//Simplify//Chop 20.5042 -21.5554 E^(-0.05 n) Alternatively, you can do it symbolically sol3[a_,b_]=InverseZTransform[1/(a+b*z+z^2),z,n]; sol3[0.9512294245007143,-1.9512294245007142]// Simplify//Rationalize \[Piecewise] 0 n<=0 20.5042 -21.5554 0.951229^n True Bob Hanlon On Thu, Jun 7, 2012 at 5:20 AM, Nasser M. Abbasi <nma at 12000.org> wrote: > > Using 8.0.4 on windows 7 > > --------------------------- > InverseZTransform[1/(0.9512294245007143 -1.9512294245007142 z+z^2),z,n] > --------------------------- > > does NOT generate an answer. But > > ------------------------------ > InverseZTransform[1/(0.9512294245 -1.9512294245 z+z^2),z,n] > ------------------------------ > > does. I simply chopped few digits (kept removing one digit > at a time until it worked) > > 0.9512294245007143->0.9512294245 > and > 1.9512294245007142->1.9512294245 > > In order to get a result since I had a feeling it is a numerical > issue. > > screen shot > > http://12000.org/tmp/060612/invz.png > > question is: Is this due to numerical issue? and > how to better handle this whole thing. Clearly what I did > above is not what I would do all the time. May be I am > missing an option or something else. Because in a larger > program, I would need to make sure InverseZTransform > worked all the time or a way to check if it did not work. > > thanks > --Nasser >