Re: Simplifying polynomial and rounding problems
- To: mathgroup at smc.vnet.net
- Subject: [mg82913] Re: [mg82801] Simplifying polynomial and rounding problems
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Sat, 3 Nov 2007 03:25:00 -0500 (EST)
- References: <13454456.1194022919313.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
You can approximate the polynomial with, for instance: a1 = 1.0000000000000002 - 0.6721560269293043 s^2 - 0.32784397307069685 s^4; a2 = Rationalize[a1, 10^-14] a2 // Factor 1 - (8292319 s^2)/12336896 - (4044577 s^4)/12336896 -(((-1 + s) (1 + s) (12336896 + 4044577 s^2))/12336896) 1 is an exact root of a2, and the approximation error is a1 - a2 // InputForm 2.220446049250313*^-16 - 2.220446049250313*^-15* s^2 + 9.992007221626409*^-16*s^4 Depending on your application and the value of s, that may -- or may not -- be small enough (in theory). In practice, I doubt that you know the coefficients to more than six digits in the first place. Bobby On Wed, 31 Oct 2007 06:14:15 -0500, Isaac Martinez G. <isaac.martinez at sbcglobal.net> wrote: > I am having problems with Mathematica precision/accuracy (or whatever > you call it) > I have the following expression > A1=1.0000000000000002-0.6721560269293043s^2 - 0.32784397307069685s^4 > Now when I factorize: > There are a couple of (-1+s)(1+s) factors or something very close to 1. > Like 0.999999999999999997+s > I want to elliminate those factors but due to the fact that it is not > really 1, but 0.999999999999999997 Mathematica does not always cancel > those factors neither with A1/((-1.+s)(1.+s)) nor A1/((-1+s)(1+s)). > How can I avoid the problem of 1 versus 0.999999999999999997 > I am doing directional coupler design and I do need to elliminate some > factors from an ABCD matrix where 5 to 6 decimal places is just fine in > the last step. > I have tried > Factor[] > Cancel[] > FactorList[] > but I always have this problem and it screws up my program. > Sorry, I am new to Mathematica > > I am new to Mathematica..... > > -- DrMajorBob at bigfoot.com