{VERSION 4 0 "IBM INTEL NT" "4.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0
0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0
0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0
0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1
{CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1
0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0
258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1
-1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 "" 0 1 0
0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }}
{SECT 0 {PARA 256 "" 0 "" {TEXT -1 17 "Solving Equations" }}{PARA 0 "
" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 9 "Jim Herod" }}
{PARA 258 "" 0 "" {TEXT -1 14 "jherod@tds.net" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT
-1 87 " One is pleased if the solution for an equation is found wi
th the simplest request." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "
eq:=expand((x^2+x+1)*(x^2-x-1)); " }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 14 "solve(eq=0,x);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 89 "Of course
, you can solve equations for which the solutions are symbolic, and no
t numeric." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "solve(2*x+3*y=
5,x);\nsolve(2*x+3*y=5,y);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA
0 "" 0 "" {TEXT -1 103 "When there is more than one solution, one can \+
limit the range of solutions by specifying an inequality." }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "solve(\{x^2-1,x>0\},x);" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }
}{PARA 0 "" 0 "" {TEXT -1 48 "Some times, a newcomer to Maple gets a s
urprise." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "solve(x^5-2*x+3=
0,x);" }}}{PARA 0 "" 0 "" {TEXT -1 205 "It is no surprise that we have
a polynomial of degree 5 which cannot be expressed in terms of radica
ls. But, the roots can be listed. The index is a listing in order by t
he argument. Look at the following." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 12 "Z:=evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 33 "map(argument,[seq(Z[i],i=1..5)]);" }}}{PARA 0 "" 0 "" {TEXT -1
0 "" }}{PARA 0 "" 0 "" {TEXT -1 92 "Some times it is a surprise what M
aple will do. The following two examples are given in the " }{TEXT
257 9 "MUST HAVE" }{TEXT -1 6 " book " }{TEXT 256 21 "Introduction to \+
Maple" }{TEXT -1 46 " by Andre Heck (published by Springer-Verlag)." }
}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 25 "Example \+
1: Find x so that" }}{PARA 0 "" 0 "" {TEXT -1 58 " \+
" }{XPPEDIT 18 0 "(x^6-1)^x = 0;
" "6#/),&*$%\"xG\"\"'\"\"\"F)!\"\"F'\"\"!" }{TEXT -1 1 "." }}{PARA 0 "
" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0
"> " 0 "" {MPLTEXT 1 0 22 "solve( (x^6-1)^x=0,x);" }}}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 53 "Example 2. Find the inter
section of these two graphs." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "plot(\{max(x,2*x-2),min(x^2-
1,5-x)\},x=-4..4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "solve
(max(x,2*x-2)=min(x^2-1,5-x),x);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0
"" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 36 "Wha
t to do about multiple solutions:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "eqn:=product(x-p,p=1..5)=0;
\nsolve(eqn,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "_MaxSols
:=3;\nsolve(eqn,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "resta
rt;" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 37 "M
aple can solve systems of equations." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 24 "eqns:=\{x+2*y=3,y+1/x=1\};" }}}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 24 "soln:=solve(eqns,\{x,y\});" }}}{PARA 0 "" 0 ""
{TEXT -1 67 "There are two sets of solutions. These solutions can be a
ccessed as" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "soln[1];\nsoln
[2];" }}}{PARA 0 "" 0 "" {TEXT -1 30 "And, solutions can be checked:"
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "eval(eqns,soln[1]);" }}}
{PARA 0 "" 0 "" {TEXT -1 69 "We wish to access solutions. First note t
he following identification." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
23 "soln[1][1];\nsoln[1][2];" }}}{PARA 0 "" 0 "" {TEXT -1 71 "To assig
n the value of the x variable, here are two simple suggestions." }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "x1:=eval(x,soln[1]);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "pair:=eval([x,y],soln[1]);"
}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "y1:=pair[2];" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }
}{PARA 259 "" 0 "" {TEXT -1 29 "Solving equations numerically" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 117 "Most non
linear equations cannot be solved analytically. One must try to solve \+
the equations numerically. The command " }{TEXT 258 6 "fsolve" }{TEXT
-1 28 " is the appropriate command." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 19 "fsolve(cos(x)=x,x);" }}}{PARA 0 "" 0 "" {TEXT -1 73 "
The command fsolve will compute real roots, unless complex are specifi
ed." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "eqn:=expand((x-3/2)*(
x^2+x+1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "fsolve(eqn,x)
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "fsolve(eqn,x,complex);
" }}}{PARA 0 "" 0 "" {TEXT -1 92 "There are several ways to think of g
etting more than one root for a non-polynomial equation." }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "fsolve(sin(x)=0,x);\nx1:=%;" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "fsolve(sin(x)/(x-x1)=0,x);\n
x2:=%;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "fsolve(sin(x)/(x-
x1)/(x-x2)=0,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "fsolve(
sin(x),x,0..5);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 104 "The command fsolve will solve systems of equations. We f
ind the intersection of a circle and a parabola." }}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 61 "with(plots):\nimplicitplot(\{x^2+y^2=1,y=x^2\}
,x=-2..2,y=-2..2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "fsolv
e(\{x^2+y^2=1,y=x^2\},\{x,y\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 39 "fsolve(\{x^2+y^2=1,y=x^2\},\{x,y\},x=0..1);" }}}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 57 "Of course, there are equations which have solutions that \+
" }{TEXT 259 5 "solve" }{TEXT -1 16 " will not solve." }}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 24 "solve(-x^5=-1+sin(x),x);" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "fsolve(-x^5=-1+sin(x),x);" }}}
{PARA 0 "" 0 "" {TEXT -1 82 "And, there are equations that Maple will \+
solve and get solutions that are suspect." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 21 "eqn:=(x-1)^2/(x^2-1);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 21 "soln:=solve(eqn=0,x);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 17 "eval(eqn,x=soln);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 18 "limit(eqn,x=soln);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 24 "There are other solvers:" }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 18 "isolve(3*x-4*y=7);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 31 "msolve(\{3*x-4*y=1,7*x+y=2\},17);" }}}{EXCHG {PARA 0
"> " 0 "" {MPLTEXT 1 0 48 "rsolve(\{f(n)=f(n-1)+f(n-2),f(0)=1,f(1)=1\}
,f(n));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "0 0" 17 }
{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }