|
|
Part 11: Algebraic Operations
In this part we examine algebraic operations that are useful in dealing with polynomials and quotients of polynomials, i.e., rational functions.
Use the following command to factor
P Maple will not break quadratic factors into linear ones if the
corresponding roots are not rational, e.g., square roots or complex numbers
with nonzero imaginary parts.
factor(P);
We may use the solve command
to obtain a complete factorization. Enter the following
S:=solve(P=0,x);
Notice in the complex roots that Maple uses a capital I for the imaginary unit -- rather than just i.
We may check our work by multiplying the linear factors together with
a scalar factor of 3. Enter
3*product((x-rootList[k]),k=1..5);
Use the expand command to
put this back in the original form
expand(%);
What happens when you try the factor and solve commands on this polynomial?
Maple is not always
able to determine the exact roots of a polynomial of degree greater than
four. We may obtain approximate roots using the fsolve command.
fsolve(P2=0);
Notice that this command only
returned three real roots. The other roots have nonzero imaginary parts.
To obtain them, we must specify that we want complex roots. The following
command obtains all seven roots and forms them into a list:
allroots:=[fsolve(P2=0,x,complex)];
Check your work by
multiplying out the linear factors.
k:='k';
product((x - allroots[k]), k=1..7);
A := expand(%);
The result should be approximately the polynomial you started with. We can make the result look better by rounding everything off to two significant digits
fnormal(A, 2);
Put Q in "normal"
form "Normal" for Maple means writing the rational expression
as a quotient with all common factors canceled.
Q2 :=
normal(Q);
Suppose you want to expand out the denominator. First pick off the numerator and denominator of Q2.
Top := numer(Q2);
Bottom := denom(Q2);
Now expand out the denominator.
Bottom2 := expand(Bottom);
Now reassemble the expression
Q3 := Top/Bottom2;
Is this what you started with? Is it equivalent to what you started with?
|
|
modules at math.duke.edu | Copyright CCP and the author(s), 2000 |