3.2 Legendre Polynomials
37
0
0
0
5/2
0
-3/2
0
0
0
35/8
0
-15/4
0
3/8
0
63/8
0
-35/4
0
15/8
0
231/16
0
-315/16
0
105/16
0
-5/16
For example, the fifth row corresponds to the Legendre polynomial P 4 (x) =
35
8 x 4 −
15
4 x 2 +
3
8 . “obj.polycoef” shows the same result as the table.
The Methods
The plot-method can be used via plot(obj,varargin). The first input is the
class object. All other inputs are optional. The second input (integer vector) are the
orders of the polynomials that shall be plotted. The maximum number is given by
the class object. The default is to plot all corresponding polynomials of the class
object. The third input gives the plot region. The default value is “obj.polyint.” The
forth input is the axes handle object in which the result should be plotted. The default
is to open a new figure environment. An example is Fig. 3.1.
The deri-method Pder=deri(obj,n) returns the n-th derivative of the
Legendre polynomials represented by “obj.” “Pder” is a table with the polynomial
coefficients.
The polyvalue-method [res, n] = polyvalue(obj,x,n) computes the
values of the polynomials. “obj” is the class object, and all other inputs are
optional. “x” is a vector, and polyval evaluates the polynomial at each element of
“x.” The default values are 50 elements with interval limits given by obj.polyint.
“n” is an integer value of the table rows which should be evaluated (default
is all).
For additional methods, see Chap. 15.
Some Special Results
The first Legendre polynomials are listed below:
P 0 (x) = 1
P 2 (x) =
1
2
3x
2
− 1
P 4 (x) =
1
8
35x
4
− 30x
2
+ 3
P 1 (x) = x
P 3 (x) =
1
2
5x
3
− 3x
P 5 (x) =
1
8
63x
5
− 70x
3
+ 15x
.
Précédent

- 52/287

Suivant