{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 0 0 0 0 0 0 } {CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "2 D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 }{CSTYLE "Help Heading" -1 26 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 7 "Advice:" }{TEXT -1 50 " Solving equations involving numerical in tegration" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 59 "Suppose you want to solve an equation involving a function " } {XPPEDIT 18 0 "F(x)" "6#-%\"FG6#%\"xG" }{TEXT -1 123 ", defined as a d efinite integral which Maple must evaluate numerically. For example, \+ you might want to solve the equation " }{XPPEDIT 18 0 "Int(1/(t + exp( t)), t = 0 .. x) = 1-x" "6#/-%$IntG6$*&\"\"\"\"\"\",&%\"tGF)-%$expG6# F+F)!\"\"/F+;\"\"!%\"xG,&\"\"\"F)F3F/" }{TEXT -1 83 ". Using calculus , it is not hard to prove that this has exactly one solution with " } {XPPEDIT 18 0 "0 < x" "6#2\"\"!%\"xG" }{TEXT -1 1 " " }{XPPEDIT 18 0 " `` < 1" "6#2%!G\"\"\"" }{TEXT -1 45 ". It is convenient to write the \+ equation as " }{XPPEDIT 18 0 "F(x) = 1;" "6#/-%\"FG6#%\"xG\"\"\"" } {TEXT -1 1 ":" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "F:= x -> In t(1/(t + exp(t)), t=0..x) + x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\" FGR6#%\"xG6\"6$%)operatorG%&arrowGF(,&-%$IntG6$*&\"\"\"F1,&%\"tG\"\"\" -%$expG6#F3F4!\"\"/F3;\"\"!9$F4F " 0 "" {MPLTEXT 1 0 27 "fsolve(F(x)=1, x = 0 .. 1);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+dcbAh!#5" }}}{PARA 0 "" 0 "" {TEXT -1 82 "This takes a rather long time to solve, since it requires evaluating the function " }{XPPEDIT 18 0 "F(x)" "6#-%\"FG6#%\"xG" } {TEXT -1 162 " at many points, and each such evaluation requires anoth er numerical integration. But another approach, based on differential equations, can be used. Note that " }{XPPEDIT 18 0 "dF/dx = 1/(x + e xp(x)) + 1" "6#/*&%#dFG\"\"\"%#dxG!\"\",&*&\"\"\"F&,&%\"xGF&-%$expG6#F -F&F(F&\"\"\"F&" }{TEXT -1 7 ", with " }{XPPEDIT 18 0 "F(0) = 0" "6#/- %\"FG6#\"\"!F'" }{TEXT -1 13 ". Now since " }{XPPEDIT 18 0 "F" "6#%\" FG" }{TEXT -1 29 " is a one-to-one function of " }{XPPEDIT 18 0 "x" "6 #%\"xG" }{TEXT -1 31 ", we can just as well consider " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 18 " as a function of " }{XPPEDIT 18 0 "F" "6# %\"FG" }{TEXT -1 45 ". It will satisfy the differential equation " } {XPPEDIT 18 0 "dx/dF = 1/(1/(x + exp(x))+1)" "6#/*&%#dxG\"\"\"%#dFG!\" \"*&\"\"\"F&,&*&\"\"\"F&,&%\"xGF&-%$expG6#F/F&F(F&\"\"\"F&F(" }{TEXT -1 25 " with initial condition " }{XPPEDIT 18 0 "x(0) = 0" "6#/-%\"xG 6#\"\"!F'" }{TEXT -1 22 ", and what we want is " }{XPPEDIT 18 0 "x(1) " "6#-%\"xG6#\"\"\"" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "de:= diff(x(F),F) = 1/(1/(x(F)+exp(x(F)))+1);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/-%%diffG6$-%\"xG6#%\"FGF,*&\"\" \"F.,&*&F.F.,&F)\"\"\"-%$expG6#F)F2!\"\"F2F2F2F6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "soln:= dsolve(\{de, x(0)=0\},x(F), numeric); \+ " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%solnGR6#%(rkf45_xG6'%\"iG%(rkf4 5_sG%)outpointG%#r1G%#r2G6#%aoCopyright~(c)~1993~by~the~University~of~ Waterloo.~All~rights~reserved.G6\"C&>8&-%&evalfG6#9$@$52-%$absG6#,$F3! \"\"-F<6#,&&%,loc_controlG6#\"\"#\"\"\"F3F?4-%'memberG6$&FD6#\"\"'<*F? FG!\"#FF$F?\"\"!$FGFR$FFFR$FPFRC%>FD-%%copyG6#=F06#;FG\"#EE\\[l;\"#;FR FFFR\"\")\"&++$\"#@FR\"\"($FG!\"*\"#5FRFGFG\"\"&$FG!\")\"\"$FR\"#BFRFN FGFhnFR\"#:FR\"\"%Fco\"#8FR\"#AFR\"#6FR\"#=FR\"#CFR\"#DFR\"#?FR\"#9FR \"#FR\"\"*\"%+5>%'loc_y0G-FY6#=F06#;FGFGE\\[l\"FGFR>%'loc _y1G-FY6#=F0F[qE\\[l!@$0F;FRC$>&FD6#FeoF3@%1%'DigitsG-%'evalhfG6#F\\rC $>8%-%*traperrorG6#-F^r6#-%=dsolve/numeric_solnall_rkf45G6,%&loc_FG-%$ varG6#FD-F]s6#Fgp-F]s6#F_q-F]s6#%'loc_F1G-F]s6#%'loc_F2G-F]s6#%'loc_F3 G-F]s6#%'loc_F4G-F]s6#%'loc_F5G-F]s6#%)loc_workG@$/Fbr%*lasterrorGC%>8 '-%+searchtextG6$.F^r-%(convertG6$-%#opG6$FG7#Fbr%%nameG>8(-F\\u6$.%)h ardwareGF_u@%50FjtFR0FhuFR-Fir6,F[sFDFgpF_qFesFhsF[tF^tFatFdt-%&ERRORG 6#FbrFav7$/%\"FGF7-%$seqG6$/&%$ordG6#,&8$FGFGFG&Fgp6#Faw/FawF\\qF06%FD FgpF_qF0" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "soln(1);" }} {PARA 12 "" 1 "" {XPPMATH 20 "6#7$/%\"FG\"\"\"/-%\"xG6#F%$\"1(Q>IibD7' !#;" }}}{PARA 0 "" 0 "" {TEXT -1 169 "This approach would not work in \+ more general cases, e.g. an integral depending on a parameter whose va lue must be found. In those cases the solution must be found with " } {MPLTEXT 0 21 6 "fsolve" }{TEXT -1 1 "." }}}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 9 "See also:" }{TEXT -1 1 " " }{HYPERLNK 17 "fsolve" 2 "fsolv e" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "dsolve/numeric" 2 "dsolve,numeri c" "" }}}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 24 "Maple Advisor Database, \+ " }{TEXT -1 15 " R. Israel 1997" }}}}{MARK "1 2 9" 0 }{VIEWOPTS 1 1 0 1 1 1803 }