{VERSION 3 0 "APPLE_PPC_MAC" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 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 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 89 "\nFirst consider how we would solve an eq uation with Maple where the unkowns are numbers.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "Eq := y^2 - 3*y = 5;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 19 "ans := solve(Eq,y);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 204 "\nIn this case we get two answers. The first is posit ive and the second is negative.\nWe can verify that these two numbers \+ are answers to the problem by substituting them\nback into the origina l equation.\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "subs(y=an s[1],Eq);\nsimplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 " subs(y=ans[2],Eq);\nsimplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 230 "\nIt is not always possible to find exact answers, but we can alw ays find numerical answers.\nThe first step is to draw a plot, so we h ave a good idea of what the answers should be, and the\nsecond step is to use the fsolve command.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "plot(\{lhs(Eq),rhs(Eq)\},y=-2..5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "ans := fsolve(Eq,y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "subs(y=ans[1],Eq);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "subs(y=ans[2],Eq);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 174 "\nAn important point about numerical answers is that they are \+ only approximations and their\naccuracy is limited by the number of di gits we choose to use for the calculations.\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 224 "\nThe story with differential equations is similar. \+ We have an equation which involves an\nunkown function and its derivat ives. Consider the following equation which is a first order\nlinear \+ ordinare differential equation..\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "ODE := diff(y(t),t) - 3*y(t) = 5;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "\nIn Maple we can try to solve such an equation b y using the dsolve command.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "ans := dsolve(ODE,y(t));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 267 "\nIn this case Maple has given us an infinite set of functions - \+ a different function for every\nvalue of the arbitrary parameter, _C1 . As before, we verify that we have a solution by substituting\nour f unction into the original differential equation and simplifying.\n" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "subs(y(t)=rhs(ans),ODE);\n \nsimplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 378 "\nWe will soon learn that only the simplest differential equations have functions th at can be written in\nterms of elementary functions. But we can alway s take a graphical / numerical approach. The DEplot \ncommand from th e DEtools package can then provide us with a plot of the \"Direction F ield\" which\nprovides the big picture about how the entire set of sol utions is behaving.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "wi th(DEtools):\nDEplot(ODE,y(t),t=-2..2,y=-4..2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 213 "\nTo include graphs of specific functions, we need \+ to add information about their initial conditions.\nHere we'll conside r what happens to two solutions - first where y(0) is -1.5 and second ly where y(0) is -1.75.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "DEplot(ODE,y(t),t=-2..2,y=-4..2,[[y(0)=-1.5],[y(0)=-1.75]]);" }}}} {MARK "19 0 0" 206 }{VIEWOPTS 1 1 0 1 1 1803 }