1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xlink="http://www.w3.org/1999/xlink" >
<head>
<title>Section1.8</title>
<link rel="stylesheet" type="text/css" href="graphicstyle.css" />
<script type="text/javascript" src="bookax1.js" />
</head>
<body>
<a href="book-contents.xhtml" style="margin-right: 10px;">Book Contents</a><a href="section-1.7.xhtml" style="margin-right: 10px;">Previous Section 1.7 Writing Your Own Functions</a><a href="section-1.9.xhtml" style="margin-right: 10px;">Next Section 1.9 Limits</a>
<a href="book-index.xhtml">Book Index</a><div class="section" id="sec-1.8">
<h2 class="sectiontitle">1.8 Polynomials</h2>
<a name="ugIntroVariables" class="label"/>
<p>Polynomials are the commonly used algebraic types in symbolic
computation. <span class="index">polynomial</span><a name="chapter-1-67"/> Interactive users of Axiom
generally only see one type of polynomial: <span class="teletype">Polynomial(R)</span>.
This type represents polynomials in any number of unspecified
variables over a particular coefficient domain <math xmlns="&mathml;" mathsize="big"><mstyle><mi>R</mi></mstyle></math>. This type
represents its coefficients <span style="font-style: italic;"> sparsely</span>: only terms with non-zero
coefficients are represented.
</p>
<p>In building applications, many other kinds of polynomial
representations are useful. Polynomials may have one variable or
multiple variables, the variables can be named or unnamed, the
coefficients can be stored sparsely or densely. So-called
``distributed multivariate polynomials'' store polynomials as
coefficients paired with vectors of exponents. This type is
particularly efficient for use in algorithms for solving systems of
non-linear polynomial equations.
</p>
<p>The polynomial constructor most familiar to the interactive user
is <span class="teletype">Polynomial</span>.
</p>
<div id="spadComm1-127" class="spadComm" >
<form id="formComm1-127" action="javascript:makeRequest('1-127');" >
<input id="comm1-127" type="text" class="command" style="width: 16em;" value="(x**2 - x*y**3 +3*y)**2" />
</form>
<span id="commSav1-127" class="commSav" >(x**2 - x*y**3 +3*y)**2</span>
<div id="mathAns1-127" ></div>
</div>
<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo></mo><mrow><msup><mi>y</mi><mn>6</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>6</mn><mo></mo><mi>x</mi><mo></mo><mrow><msup><mi>y</mi><mn>4</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mrow><msup><mi>x</mi><mn>3</mn></msup></mrow><mo></mo><mrow><msup><mi>y</mi><mn>3</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>9</mn><mo></mo><mrow><msup><mi>y</mi><mn>2</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>6</mn><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo></mo><mi>y</mi></mrow><mo>+</mo><mrow><msup><mi>x</mi><mn>4</mn></msup></mrow></mrow></mstyle></math>
</td></tr>
</table>
</div>
<div class="returnType">
Type: Polynomial Integer
</div>
<p>If you wish to restrict the variables used,
<span class="teletype">UnivariatePolynomial</span> provides polynomials in one variable.
</p>
<div id="spadComm1-128" class="spadComm" >
<form id="formComm1-128" action="javascript:makeRequest('1-128');" >
<input id="comm1-128" type="text" class="command" style="width: 26em;" value="p: UP(x,INT) := (3*x-1)**2 * (2*x + 8)" />
</form>
<span id="commSav1-128" class="commSav" >p: UP(x,INT) := (3*x-1)**2 * (2*x + 8)</span>
<div id="mathAns1-128" ></div>
</div>
<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mrow><mn>18</mn><mo></mo><mrow><msup><mi>x</mi><mn>3</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>60</mn><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>46</mn><mo></mo><mi>x</mi></mrow><mo>+</mo><mn>8</mn></mrow></mstyle></math>
</td></tr>
</table>
</div>
<div class="returnType">
Type: UnivariatePolynomial(x,Integer)
</div>
<p>The constructor <span class="teletype">MultivariatePolynomial</span> provides polynomials
in one or more specified variables.
</p>
<div id="spadComm1-129" class="spadComm" >
<form id="formComm1-129" action="javascript:makeRequest('1-129');" >
<input id="comm1-129" type="text" class="command" style="width: 29em;" value="m: MPOLY([x,y],INT) := (x**2-x*y**3+3*y)**2" />
</form>
<span id="commSav1-129" class="commSav" >m: MPOLY([x,y],INT) := (x**2-x*y**3+3*y)**2</span>
<div id="mathAns1-129" ></div>
</div>
<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mrow><msup><mi>x</mi><mn>4</mn></msup></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mrow><msup><mi>y</mi><mn>3</mn></msup></mrow><mo></mo><mrow><msup><mi>x</mi><mn>3</mn></msup></mrow></mrow><mo>+</mo><mrow><mrow><mo>(</mo><mrow><msup><mi>y</mi><mn>6</mn></msup></mrow><mo>+</mo><mrow><mn>6</mn><mo></mo><mi>y</mi></mrow><mo>)</mo></mrow><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>6</mn><mo></mo><mrow><msup><mi>y</mi><mn>4</mn></msup></mrow><mo></mo><mi>x</mi></mrow><mo>+</mo><mrow><mn>9</mn><mo></mo><mrow><msup><mi>y</mi><mn>2</mn></msup></mrow></mrow></mrow></mstyle></math>
</td></tr>
</table>
</div>
<div class="returnType">
Type: MultivariatePolynomial([x,y],Integer)
</div>
<p>You can change the way the polynomial appears by modifying the variable
ordering in the explicit list.
</p>
<div id="spadComm1-130" class="spadComm" >
<form id="formComm1-130" action="javascript:makeRequest('1-130');" >
<input id="comm1-130" type="text" class="command" style="width: 14em;" value="m :: MPOLY([y,x],INT)" />
</form>
<span id="commSav1-130" class="commSav" >m :: MPOLY([y,x],INT)</span>
<div id="mathAns1-130" ></div>
</div>
<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo></mo><mrow><msup><mi>y</mi><mn>6</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>6</mn><mo></mo><mi>x</mi><mo></mo><mrow><msup><mi>y</mi><mn>4</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mrow><msup><mi>x</mi><mn>3</mn></msup></mrow><mo></mo><mrow><msup><mi>y</mi><mn>3</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>9</mn><mo></mo><mrow><msup><mi>y</mi><mn>2</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>6</mn><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo></mo><mi>y</mi></mrow><mo>+</mo><mrow><msup><mi>x</mi><mn>4</mn></msup></mrow></mrow></mstyle></math>
</td></tr>
</table>
</div>
<div class="returnType">
Type: MultivariatePolynomial([y,x],Integer)
</div>
<p>The constructor <span class="teletype">DistributedMultivariatePolynomial</span> provides
polynomials in one or more specified variables with the monomials
ordered lexicographically.
</p>
<div id="spadComm1-131" class="spadComm" >
<form id="formComm1-131" action="javascript:makeRequest('1-131');" >
<input id="comm1-131" type="text" class="command" style="width: 13em;" value="m :: DMP([y,x],INT)" />
</form>
<span id="commSav1-131" class="commSav" >m :: DMP([y,x],INT)</span>
<div id="mathAns1-131" ></div>
</div>
<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mrow><mrow><msup><mi>y</mi><mn>6</mn></msup></mrow><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>6</mn><mo></mo><mrow><msup><mi>y</mi><mn>4</mn></msup></mrow><mo></mo><mi>x</mi></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mrow><msup><mi>y</mi><mn>3</mn></msup></mrow><mo></mo><mrow><msup><mi>x</mi><mn>3</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>9</mn><mo></mo><mrow><msup><mi>y</mi><mn>2</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>6</mn><mo></mo><mi>y</mi><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow><mo>+</mo><mrow><msup><mi>x</mi><mn>4</mn></msup></mrow></mrow></mstyle></math>
</td></tr>
</table>
</div>
<div class="returnType">
Type: DistributedMultivariatePolynomial([y,x],Integer)
</div>
<p>The constructor
<span class="teletype">HomogeneousDistributedMultivariatePolynomial</span> is similar
except that the monomials are ordered by total order refined by
reverse lexicographic order.
</p>
<div id="spadComm1-132" class="spadComm" >
<form id="formComm1-132" action="javascript:makeRequest('1-132');" >
<input id="comm1-132" type="text" class="command" style="width: 14em;" value="m :: HDMP([y,x],INT)" />
</form>
<span id="commSav1-132" class="commSav" >m :: HDMP([y,x],INT)</span>
<div id="mathAns1-132" ></div>
</div>
<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mrow><mrow><msup><mi>y</mi><mn>6</mn></msup></mrow><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mrow><msup><mi>y</mi><mn>3</mn></msup></mrow><mo></mo><mrow><msup><mi>x</mi><mn>3</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>6</mn><mo></mo><mrow><msup><mi>y</mi><mn>4</mn></msup></mrow><mo></mo><mi>x</mi></mrow><mo>+</mo><mrow><msup><mi>x</mi><mn>4</mn></msup></mrow><mo>+</mo><mrow><mn>6</mn><mo></mo><mi>y</mi><mo></mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>9</mn><mo></mo><mrow><msup><mi>y</mi><mn>2</mn></msup></mrow></mrow></mrow></mstyle></math>
</td></tr>
</table>
</div>
<div class="returnType">
Type: HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
</div>
<p>More generally, the domain constructor
<span class="teletype">GeneralDistributedMultivariatePolynomial</span> allows the user to
provide an arbitrary predicate to define his own term ordering. These
last three constructors are typically used in Gröbner basis
applications and
when a flat (that is, non-recursive) display is wanted and the term
ordering is critical for controlling the computation.
</p>
</div><a href="book-contents.xhtml" style="margin-right: 10px;">Book Contents</a>
<a href="section-1.7.xhtml" style="margin-right: 10px;">Previous Section 1.7 Writing Your Own Functions</a><a href="section-1.9.xhtml" style="margin-right: 10px;">Next Section 1.9 Limits</a>
<a href="book-index.xhtml">Book Index</a></body>
</html>
|