{VERSION 4 0 "IBM INTEL LINUX22" "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 }{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 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "restart;\nwith(DEtoo ls):" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 21 "A very simple example" } }{PARA 0 "" 0 "" {TEXT -1 114 "As our very first exercise we will have a look at the differential equation which describes the radioactive d ecay." }}{PARA 0 "" 0 "" {TEXT -1 106 "In the first command line we st ate the problem and asign the differential equation to the expression \+ dgl1:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "dgl1:=diff(y(t),t)=-k*y(t) ;" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 339 "The maple-function d solve will find a solution to the differential equation. Its first arg ument contains the differential equation along with the initial condit ion y(0)=1. If one leaves the initial condition apart, maple will dete rmine a solution of the differential equation which depends on a const ant. We will have a look at this later." }}{PARA 0 "" 0 "" {TEXT -1 46 "The solution is passed to the expression sol1:" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 36 "sol1 := dsolve(\{dgl1,y(0)=1.\},y(t));" }}{PARA 0 " " 0 "" {TEXT -1 206 "The function unnapply will convert the solution i nto a function y_1(t,k); it makes sense to formulate y_1 as a function of both, t and k, because it allows us to plot the function for diffe rent values of k." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "y_1 := unapply (subs(sol1,y(t)),t,k);" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 80 " We can calculate the limit of y_1(t) as t tends to infinity, in depend ence of k:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "limit (y_1(t,k),t=inf inity);" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 65 "Finally we have the solution for k=1.0, k=0.5, and k=0.1 plotted:" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 47 "plot([y_1(t,1),y_1(t,0.5),y_1(t,0.1)],t=0..10);" }} }{SECT 0 {PARA 3 "" 0 "" {TEXT -1 14 "Second example" }}{PARA 0 "" 0 " " {TEXT -1 132 "Here we consider the differential equation y' = 3-2y. \+ Find the solution for the initial value y(0)=1! Store it as a function y_2(t)!" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 "We now wish to plot a direction field. We use the functio n DEplot:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "DEplot(dgl2,y(t),t=0.. 2,\{[0.5,1],[0.5,3]\},y=0..5);" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 309 "It plots the direction field together with the curves hi tting the points (0.5,1.0) and (0.5,3.0).\nFind now the (unique) solut ions for the differential equation with the initial conditions y'(0)=- 1,0 and y'(0)=1.5! Use the operator D(y)(0=-1.0),e.g. to state the pro blem in the call of dsolve! Plot the curves!" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 13 "Third exampl e" }}{PARA 0 "" 0 "" {TEXT -1 528 "Find solutions for the differntial \+ equation xy' + ay = bx^2! Do not specify initial values to get a gener al solution first. Define now a to be 2 and b to be 4. For this combin ation of parameters plot the function within x=-4,...,4 and y=-4,...,4 for integration constants of _C1=0, _C1=0.5 and _C1=-0.5. One conveni ent way to do so is to get a function in x and _C1 by adding _C1 as a \+ third argument in the call of unapply. Vary now a and b! Are there pri ncipal differences between even and odd a? Which value for a is not fi ne?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 14 "Fourth example" }}{PARA 0 "" 0 "" {TEXT -1 204 "For this \+ exercise we need to solve transcendent equations numerically. In Maple we can use the function fsolve. For example, if we wish to calculate \+ a solution of ln(x)=sin(x), we would use it as follows:" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 27 "x0 := fsolve(ln(x)=sin(x));" }}{PARA 0 "" 0 " " {TEXT -1 233 "Find now a general solution of the differential equati on y' + axy = 1! For a=2 determine the constant such that the curve hi ts the points (0,1.0), (0,0.5) and (0,-0.5) respectively. Plot a dire ction field and of course these curves!" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 12 "The pendulum" }} {PARA 0 "" 0 "" {TEXT -1 646 "Finally we would like to look at the dif ferntial equation describing the motion of the pendulum more in detail . Use the notation a (al)'' +b(al)' + c sin(al) = 0 where (al) denotes the angle alpha. Before trying to find a solution of the nonlinear di fferential equation, make sure you have saved your worksheet. Solve th e linearised differential equation. Find reasonable initial conditions (think of the description of the physical problem: what is the initia l velocity of the body and where is it released?) and examine the beha viour of the solution for different values of the coefficients. Plot t he function for a=c=1.0 and b=(0.1, 1.0, 2.0)!" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "dgl5 := a*diff(al(t),t,t) + b*diff(al(t),t) + c*al(t) = 0.;" }}}}{MARK "3 1 0" 288 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }