Appendix
A-10: Solving Equations
Example A-10.3
Solve the three equations x2+y−k2=1,y=x2,2 x=−xy−k for x,y,k.
Solution
Maple Solution - Interactive
The Context Panel option Solve≻Solve (explicit) gives the four solutions k=±1,x,y=0,0 and k=5/4,x,y=±3/2,3/4, but the option Solve≻Solve returns the second two solutions in the form
k=54,x=12⁢RootOf⁡_Z2−3,y=34
The RootOf structure is a compressed representation of an algebraic number, that is, a number that is the solution of a polynomial equation. The Context Panel option All Values applies the allvalues command, which converts the RootOf to the algebraic number(s) it represents.
Control-drag the sequence of three equations and press the Enter key.
Context Panel: Solve≻Solve
Context Panel: All Values
x2+y−k2=1,y=x2,2 x=−xy−k
x2+y−k2=1,y=x2,2⁢x=−xy−k
→solve
k=1,x=0,y=0,k=−1,x=0,y=0,k=54,x=12⁢RootOf⁡_Z2−3,y=34
→all values
k=−1,x=0,y=0,k=1,x=0,y=0,k=54,x=12⁢3,y=34,k=−1,x=0,y=0,k=1,x=0,y=0,k=54,x=−12⁢3,y=34
It might seem that Maple has returned six solutions, not four. However, the solutions for k=±1 are repeated, so there are actually only four distinct solutions.
Maple Solution - Coded
Assign the sequence of equations to eqs.
eqs≔x2+y−k2=1,y=x2,2 x=−xy−k:
Use solve with the Explicit option.
solveeqs,x,y,k,Explicit
If the Explicit option is not used, the RootOf structure is returned, in which case the allvalues command must be applied.
S≔solveeqs,x,y,k:allvaluesS3
<< 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