File: maxima_82.html

package info (click to toggle)
maxima 5.47.0-9
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 193,104 kB
  • sloc: lisp: 434,678; fortran: 14,665; tcl: 10,990; sh: 4,577; makefile: 2,763; ansic: 447; java: 328; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (261 lines) | stat: -rw-r--r-- 12,540 bytes parent folder | download | duplicates (2)
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
261
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Maxima 5.47.0 Manual: Functions and Variables for algebraic extensions</title>

<meta name="description" content="Maxima 5.47.0 Manual: Functions and Variables for algebraic extensions">
<meta name="keywords" content="Maxima 5.47.0 Manual: Functions and Variables for algebraic extensions">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="maxima_toc.html#Top" rel="start" title="Top">
<link href="maxima_423.html#Function-and-Variable-Index" rel="index" title="Function and Variable Index">
<link href="maxima_toc.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="maxima_78.html#Polynomials" rel="up" title="Polynomials">
<link href="maxima_83.html#Special-Functions" rel="next" title="Special Functions">
<link href="maxima_81.html#Introduction-to-algebraic-extensions" rel="previous" title="Introduction to algebraic extensions">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
body {color: black; background: white;  margin-left: 8%; margin-right: 13%;
      font-family: "FreeSans", sans-serif}
h1 {font-size: 150%; font-family: "FreeSans", sans-serif}
h2 {font-size: 125%; font-family: "FreeSans", sans-serif}
h3 {font-size: 100%; font-family: "FreeSans", sans-serif}
a[href] {color: rgb(0,0,255); text-decoration: none;}
a[href]:hover {background: rgb(220,220,220);}
div.textbox {border: solid; border-width: thin; padding-top: 1em;
    padding-bottom: 1em; padding-left: 2em; padding-right: 2em}
div.titlebox {border: none; padding-top: 1em; padding-bottom: 1em;
    padding-left: 2em; padding-right: 2em; background: rgb(200,255,255);
    font-family: sans-serif}
div.synopsisbox {
    border: none; padding-top: 1em; padding-bottom: 1em; padding-left: 2em;
    padding-right: 2em; background: rgb(255,220,255);}
pre.example {border: 1px solid rgb(180,180,180); padding-top: 1em;
    padding-bottom: 1em; padding-left: 1em; padding-right: 1em;
    background-color: rgb(238,238,255)}
div.spacerbox {border: none; padding-top: 2em; padding-bottom: 2em}
div.image {margin: 0; padding: 1em; text-align: center}
div.categorybox {border: 1px solid gray; padding-top: 1em; padding-bottom: 1em;
    padding-left: 1em; padding-right: 1em; background: rgb(247,242,220)}
img {max-width:80%; max-height: 80%; display: block; margin-left: auto; margin-right: auto}

-->
</style>

<link rel="icon" href="figures/favicon.ico">
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6>"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Functions-and-Variables-for-algebraic-extensions"></a>
<div class="header">
<p>
Previous: <a href="maxima_81.html#Introduction-to-algebraic-extensions" accesskey="p" rel="previous">Introduction to algebraic extensions</a>, Up: <a href="maxima_78.html#Polynomials" accesskey="u" rel="up">Polynomials</a> &nbsp; [<a href="maxima_toc.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="maxima_423.html#Function-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Functions-and-Variables-for-algebraic-extensions-1"></a>
<h3 class="section">14.4 Functions and Variables for algebraic extensions</h3>

<a name="algfac"></a><dl>
<dt><a name="index-algfac"></a>Function: <strong>algfac</strong> <em>(<var>f</var>, <var>p</var>)</em></dt>
<dd>
<p>Returns the factorization of <var>f</var> in the field <em>K[a]</em>. Does the same
as <code>factor(<var>f</var>, <var>p</var>)</code> which in fact calls <code>algfac</code>. One can also
specify the variable <var>a</var> as in <code>algfac(<var>f</var>, <var>p</var>, <var>a</var>)</code>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) algfac(x^4 + 1, a^2 - 2);
                           2              2
(%o1)                    (x  - a x + 1) (x  + a x + 1)
(%i2) algfac(x^4 - t*x^2 + 1, a^2 - t - 2, a);
                           2              2
(%o2)                    (x  - a x + 1) (x  + a x + 1)
</pre></div>

<p>In the second example note that <em>a = sqrt(2 + t)</em>.
</p></dd></dl>

<a name="algnorm"></a><dl>
<dt><a name="index-algnorm"></a>Function: <strong>algnorm</strong> <em>(<var>f</var>, <var>p</var>, <var>a</var>)</em></dt>
<dd>
<p>Returns the norm of the polynomial <em>f(a)</em> in the extension
obtained by a root <var>a</var> of polynomial <var>p</var>. The coefficients of
<var>f</var> may depend on other variables.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) algnorm(x*a^2 + y*a + z,a^2 - 2, a);
                            2              2      2
(%o1)/R/                   z  + 4 x z - 2 y  + 4 x
</pre></div>

<p>The norm is also the resultant of polynomials <var>f</var> and <var>p</var>, and the product
of the differences of the roots of <var>f</var> and <var>p</var>.
</p></dd></dl>

<a name="algtrace"></a><dl>
<dt><a name="index-algtrace"></a>Function: <strong>algtrace</strong> <em>(<var>f</var>, <var>p</var>, <var>a</var>)</em></dt>
<dd>
<p>Returns the trace of the polynomial <em>f(a)</em> in the extension
obtained by a root <var>a</var> of polynomial <var>p</var>. The coefficients of
<var>f</var> may depend on other variables which remain &ldquo;inert&rdquo;.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) algtrace(x*a^5 + y*a^3 + z + 1, a^2 + a + 1, a);
(%o1)/R/                       2 z + 2 y - x + 2
</pre></div>
</dd></dl>

<a name="bdiscr"></a><dl>
<dt><a name="index-bdiscr"></a>Function: <strong>bdiscr</strong> <em>(<var>args</var>)</em></dt>
<dd>
<p>Computes the discriminant of a basis <em>x_i</em> in <em>K[a]</em> as
the determinant of the matrix of elements <em>trace(x_i*x_j)</em>.
The args are the elements of the basis followed by the minimal
polynomial.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) bdiscr(1, x, x^2, x^3 - 2);
(%o1)/R/                             - 108
(%i2) poly_discriminant(x^3 - 2, x);
(%o2)                                - 108
</pre></div>

<p>A standard base in an extension of degree n is <em>1, x, ..., x^{n - 1}</em>.
In this case it is known that the discriminant of this base is the discriminant
of the minimal polynomial. This is checked in (%o2) above.
</p>
</dd></dl>


<a name="primelmt"></a><dl>
<dt><a name="index-primelmt"></a>Function: <strong>primelmt</strong> <em>(<var>f_b</var>, <var>p_a</var>, <var>c</var>)</em></dt>
<dd>
<p>Computes a prime element for the extension of <em>K[a]</em> by a root
<var>b</var> of a polynomial <em>f_b(b)</em> whose coefficients may depend on
<var>a</var>. One assumes that <var>f_b</var> is square free. The function returns
an irreducible polynomial, a root of which generates <em>K[a, b]</em>, and
the expression of this primitive element in terms of <var>a</var> and
<var>b</var>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) primelmt(b^2 - a*b - 1, a^2 - 2, c);
                              4       2
(%o1)                       [c  - 12 c  + 9, b + a]
(%i2) solve(b^2 - sqrt(2)*b - 1)[1];
                                  sqrt(6) - sqrt(2)
(%o2)                       b = - -----------------
                                          2
(%i3) primelmt(b^2 - 3, a^2 - 2, c);
                              4       2
(%o3)                       [c  - 10 c  + 1, b + a]
(%i4) factor(c^4 - 12*c^2 + 9, a^4 - 10*a^2 + 1);
                 3    2                       3    2
(%o4) ((4 c - 3 a  - a  + 27 a + 5) (4 c - 3 a  + a  + 27 a - 5)
                           3    2                       3    2
                 (4 c + 3 a  - a  - 27 a + 5) (4 c + 3 a  + a  - 27 a - 5))/256
(%i5) primelmt(b^3 - 3, a^2 - 2, c);
                   6      4      3       2
(%o5)            [c  - 6 c  - 6 c  + 12 c  - 36 c + 1, b + a]
(%i6) factor(b^3 - 3, %[1]);
            5       4        3        2
(%o6) ((48 c  + 27 c  - 320 c  - 468 c  + 124 c + 755 b - 1092)
           5        5         4       4          3        3          2        2
 ((- 48 b c ) - 54 c  - 27 b c  + 64 c  + 320 b c  + 360 c  + 468 b c  + 149 c
                           2
 - 124 b c - 1272 c + 755 b  + 1092 b + 1606))/570025
</pre></div>

<p>In (%o1), <var>f_b</var> depends on <code>a</code>. Using <code>solve</code>, the solution depends on sqrt(2) and sqrt(3).
In (%o3), <em>K[sqrt(2), sqrt(3)]</em> is computed, and we see that the the primitive polynomial
in (%o1) factorizes completely here. In (%i5), we compute <em>K[sqrt(2), 3^{1/3}]</em>, and we see
that <code>b^3 - 3</code> gets one factor in this extension. If we assume this extension is real,
the two other factors are complex.
</p>
</dd></dl>

<a name="splitfield"></a><dl>
<dt><a name="index-splitfield"></a>Function: <strong>splitfield</strong> <em>(<var>p</var>, <var>x</var>)</em></dt>
<dd>
<p>Computes the splitting field of the polynomial <em>p(x)</em>.
In the generic case it is of degree <em>n!</em> in terms of the degree <em>n</em>
of <var>p</var>, but may be of lower order if the Galois group of <var>p</var>
is a strict subgroup of the group of permutations of <em>n</em>
elements. The function returns a primitive polynomial for this extension
and the expressions of the roots of <var>p</var> as polynomials of a root
of this primitive polynomial. The polynomial <var>f</var> may be
irreducible or factorizable.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) splitfield(x^3 + x + 1, x);
                                              4         2
              6         4         2       alg1  + 5 alg1  - 9 alg1 + 4
(%o1)/R/ [alg1  + 6 alg1  + 9 alg1  + 31, ----------------------------, 
                                                       18
                                 4         2          4         2
                             alg1  + 5 alg1  + 4  alg1  + 5 alg1  + 9 alg1 + 4
                           - -------------------, ----------------------------]
                                      9                        18
(%i2) splitfield(x^4 + 10*x^2 - 96*x - 71, x)[1];
             8           6           5            4             3
(%o2)/R/ alg2  + 148 alg2  - 576 alg2  + 9814 alg2  - 42624 alg2
                                                    2
                                       + 502260 alg2  + 1109952 alg2 + 18860337
</pre></div>

<p>In the first case we have the primitive polynomial of degree 6 and the 3 roots
of the third degree equations in terms of a variable <code>alg1</code> produced by
the system. In the second case the primitive polynomial is of degree 8
instead of 24, because the Galois group of the equation is reduced to D8
since there are relations between the roots.
</p>
</dd></dl>

<hr>
<div class="header">
<p>
Previous: <a href="maxima_81.html#Introduction-to-algebraic-extensions" accesskey="p" rel="previous">Introduction to algebraic extensions</a>, Up: <a href="maxima_78.html#Polynomials" accesskey="u" rel="up">Polynomials</a> &nbsp; [<a href="maxima_toc.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="maxima_423.html#Function-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>