Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Solve Equation Symbolically
Date: Tue, 13 Nov 2007 02:42:42 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 61
Message-ID: <fhb2v2$jqi$1@canopus.cc.umanitoba.ca>
References: <fha99r$osc$1@fred.mathworks.com> <fhag57$bca$1@fred.mathworks.com> <fhaiam$k8$1@canopus.cc.umanitoba.ca> <fhajsd$bcg$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1194921762 20306 192.70.172.160 (13 Nov 2007 02:42:42 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Tue, 13 Nov 2007 02:42:42 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:437226



In article <fhajsd$bcg$1@fred.mathworks.com>,
evan klinger <eklinger1-nospam@cox.net> wrote:
>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
>message <fhaiam$k8$1@canopus.cc.umanitoba.ca>...
>> In article <fhag57$bca$1@fred.mathworks.com>,
>> evan klinger <eklinger1-nospam@cox.net> wrote:
>> >Is there a way to increase the 25,000 character limit? I
>> >really need to solve up to cv12,

>> you are trying to find the closed form solution to a
>polynomial
>> of order 12 that does not happen to be factorable down

>So what are my options here? I would like a closed form
>solution so that I can plug in values into the variables
>directly and solve, but if that's not possible, is there any
>alternative?

What kind of ranges of values can your constants take?
I've been playing around with some test values, and it looks to
me as if you could easily encounter severe problems with loss of
precision in your calculations, especially if cr > 2.

With random values between -1 and 1 for the cv12 variables, it
was fairly common in my trials for there to be an x root somewhere
just a bit more than 2, but that by x = 3 that the function value
had risen beyond 10^8 or 10^9 -- but with another one of my trials,
the roots ranged from -7 to +4 . 

Unless your values (especially cr) are fairly small, I suspect
you will lose precision so quickly as to make it very doubtful that
you would be able to accurately find the equation roots.

cr is the biggest contribution to the problem: as well as
cv12 being a 12th order polynomial in x, it is also a 12th order
polynomial in cr (cr and x will have the same polynomial order
as each other in each cv*). Thus even a small change in cr can
make a big change in the x roots. And a small change in cr can
result in -different- 12th order roots becoming the real-valued
roots, so even if you had an closed form solution for one of the
12th-order roots, that root might become imaginary with a small
change in parameters.

For example, in a particular trial I did
with random values for the parameters except p3, for p3=1/3,
the first and 7th roots were the real roots, but for p3=1/2,
the 6th and 7th roots were the real roots -- and p3 appears only
in its first power in cv12.


If I recall correctly, I have seen mention of a FEX contribution
that generalizes fzero() to find multiple roots. You are
probably going to have to use something like that, and to
figure out what you want to do with the multiple roots that are
found, but with some kinds of checks in place to ensure that you
are not finding spurious roots (or failing to find valid roots)
due to loss of precision.
-- 
We regret to announce that sub-millibarn resolution bio-hyperdimensional
plasmatic space polyimaging has been delayed until the release
of Windows Vista SP2.