Re: better than a quartic?

From: Dirk Van de moortel (dirkvandemoortel_at_ThankS-NO-SperM.hotmail.com)
Date: 07/04/04


Date: Sun, 04 Jul 2004 10:44:04 GMT


"Carlo" <Carlo_02@libero.it> wrote in message news:8360fe46.0407032318.5fe3b6b7@posting.google.com...
> > > t1 = t5 + (t5-t4)^1/( (t5-t3)*(Pb-1) )
> >
> > Are you sure that shouln't be
> > t1 = t5 + (t5-t4)^2/( (t5-t3)*(Pb-1) )
> > ?
> >
>
> yeah, you're right, seems like I can't even type correctly :))
>
> > You could solve the first equation for t1 and get a nice quadratic
> > dependent on t5, giving two solutions t1a(t5) and t1b(t5).
> > Likewise you get a similar result when solving the second equation
> > for t5, giving two solutions t5a(t1) and t5b(t1).
> >
> > The you choose some initial value for t5 and calculate the sequences
> > t1a(t5), t5a(prev), t1a(prev), t5a(prev), t1a(prev), t5a(prev), ...
> > t1a(t5), t5b(prev), t1a(prev), t5b(prev), t1a(prev), t5b(prev), ...
> > t1b(t5), t5a(prev), t1b(prev), t5a(prev), t1b(prev), t5a(prev), ...
> > t1b(t5), t5b(prev), t1b(prev), t5b(prev), t1b(prev), t5b(prev), ...
> > until they converge.
>
> But then, given that I need the 4 (pairs of) solutions, how do I
> choose the initial values?

Just pick one for t5 and see what happens.
You made me wonder... so I had a try with Excel...

With your values for t2,t3,t3,Pa,Pb you get
        t1a(t5) = p - q*t5 - q*sqrt(t5^2+228*t5-684)
        t1b(t5) = p - q*t5 + q*sqrt(t5^2+228*t5-684)
  where
            p = ( 2*t2 - t3*(1-Pa) ) / (2*Pa) = 3
            q = (1-Pa)/(2*Pa) = 0.026315789
and

        t5a(t1) = r - s*t1 - s*sqrt(t1^2-492*t1+5796)
        t5b(t1) = r - s*t1 + s*sqrt(t1^2-492*t1+5796)
  where
            r = ( 2*t4 - t3*(1-Pb) ) / (2*Pb) = 12.47368421
            s = (1-Pb)/(2*Pb) = 0.026315789

I tried it with an initial value of t5 = 10 and I found:
        t1a(t5), t5a(prev), t1a(prev), t5a(prev), t1a(prev), t5a(prev), ...
                giving t1 = 1.593909109 and t5 = 10.56826594
        t1a(t5), t5b(prev), t1a(prev), t5b(prev), t1a(prev), t5b(prev), ...
                giving t1 = 3.857724087 and t5 = 10.72603274
        t1b(t5), t5a(prev), t1b(prev), t5a(prev), t1b(prev), t5a(prev), ...
                giving t1 = 1.23257733 and t5 = 14.33728027
        t1b(t5), t5b(prev), t1b(prev), t5b(prev), t1b(prev), t5b(prev), ...
                giving t1 = 4 and t5 = 14
(all this after 6 iterations)
You can check whether these solutions for t5 satisfy that
quartic in X. They seem to do :-)

> I was thinking of solving the quartic, then use the "inaccurate"
> solutions as starting points for another algorithm. In fact, I was
> thinking of putting back the solutions to the quartic into the
> original equations, and using something simple like Newton to converge
> to a more accurate solution. This is slightly different from what you
> suggest, though somehow similar.

There is no reason to feed the solutions of the quartic into some
other scheme, since the coefficients of the quartic itself are exact,
and since you will find solutions for t5 with any precision you need.

>
> I have a simple (?) question about your approuch though: do we have
> some guarantee of convergence of the sequences? Is it "theoretically"
> better than the approach above?

It's a simple question alright, but that course on numerical analysis
is too many years in the past...
I'm glad my intuition didn't fail me here :-)

Dirk Vdm