help-octave
[Top][All Lists]
Advanced

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

RE: fsolve shows repeated results


From: Allen.Windhorn
Subject: RE: fsolve shows repeated results
Date: Mon, 19 Oct 2015 13:26:58 +0000

Fausto,

> -----Original Message-----
> From: help-octave-bounces
> Like the Newton-Raphson formula, whose 1st derivative f'(x) might
> intercept f(x) at a point far away from the actual root, right? Makes total
> sense. Examining your plot I observed though that there are other points
> on the same low-slope section of f(x).
> And none 'misbehaved'. There's more in this case than meets the eye, I
> guess.

Looking at the graph, I am guessing that this equation was selected as a
pathological case to test the ability of the root finder.  Meaning you, in
this case, not the algorithm :-)  It has an interval near each root where the
value changes sign, even though it does not enclose a root.  This will give
simplistic root-finding algorithms fits, though it apparently doesn't fool
fsolve.

I think the point of the problem is that you should think about what is
happening before blindly feeding the problem into the computer.
Can you change the equation into one that has the same roots, but is
well-behaved?  Hint: tan(x) = sin(x)/cos(x), and cos(x) will never be zero
AT a root (though it always will nearby).

I highly recommend "Numerical Methods that (Usually) Work", by Forman
S. Acton, as a guide to solving this kind of problem.

Regards,
Allen



reply via email to

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