{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 "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Out put" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 256 40 "COMPLEX NUMBERS AND VAR IABLES WITH MAPLE" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 211 "This is the first of a series of worksheets which illus trate by example how one can apply the concepts in PHYS 312, using t he software package Maple. It is a good idea to start a new problem wi th the command " }{TEXT 257 7 "restart" }{TEXT -1 64 " which clears al l previous definitions and variable assignments!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 132 "Expressions in Maple are terminated by semicolon \";\" or colon \+ \":\". In the latter case output is suppressed. The imaginary number \+ i=" }{XPPEDIT 18 0 "sqrt(-1) " "6#-%%sqrtG6#,$\"\"\"!\"\"" }{TEXT -1 61 " is written as I in Maple. A complex number can be written as" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "a:=5+7*I;" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%\"aG^$\"\"&\"\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 17 "Note the use of \"" }{TEXT 258 3 ":= " }{TEXT -1 15 "\" rather \+ than \"" }{TEXT 259 1 "=" }{TEXT -1 405 "\" to assign to the symbol \" a\" the value \"5+7I\". Forgetting the colon is one of the most commo n errors to new users of Maple, particularly if you are used to Mathem atica. Since no error message results if you use \"=\" instead of \":= \" this is an error that sometimes can be hard to debug. The equality \+ sign \"=\" in Maple indicates a logical operation: a=b is a statement \+ that can be either \"true\" or \"false\"." }}{PARA 0 "" 0 "" {TEXT -1 64 "To get a numerical, floating point, value use the command evalf" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(a);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$$\"\"&\"\"!$\"\"(F&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "The command evalc evaluates the number on " }{XPPEDIT 18 0 "x+I*y" "6#,&%\"xG\"\"\"*&%\"IGF%%\"yGF%F%" }{TEXT -1 5 " form" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "evalc(a/(1-I));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$!\"\"\"\"'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "Complex numbers can be added, subtracted, multiplied and divide d the usual way:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "c:=6+3*I ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"cG^$\"\"'\"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "a+c;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$\"#6\"#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "a-c;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#^$!\"\"\"\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "a*c;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$\"\"*\" #d" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "a/c;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$#\"#<\"#:#\"\"$\"\"&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "The real and imaginary part is called by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "Re(a);Im(a);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"(" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 30 "The magnitude is evaluated by " }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "abs(a);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*$-%%sqrtG6#\"#u\"\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "while the phase angle (in radians) is" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "argument(a);evalf(argument(a));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'arctanG6##\"\"(\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+3%oa]*!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "W hen evaluated, argument gives a number between " }{XPPEDIT 18 0 "-Pi" "6#,$%#PiG!\"\"" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "Pi" "6#%#PiG" } {TEXT -1 2 " ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "argument( 1-I);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,$%#PiG#!\"\"\"\"%" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "not " }{XPPEDIT 18 0 "7*Pi/4;" "6#* (\"\"(\"\"\"%#PiGF%\"\"%!\"\"" }{TEXT -1 12 " ! Similarly" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "argument(polar(1,1.5*Pi));" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#,$%#PiG#!\"\"\"\"#" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "Elementary functions can be called by complex arg uments and evaluated" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "eva lf(exp(a));evalf(sin(a));evalf(cos(a));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$$\"+_,*)=6!\"($\"+gca](*!\")" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#^$$!+_^%zD&!\"($\"+*\\l`b\"F&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#^$$ \"+&3o`b\"!\"($\"+3k$zD&F&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "We \+ can also use evalc on complex functions" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "evalc(exp(a));evalc(sin(a));evalc(cos(a));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%$expG6#\"\"&\"\"\"-%$cosG6#\"\"(F)F)*( ^#F)F)F%F)-%$sinGF,F)F)" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%$sinG 6#\"\"&\"\"\"-%%coshG6#\"\"(F)F)*(^#F)F)-%$cosGF'F)-%%sinhGF,F)F)" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%$cosG6#\"\"&\"\"\"-%%coshG6#\"\" (F)F)*(^#!\"\"F)-%$sinGF'F)-%%sinhGF,F)F)" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "When evalc gets unspecified variables Maple assumes them \+ to be real" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalc(exp(x+I *y));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%$expG6#%\"xG\"\"\"-%$co sG6#%\"yGF)F)*(^#F)F)F%F)-%$sinGF,F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalc(sin(x+I*y));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #,&*&-%$sinG6#%\"xG\"\"\"-%%coshG6#%\"yGF)F)*(^#F)F)-%$cosGF'F)-%%sinh GF,F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalc(cos(x+I*y) );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&-%$cosG6#%\"xG\"\"\"-%%coshG 6#%\"yGF)F)*(^#!\"\"F)-%$sinGF'F)-%%sinhGF,F)F)" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 23 "evalc((x+I*y)/(x-I*y));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*&*$)%\"xG\"\"#\"\"\"F),&*$F&F)F)*$)%\"yGF(F)F)!\"\"F )*&*$F-F)F)F*F/F/*&*(^#F(F)F.F)F'F)F)F*F/F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "32 1" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }