Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: "Explicit solution could not be found" in solving system of equations
Date: Sat, 4 Apr 2009 02:25:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <gr6gdv$itr$1@fred.mathworks.com>
References: <gr4h6q$rd9$1@fred.mathworks.com> <gr5deh$kgt$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1238811903 19387 172.30.248.35 (4 Apr 2009 02:25:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 4 Apr 2009 02:25:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:530228

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gr5deh$kgt$1@fred.mathworks.com>...
> "haunteagle i&#339;" <haunteagle@gmail.com> wrote in message <gr4h6q$rd9$1@fred.mathworks.com>...
> > >> solve('(a * cos(b) - 0.000)^2 + (a * sin(b) - 0.450)^2 = (a + c * t1)^2', '(a * cos(b) - 0.300)^2 + (a * sin(b) - 0.450)^2 = (a + c * t2)^2','(a * cos(b) - 0.300)^2 + (a * sin(b) - 0.000)^2 = (a + c * t4)^2','a','b','c') 
> > .......
> > "Warning: Explicit solution could not be found.
> > .......
> 
>   With some fairly messy algebraic manipulations, the 'a' and 'b' unknowns in your equations can be eliminated, leaving a single polynomial equation in the 'c' unknown of (I believe) the tenth order.  Perhaps that is why 'solve' gave up without giving you an explicit solution, since explicit solutions of such polynomials equations cannot be given in terms of elementary functions.
> 
>   However you could use the 'roots' function to obtain numerical solutions
> for specific values of 't1', 't2', and 't4', and this would avoid having to use the iterative methods of the Optimization Toolbox.
> 
> Roger Stafford

  Yes, as it turns out there is a quartic, as Walter has stated.  The unknown 'c' is a root of a quartic with the odd powers of 'c' missing, so it is actually a quadratic equation in c^2 for which it is easy to find explicit roots.  'c' must satisfy:

 k4*c^4 + k2*c^2 + k0 = 0

where

 k4 = t4^2*(t1-t2)^2*(t1-t4+t2)^2*p^2+t1^2*(t4-t2)^2*(t4-t1+t2)^2*q^2
 k2 = -(t1^2+t4^2+t2^2-2*t1*t2)*(t1^2+t4^2+t2^2-2*t4*t2)*p^2*q^2
 k0 = (t1+t4-t2)^2*(p^2+q^2)*p^2*q^2

and p = 0.450 and q = 0.300.  Thus it is not quite as frightening as it appears at first glance in Walter's solutions.

  From 'c' it is then possible to evaluate 'b' and 'a'.

Roger Stafford