better than a quartic?
From: Carlo (Carlo_02_at_libero.it)
Date: 07/03/04
- Next message: ben: "simple, quick notation q: what do the "."s mean in this?"
- Previous message: Aardpig: "Re: What is Gerry Thomas's Contribution to NG's"
- Next in thread: Dirk Van de moortel: "Re: better than a quartic?"
- Reply: Dirk Van de moortel: "Re: better than a quartic?"
- Reply: John R Ramsden: "Re: better than a quartic?"
- Reply: Ken Turkowski: "Re: better than a quartic?"
- Reply: neale: "Re: better than a quartic?"
- Messages sorted by: [ date ] [ thread ]
Date: 3 Jul 2004 07:17:07 -0700
I have to solve this set of equations:
t5 = t1 + (t1-t2)^2/( (t1-t3)*(Pa-1) )
t1 = t5 + (t5-t4)^1/( (t5-t3)*(Pb-1) )
t1 and t5 are unknown. t2, t3, t4, Pa, Pb are known.
In practice, these properties are also true:
0 < t2 < t3 < t4
0 < Pa < 1
0 < Pb < 1
With some manipulation, I can turn the equations above into a quartic,
and solve it numerically (I know there is also a symbolic solutions to
a quartic, however, the coefficients of this quartic are already a
mess, never mind the symbolic quartic solution...). Once I get t1 or
t5 this way, I can find the other easily by applying one of the above.
Unfortunately, with the numbers I have to play with, the quartic is
relatively a mess. For instance, when I have
t2=3
t3=6
t4=12
Pa=0.95
Pb=0.95
I have to solve:
-0.855 X^4 + 42.435 X^3 - 784.4625 X^2 + 6400.89 X - 19453.77
In other cases, the constant coefficient goes up to 10^11 while the
X^4 coefficient remains below 1.
In practice, I've tried a few algorithms (straight from the net :-) to
solve the quartic, (e.g. Descartes, Ferrari, Neumark, Yacoub &
Fraidenraich, Christianson), and it seems like the results I'm getting
are not very accurate. Programs like MuPad get the solutions "right",
but I need something that I can integrate in a small program I'm
writing, and I can't have a dependency on third-party components.
My questions are:
- is there a better way to solve the original equations, without
turning them into a quartic? I need the 4 solutions, having only one
won't do!
- if the quartic is the "best" way, is there some algorithm that works
well in cases like mine, where the coefficients (usually) have
different orders of magnitude?
Thanks a lot!
Carlo
Carlo_02 /at/ libero.it
- Next message: ben: "simple, quick notation q: what do the "."s mean in this?"
- Previous message: Aardpig: "Re: What is Gerry Thomas's Contribution to NG's"
- Next in thread: Dirk Van de moortel: "Re: better than a quartic?"
- Reply: Dirk Van de moortel: "Re: better than a quartic?"
- Reply: John R Ramsden: "Re: better than a quartic?"
- Reply: Ken Turkowski: "Re: better than a quartic?"
- Reply: neale: "Re: better than a quartic?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|