Appendix
A-10: Solving Equations
Example A-10.2
Solve the equation px=0, where px is the cubic polynomial x3−9⁢x2−2 x+15.
Solution
Maple Solution - Interactive
Figure A-10.2(a), a graph of the cubic polynomial px, suggests that the equation px=0 has three real roots. The graph is drawn with the Plot Builder, launched from the Context Panel for the polynomial.
The Context Panel for the polynomial will contain the Solve option, and Maple will assume that the polynomial is set equal to zero.
Choosing the Solve≻Solve option results in the three exact solutions shown (compressed) in Table A-10.2(a).
plot(x^3-9*x^2-2*x+15,x=-2..10,y=-110..40,color=red);
Figure A-10.2(a) Graph of left-hand side of given equation.
3+A/6+58/A, where A=4860+12 i 1286431/3
3−291 ±i 3/A−A 1∓i 3/12
Table A-10.2(a) Compressed form of the exact roots of x3−9⁢x2−2 x+15=0
Each (expanded) solution contains "I," Maple's notation for i=−1, making it seem that the roots are complex. But a cubic with real coefficients must have at least one real root. And Figure A-10.2(a) suggests the roots are all real. They are, but converting them to the form a+b i, where b = 0, requires steps such as those sketched in Table A-10.2(b) where the first root in Table A-10.2(a) is transformed by applying the indicated Context Panel options.
Select first root.
3+A/6+58/A
Conversions≻a+bI
3+u+ v cosB+i u−v sinB, where
B=arctan128643/405/3 u=⁢6961/3⁢871/6/6 and v=⁢6962/3⁢875/6/1044
Simplify≻Simplify
3+229/3 cosarctan385929/405/3
Approximate≻10 (digits)
9.037651011
Table A-10.2(b) Schematic for transforming the first root to the form a+b i, where b = 0.
The more reasonable alternative to working with such complicated exact expressions for the roots of equations would be finding numeric solutions with the Solve option "Solve Numerically." This results immediately in the three floating-point roots −1.307265533,1.269614522,9.037651011.
Control-drag the polynomial. Press the Enter key.
Context Panel: Solve≻Numerically Solve
x3−9⁢x2−2 x+15
x3−9⁢x2−2⁢x+15
→solve
−1.307265533,1.269614522,9.037651011
Maple Solution - Coded
Obtain exact solutions and convert them to floating-point form
Assign the equation to q1.
q1≔x3−9⁢x2−2 x+15=0:
Exact solutions with the solve command.
q2≔solveq1:
Convert to a+b i with the evalc command.
q3≔simplifyevalcq2:
Convert simplified exact solutions to floating-point form.
evalfq3
9.037651012,−1.307265533,1.269614521
Obtain numeric solutions directly
Apply the fsolve command.
fsolveq1
<< Previous Example Section A-10 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document