P_MULT Function

Multiplies two polynomials.

Usage

result = P_MULT(a, b)

Input Parameters

a—The array of coefficients of the first polynomial.

b—The array of coefficients of the second polynomial.

Returned Value

result—An array of coefficients representing the product of the two polynomials.

Keywords

None.

Discussion

Polynomial multiplication simply amounts to convolving the coefficients of the polynomials. P_MULT uses the CONVOL1D function to perform this operation.

Example

In this example, two polynomials with real coefficients are multiplied:  a(x) = 1 + x  and b(x) = 1 + 2x + 2x2 + x3. The solution should be (1 + x)(1 + 2x + 2x2 + x3) = 1 + 3x + 4x2 + 3x3 + x4.

a = [1, 1]
b = [1, 2, 2, 1]
c = P_MULT(a, b)
PM, c
; 1.0000000
; 3.0000000
; 4.0000000
; 3.0000000
; 1.0000000
; Which matches the expected solution.

See Also

CONVOL1D

For Additional Information

Blahut, 1985