Post Reply 
[Free42] root finder
06-15-2016, 07:18 PM (This post was last modified: 06-15-2016 07:24 PM by Dieter.)
Post: #5
RE: [Free42] root solving
(06-15-2016 01:39 PM)Marcio Wrote:  This is the program, quite straight-forward, no optimization attempt:

OK. An optimized version would of course use ex–1. ;-)

(06-15-2016 01:39 PM)Marcio Wrote:  Free42 requires one estimate only.

And here is the reason for your problem.

Free42 should behave like a real 42s. And a real 42s uses a solver algorithm similar to earlier versions, which in turn require two guesses (or at least two that bracket the root are recommended).

After starting the solver and selecting the program to solve, you enter two (!) guesses by pressing the T menu key. For instance 1 [T], then 10 [T]. A third [T] then starts the calculation and returns the root.

If you only provide one single guess the solver seems to take the initial value of T (which is also displayed) as the other guess. If this value happens to be zero and you enter e.g. 3 or 5 or 10 as the now actually second guess, the solver runs with these two initial estimates. Since T=0 solves the equation, this result is returned immediately – regardless which other T estimate you provided. A solution has been found and so it is returned.

Try storing 0 in variable T. Start the solver. Enter 10 as only (but actually second) guess. Press [T] again to start the calculation. It will return 0 (the previous content of T) which immediately solves the equation. Although the second guess 10 is close to another root.

Now store 1E-6 in T. Start the solver again, enter 10 as (only, but second) guess, press [T] and get T=9,284255...

Or simply do it the way it was intended by HP: Start the Solver, enter two (!) guesses for T (e.g. 1 [T] 10 [T]), press [T] again without any entry, and get T=9,284255...

There always is a second guess. It's up to you to set it so that it fits your needs, or use the (random) content the solver variable happens to hold (producing more or less random results).

(06-15-2016 01:39 PM)Marcio Wrote:  Once it finds the root for t>0, which is 9.2843... it won't converge to 0 zero again unless the estimate is also zero. That is when you can't do anything further and some sort of "reset" on the solver is necessary so that other roots (different from 0) can be found. A simple integration will do the job.

Maybe you now realize why this happens. Once the root at T=9,28 has been found, this is the content of variable T. In subsequent runs of the solver you may enter any other value as the (second) guess you like – the solver has 9,28 as one of the estimates, this solves the equation, and so it is returned. This may change only if you enter another root like T=0. This also solves the equation, so this time T=0 is returned.

No integration or other "reset" is required. Just provide two guesses. Or only one while you realize that there already is a second one (the one in variable T) that influences the result.

(06-15-2016 01:39 PM)Marcio Wrote:  *The 15C's solver is even less tolerant and demands the estimates be greater than 5.

I cannot reproduce this. On my 15C emulator estimates of 1 and 10 or 2 and 8 (although they do not bracket the solution) return the larger root at 9,28.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[Free42] root finder - Marcio - 06-15-2016, 12:23 AM
RE: [Free42] root finder - Dieter - 06-15-2016, 10:09 PM
RE: [Free42] root solving - Dieter - 06-15-2016, 01:03 PM
RE: [Free42] root solving - Marcio - 06-15-2016, 01:39 PM
RE: [Free42] root solving - Dieter - 06-15-2016 07:18 PM
RE: [Free42] root finder - Marcio - 06-15-2016, 09:12 PM
RE: [Free42] root finder - Dieter - 06-15-2016, 10:04 PM
RE: [Free42] root finder - Marcio - 06-16-2016, 03:04 PM
RE: [Free42] root finder - Dieter - 06-16-2016, 05:14 PM
RE: [Free42] root finder - Marcio - 06-16-2016, 06:41 PM
RE: [Free42] root finder - Thomas Okken - 06-19-2016, 11:18 PM



User(s) browsing this thread: 5 Guest(s)