help-octave
[Top][All Lists]
Advanced

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

Re: fsolve shows repeated results


From: Nicholas Jankowski
Subject: Re: fsolve shows repeated results
Date: Fri, 16 Oct 2015 20:04:47 -0400


On Oct 16, 2015 7:50 PM, "Nicholas Jankowski" <address@hidden> wrote:
>
> On Oct 16, 2015 7:29 PM, "Fausto Arinos de A. Barbuto" <address@hidden> wrote:
> >
> > On 16-10-2015 19:04, Nicholas Jankowski wrote:
> >>
> >> ok, I was curious:
> >>
> >>
> >>  >> xf = [0.1:0.5:5];
> >>  >> yf = xf.*tan(xf) - 42;
> >>  >> x = linspace(0,10,1000);
> >>  >> plot(x,x.*tan(x) - 42.0,xf,yf,'r*')
> >>
> >> seems to make sense now why one skipped over to the 7.6 value.  it's on a very low slope section
> >> of the graph. something in the algorithm made it jump far to the right, and it found itself on a
> >> new section to find a new zero.
> >>
> >
> > 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.
> >
> >
> > Fausto
> >
>
> Don't have the help in front of me, but i thought Most of these solvers had an option that would make convergence progression  information available.
>
> Whether it overshoots will be a combination of the local tangent , distance to the zero, size of the step chosen by the algorithm, etc. Since the zero is sitting on the upward slope of that narrow spike, not too surprising that one shoots past.
>
> Bounded methods are usually easier to control if you can Cone up with a good estimate around the root(s)
>
> Nick j.

Also, I doubt it's misbehaved. It gave you what you asked for, within the bounds provided. If you require more control you'll need to get more hands on in finding the root you want.

Nick J.


reply via email to

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