help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] solution of 3d quadratic algebraic system


From: David Rideout
Subject: Re: [Help-gsl] solution of 3d quadratic algebraic system
Date: Tue, 30 Oct 2012 06:48:50 -0700

I would use an increasing function outside the [0,1] domain, so the
derivatives are non-zero there (and 'point back to [0,1]').  e.g.
const + |x - 1/2| + |y - 1/2| + |z - 1/2|

-David Rideout


On Tue, Oct 30, 2012 at 4:03 AM, FARKAS, Illes <address@hidden> wrote:
> Sam, thanks for the reply. I set now each f_i to a large number whenever
> its x_i is outside the [0,1] range, but still get the "iteration is not
> making progress towards solution" error when starting with (0.1,0.1,0.1) or
> (0.0,0.1,0.2). I suspect that I've made a very simple mistake somewhere :-)
>
> The other method (below), with the embedded cubes, finds the solution.
>
> Illes
>
>
> 2012/10/30 FARKAS, Illes <address@hidden>
>
>> Thanks Juan,
>>
>> The equations are smooth (const, linear and quadratic terms on the
>> r.h.s.), so the best I can come up with right now is to iterate with the
>> following method.
>>
>> (A) Initialize cube size to (1,1,1) and cube center to (x1=0.5, x2=0.5,
>> x3=0.5)
>> (B) Compute the function (f1,f2,f3) in all equidistant 11 * 11 * 11 grid
>> points of the cube
>> (C) Find shortest (f1,f2,f3) vector and based on that decide if we're done
>> (D) If we're not yet done, then:
>>    - center cube on the (x1,x2,x3) location of the shortest (f1,f2,f3)
>> vector
>>    - reduce cube size to 60%
>>    - goto (B)
>>
>> Do you think this makes sense?
>>
>> Thanks
>> Illes
>> --
>> http://hal.elte.hu/fij
>>
>>
>> 2012/10/30 Juan Pablo Amorocho <address@hidden>
>>
>>> Hi Illes,
>>> As far as I know, you can't tell Newton to stay within a "region of
>>> interest" ( @help-gnu If I'm wrong please correct me). All you can do is to
>>> provide the solver with a reasonable starting point. You could also take a
>>> look at your function around that region of interest, and see if it behaves
>>> nasty.  Maybe this could help:
>>>
>>> http://en.wikipedia.org/wiki/Newton_iteration#Practical_considerations
>>>
>>> - Juan Pablo
>>>
>>> On Oct 30, 2012, at 6:40 AM, "FARKAS, Illes" <address@hidden> wrote:
>>>
>>> > 2012/10/29 FARKAS, Illes <address@hidden>
>>> >
>>> >> 2012/10/28 Rhys Ulerich <address@hidden>
>>> >>
>>> >>>> Can you please suggest a fast GSL method / algorithm to find the
>>> >>> solutions
>>> >>>> of a quadratic 3d system of algebraic equations?
>>> >>>>
>>> >>>> In the reduced form all 3 equations have zero on the l.h.s., and on
>>> the
>>> >>>> r.h.s. there are constant, linear and quadratic terms composed of x1,
>>> >>> x2,
>>> >>>> x3 (the three variables).
>>> >>>
>>> >>> Newton iteration, especially if you provide analytic Jacobian, should
>>> do
>>> >>> well here. There may be faster things that can return multiple
>>> solutions,
>>> >>> however.
>>> >>>
>>> >>> - Rhys
>>> >>>
>>> >>
>>> >> Thanks, I've chosen the hybrid algorithm<
>>> http://www.gnu.org/software/gsl/manual/html_node/Example-programs-for-Multidimensional-Root-finding.html
>>> >
>>> >> .
>>> >
>>> >
>>> > Hello,
>>> >
>>> > The 3 variables represent biochemical concentrations normalized to the
>>> > interval [0,1]. Can I tell the solver (or another solver) that it should
>>> > stay inside this interval? I keep receiving solutions outside this
>>> > interval, which are mathematically OK, but biochemically really
>>> nonsense.
>>> > Also, with some help I'm ready to read/write the source code.
>>> >
>>> > Many thanks!
>>> >
>>> > Illes
>>>
>>>
>>
>>
>>
>>
>>
>
>
> --
> http://hal.elte.hu/fij



reply via email to

[Prev in Thread] Current Thread [Next in Thread]