[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Roots of polynomials
From: |
Stephen Montgomery-Smith |
Subject: |
Re: Roots of polynomials |
Date: |
Wed, 17 Apr 2013 20:07:04 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
If you know the real part of the root of p(z), call it s, you could try
using fzero on the function
f1(t) = p(s+I*t)
Or since it is unlikely that you know s exactly, you could use fmin (in
the optim package) to miminize abs(p(s+I*t)).
On 04/17/2013 06:56 AM, Urs Hackstein wrote:
> But how can such a direct search along the imaginary part of the root be
> done? I tried to compute the integral \int_\alpha (f'/f )s over a curve
> \alpha surrounding the root, but this is still slower than the roots
> routine.
>
>
> 2013/4/17 Benjamin Abbott <address@hidden <mailto:address@hidden>>
>
> On Apr 17, 2013, at 6:49 AM, Urs Hackstein
> <address@hidden <mailto:address@hidden>>
> wrote:
>
> > Hello,
> >
> > there exists a built-in function "roots" which computes the roots
> of a given polynomial. How does octave computes these roots? This
> function is pretty fast, but are there faster functions doing the
> same? We have to compute the roots of a huge number of polynomials
> in our program, thus this could minimize the runtime.
> >
> > Or are there faster algorithms in the case that we aren't
> interested in all roots, but only in a special root whose real part
> is already known?
>
> The roots are found by constructing a matrix whose characteristic
> polynomial is a scaled version of the polynomial in question.
>
> The eigen values of that matrix are the roots of the polynomial.
>
> For the general case, this is the fastest approach. For your case a
> direct search along the imaginary part of the root may be faster.
>
> Ben
>
>