Re: Newton's method in a different-looking fortran
- From: "e p chandler" <epc8@xxxxxxxx>
- Date: 18 Oct 2006 13:48:09 -0700
Elijah Cardon wrote:
<mecej4@xxxxxxxxx> wrote in message
news:1161184856.000834.287190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Lane Straatman wrote:Weak batteries had a lot to do with it. If you make a plot of two different
<-- CUT -->
I go out and buy the wrong batteries for my calculator, but I have it as
about a fifty fifty as to whether Newton's Method is going to work on
this
one. I've been doing some pretty good damage on the vb side of getting
it
to talk to a fortran dll. There's a lot of gotchas in working up
syntaxes
that you haven't touched in a coon's age, but the vb folks are quite
friendly and helpful. I post there with this moniker. As to the
derivative
being wrong, there is an open question about order of operations in the
original post; I was using it as a means to figure out fortran with a
well-known algorithm. LS
For a real-root finding routine to work, these are the requirements:
(i) The equation has a real root.
(ii) For an algorithm that needs analytical derivatives, code the
correct derivative.
(iii) If the algorithm is not globally convergent, provide a good
starting guess for the root.
As posted, the reasons that your code failed have more to do with not
meeting even one of these requirements, rather than weak batteries or
weak Fortran.
sides of an equation that don't touch, you wouldn't fiddle with a program to
fix it. Without a feel for the problem, you can make every error known to
man, or invent a new one. At Brigham Young, they taught us 3DBSNUB for
solving problems. That's a mnemonic for--well, I can't remember, but one of
the d's was diagram, and you had to have a feel for what kind of number you
were looking for. That I was chasing a billiken points to poor preparation.
EC
Pencil and paper drawings make it clear that B A ^ X = X, for A > 0 B >
0 X > 0
has one solution if A <= 1 and 0, 1 or 2 if A > 1. In the original
problem, the difference between B A^X and X reaches a minimum which is
always positive.
f''(x) is always non-negative so the curve is convex. Thus it has a
minimum - where f'(x)=0. Roots exist IFF f(x-min) is <= 0. Note that
roots might be excluded from the solution set if X < 0.
Converting the original equation and some algebra gives rise to the
equation I posted for A > 1. Otherwise since if A < 1, A^X is strictly
decreasing while X/B is strictly increasing, hence it has one
intersection. .....
-- elliot
.
- References:
- Newton's method in a different-looking fortran
- From: Elijah Cardon
- Re: Newton's method in a different-looking fortran
- From: beliavsky
- Re: Newton's method in a different-looking fortran
- From: Elijah Cardon
- Re: Newton's method in a different-looking fortran
- From: glen herrmannsfeldt
- Re: Newton's method in a different-looking fortran
- From: e p chandler
- Re: Newton's method in a different-looking fortran
- From: Lane Straatman
- Re: Newton's method in a different-looking fortran
- From: mecej4
- Re: Newton's method in a different-looking fortran
- From: Elijah Cardon
- Newton's method in a different-looking fortran
- Prev by Date: Re: help on ifort compiler
- Next by Date: defaultlib "libc.lib" conflicts with
- Previous by thread: Re: Newton's method in a different-looking fortran
- Next by thread: Re: Newton's method in a different-looking fortran
- Index(es):
Relevant Pages
|