~ubuntu-branches/ubuntu/trusty/gsl-ref-html/trusty

« back to all changes in this revision

Viewing changes to General-Polynomial-Equations.html

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2006-04-12 19:46:32 UTC
  • mfrom: (1.3.1 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060412194632-c9lodpl075pv9si3
Tags: 1.8-1
* New upstream release 1.8
* As with previous releases, the sources were obtained from the FSF web 
  pages by means of a wget call (c.f. the debian/rules target 'upstream')

* debian/control: Standards-Version increased to 3.6.2
* debian/copyright: Updated FSF address
* debian/rules: Set DH_COMPAT=4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html lang="en">
 
2
<head>
 
3
<title>General Polynomial Equations - GNU Scientific Library -- Reference Manual</title>
 
4
<meta http-equiv="Content-Type" content="text/html">
 
5
<meta name="description" content="GNU Scientific Library -- Reference Manual">
 
6
<meta name="generator" content="makeinfo 4.8">
 
7
<link title="Top" rel="start" href="index.html#Top">
 
8
<link rel="up" href="Polynomials.html#Polynomials" title="Polynomials">
 
9
<link rel="prev" href="Cubic-Equations.html#Cubic-Equations" title="Cubic Equations">
 
10
<link rel="next" href="Roots-of-Polynomials-Examples.html#Roots-of-Polynomials-Examples" title="Roots of Polynomials Examples">
 
11
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
 
12
<!--
 
13
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 The GSL Team.
 
14
 
 
15
Permission is granted to copy, distribute and/or modify this document
 
16
under the terms of the GNU Free Documentation License, Version 1.2 or
 
17
any later version published by the Free Software Foundation; with the
 
18
Invariant Sections being ``GNU General Public License'' and ``Free Software
 
19
Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'',
 
20
and with the Back-Cover Text being (a) (see below).  A copy of the
 
21
license is included in the section entitled ``GNU Free Documentation
 
22
License''.
 
23
 
 
24
(a) The Back-Cover Text is: ``You have freedom to copy and modify this
 
25
GNU Manual, like GNU software.''-->
 
26
<meta http-equiv="Content-Style-Type" content="text/css">
 
27
<style type="text/css"><!--
 
28
  pre.display { font-family:inherit }
 
29
  pre.format  { font-family:inherit }
 
30
  pre.smalldisplay { font-family:inherit; font-size:smaller }
 
31
  pre.smallformat  { font-family:inherit; font-size:smaller }
 
32
  pre.smallexample { font-size:smaller }
 
33
  pre.smalllisp    { font-size:smaller }
 
34
  span.sc    { font-variant:small-caps }
 
35
  span.roman { font-family:serif; font-weight:normal; } 
 
36
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
 
37
--></style>
 
38
</head>
 
39
<body>
 
40
<div class="node">
 
41
<p>
 
42
<a name="General-Polynomial-Equations"></a>
 
43
Next:&nbsp;<a rel="next" accesskey="n" href="Roots-of-Polynomials-Examples.html#Roots-of-Polynomials-Examples">Roots of Polynomials Examples</a>,
 
44
Previous:&nbsp;<a rel="previous" accesskey="p" href="Cubic-Equations.html#Cubic-Equations">Cubic Equations</a>,
 
45
Up:&nbsp;<a rel="up" accesskey="u" href="Polynomials.html#Polynomials">Polynomials</a>
 
46
<hr>
 
47
</div>
 
48
 
 
49
<h3 class="section">6.5 General Polynomial Equations</h3>
 
50
 
 
51
<p><a name="index-general-polynomial-equations_002c-solving-229"></a>
 
52
The roots of polynomial equations cannot be found analytically beyond
 
53
the special cases of the quadratic, cubic and quartic equation.  The
 
54
algorithm described in this section uses an iterative method to find the
 
55
approximate locations of roots of higher order polynomials.
 
56
 
 
57
<div class="defun">
 
58
&mdash; Function: gsl_poly_complex_workspace * <b>gsl_poly_complex_workspace_alloc</b> (<var>size_t n</var>)<var><a name="index-gsl_005fpoly_005fcomplex_005fworkspace_005falloc-230"></a></var><br>
 
59
<blockquote><p>This function allocates space for a <code>gsl_poly_complex_workspace</code>
 
60
struct and a workspace suitable for solving a polynomial with <var>n</var>
 
61
coefficients using the routine <code>gsl_poly_complex_solve</code>.
 
62
 
 
63
        <p>The function returns a pointer to the newly allocated
 
64
<code>gsl_poly_complex_workspace</code> if no errors were detected, and a null
 
65
pointer in the case of error. 
 
66
</p></blockquote></div>
 
67
 
 
68
<div class="defun">
 
69
&mdash; Function: void <b>gsl_poly_complex_workspace_free</b> (<var>gsl_poly_complex_workspace * w</var>)<var><a name="index-gsl_005fpoly_005fcomplex_005fworkspace_005ffree-231"></a></var><br>
 
70
<blockquote><p>This function frees all the memory associated with the workspace
 
71
<var>w</var>. 
 
72
</p></blockquote></div>
 
73
 
 
74
<div class="defun">
 
75
&mdash; Function: int <b>gsl_poly_complex_solve</b> (<var>const double * a, size_t n, gsl_poly_complex_workspace * w, gsl_complex_packed_ptr z</var>)<var><a name="index-gsl_005fpoly_005fcomplex_005fsolve-232"></a></var><br>
 
76
<blockquote><p>This function computes the roots of the general polynomial
 
77
<!-- {$P(x) = a_0 + a_1 x + a_2 x^2 + ... + a_{n-1} x^{n-1}$} -->
 
78
P(x) = a_0 + a_1 x + a_2 x^2 + ... + a_{n-1} x^{n-1} using
 
79
balanced-QR reduction of the companion matrix.  The parameter <var>n</var>
 
80
specifies the length of the coefficient array.  The coefficient of the
 
81
highest order term must be non-zero.  The function requires a workspace
 
82
<var>w</var> of the appropriate size.  The n-1 roots are returned in
 
83
the packed complex array <var>z</var> of length 2(n-1), alternating
 
84
real and imaginary parts.
 
85
 
 
86
        <p>The function returns <code>GSL_SUCCESS</code> if all the roots are found and
 
87
<code>GSL_EFAILED</code> if the QR reduction does not converge.  Note that due
 
88
to finite precision, roots of higher multiplicity are returned as a
 
89
cluster of simple roots with reduced accuracy.  The solution of
 
90
polynomials with higher-order roots requires specialized algorithms that
 
91
take the multiplicity structure into account (see e.g. Z. Zeng,
 
92
Algorithm 835, ACM Transactions on Mathematical Software, Volume 30,
 
93
Issue 2 (2004), pp 218&ndash;236). 
 
94
</p></blockquote></div>
 
95
 
 
96
   </body></html>
 
97