Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Numerical solution of quadratic equations set.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58249] Re: Numerical solution of quadratic equations set.
  • From: Peter Pein <petsie at dordos.net>
  • Date: Fri, 24 Jun 2005 02:50:17 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Stepan Yakovenko schrieb:
> Dear MathGroup experts!
>
> I've got a system of quadratic equations with many (57)
> variables. Number of equations is less (38), so there may
> be an infinite set of solutions. Also I've got an
> aproximate solution that gives a good discrepancy. I want
> Mathematica to find some solution or/and improve the
> existing one. I'm interested in real (not complex)
> solutions.
>
> Here's what I've tried with no result:
>
> NSolve[eq ==== 0, var] - gives no solutions.
> FindInstance[eq====0,var,Reals] - gives no solutions.
> FindRoot[] says that there's not enough equations (yes,
> there isn't, but I'm interested only in one solution).
>
> I guess there are some options, I've no idea of, that make
> these functions work fine. Or may be I'm doing something
> wrong?
>
> I'd be very thankful if you spend some minutes on my
> problem if you've got experience in using Mathematica
> built-in solvers.
>
> And, of course the equations and the approximate solution
> (just CopyPaste them).
>
> eq/.sol says that the solution is good.
>
...

> 
> -----------------------------------------------------------

Dear Stepan,

I've been quite successful by minimizing the sum of squares of the
elements of eq:

{tomin, start} == {eq . eq, Transpose[{var, var /. sol}]} /.
  x_?NumericQ :> SetPrecision[x, Max[Precision[x], 100]];

sol2 == FindMinimum[tomin, start, PrecisionGoal -> 32,
  AccuracyGoal -> 32, WorkingPrecision -> 100,
  MaxIterations -> 1234][[2]];

N[(tomin /. #1 & ) /@ {sol1, sol2}]
yields
{1.8553410543246144*^-17, 3.1572401292448315*^-32}

If you've got a lot of time and memory, you could try
Minimize[{Rationalize[tomin], var \[Element] Reals}, var]
but I really don't know how long or how much memory this will need.

Peter Pein


  • Prev by Date: Re: Pattern Matching
  • Next by Date: Re: Numerical solution of quadratic equations set.
  • Previous by thread: Re: Numerical solution of quadratic equations set.
  • Next by thread: Re: Numerical solution of quadratic equations set.