Re: Newton's method in a different-looking fortran




Elijah Cardon wrote:
<mecej4@xxxxxxxxx> wrote in message
news:1161184856.000834.287190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Lane Straatman wrote:
<-- 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.
Weak batteries had a lot to do with it. If you make a plot of two different
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

.



Relevant Pages

  • Re: Newtons method in a different-looking fortran
    ... to talk to a fortran dll. ... For an algorithm that needs analytical derivatives, ... Weak batteries had a lot to do with it. ...
    (comp.lang.fortran)
  • Re: Newtons method in a different-looking fortran
    ... to talk to a fortran dll. ... For an algorithm that needs analytical derivatives, ... meeting even one of these requirements, rather than weak batteries or ...
    (comp.lang.fortran)
  • Re: Line of sight
    ... The mapping toolbox contains the ... If you had an algorithm that could answer the question definitely either way ... existence proof or existence disproof for "odd perfect numbers", ... you could map the first root of an expression ...
    (comp.soft-sys.matlab)
  • Problem with enabling LDAP over SSL with a third-party Certification Authority
    ... My setup is a single forest with a root and sub domain. ... Public Key Algorithm: ...
    (microsoft.public.win2000.active_directory)
  • Re: Roots of a multivariate polynomial
    ... polynomial problem with the following characteristics: ... The algorithm should converge from any start point, ... There is no simpleroot; ... If the degree in any of the 20-200 variables is odd, ...
    (sci.math)