You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Alexander Nozik <al...@gmail.com> on 2013/08/05 13:21:02 UTC

[math] Not using borders in NewtonRaphsonSolver

Hello,
I believe it is not a bug but rather some kind of feature, but method 
solve in NewtonRaphsonSolver  does not in fact use the specified 
borders, only middle point. If the root is close to one of borders it 
could eventually go out of the interval. It is not very good especially 
when the function defined only in the specified range.
Additionally it would be got to have ton only f(x)=0 solver but also 
f(x) = a solver. It is easy to transform a function but default method 
for that would be good.

With best regards,
Alexander Nozik.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [math] Not using borders in NewtonRaphsonSolver

Posted by Gilles <gi...@harfang.homelinux.org>.
Hello.

On Mon, 05 Aug 2013 15:21:02 +0400, Alexander Nozik wrote:
> Hello,
> I believe it is not a bug but rather some kind of feature, but method
> solve in NewtonRaphsonSolver  does not in fact use the specified
> borders, only middle point. If the root is close to one of borders it
> could eventually go out of the interval. It is not very good
> especially when the function defined only in the specified range.

The class implements the standard algorithm (where the search is not
limited to a bracketing interval). Shortcomings of the method are
described in
   http://en.wikipedia.org/wiki/Newton_Raphson

We already had an occurrence of modifying a standard algorithm (look 
for
the issue concerning "RegulaFalsiSover").
In the above page, there are hints that it would be possible to create
an more robust version of Newton-Raphson; cf.
  
http://en.wikipedia.org/wiki/Successive_over-relaxation#Other_applications_of_the_method
Perhaps, you could experiment with it; and then propose an improvement
on the "dev" ML.

> Additionally it would be got to have ton only f(x)=0 solver but also
> f(x) = a solver. It is easy to transform a function but default 
> method
> for that would be good.

IMHO, this is quite easy to overcome, i.e. by finding the root of
   g(x) = f(x) - a
and does not warrant additional code in Commons Math.


Best,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org