MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57886] Solve
  • From: R T <chromaticspace at yahoo.com>
  • Date: Sat, 11 Jun 2005 03:35:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I'm generating 9th degree polynomials with Mathematica
from real world data. Then I'm using them in an
application I'm writing in Xcode. This works
beautifully!  

I get an equation like... 

-0.13249751088801668 + 0.06632187456026009*r^1
+0.06629492661634432*r^2 - 0.00005387198125569*r^3 
-0.00002692675947693*r^4 + 0.00000001324872853*r^5 
+0.00000000435988550*r^6 - 0.00000000000037184*r^7
-0.00000000000043768*r^8 + 0.00000000000000172*r^9

...and in a function I wrote in Xcode, I supply r, say
 r = 5, and the answer 1.83303 is generated . BUT I
need to start with the answer and solve for r. 
 
In Mathematica...

answer = Solve[
-0.13249751088801668 + 0.06632187456026009*r^1
+0.06629492661634432*r^2 - 0.00005387198125569*r^3 
-0.00002692675947693*r^4 + 0.00000001324872853*r^5 
+0.00000000435988550*r^6 - 0.00000000000037184*r^7
-0.00000000000043768*r^8 + 0.00000000000000172*r^9 ==
1.83303, r]

...solves to...

{r -> -61.9036 - 40.911 I}, {r -> -61.9036 + 40.911
I},      {r -> -59.8256}, {r-> -6.}, {r -> 5},  {r ->
73.5579}, {r -> 82.3158 - 32.3924 I}, {r -> 82.3158 +
32.3924 I},
{r -> 200.908}}
 
and knowing from the origional real world data that r
is in a range between 0 and 16 .... the solution is 
{r -> 5}.
_________________________________________________________________

Mathmatically how does the "Solve" function do this?
My application needs to dynamically "Solve" the
equation, so I need to write something in "C".

Any leads greatly appreciated.
Thanks,
Rick T.


		
__________________________________ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html


  • Follow-Ups:
    • Re: Solve
      • From: Andrzej Kozlowski <andrzej@akikoz.net>
  • Prev by Date: Re: Re: a question about subscript
  • Next by Date: Re: "expanding a list"
  • Previous by thread: Re: Re: Portable Notebooks and Filenames[]
  • Next by thread: Re: Solve