Math 221 -- Some examples of Maple commands (revised and corrected) These examples work under Maple V, Release 3, which is what we have installed on the machines in the Bessey Hall Lab. For Release 4 (and possibly for Release 5), the examples will still work if you change "DEplot1" to "DEplot". 1. Find the general solution to the differential equation dy/dt = 1 / (ty + t + y + 1), which is exercise 1.2 #18. Then try adding the argument "explicit=true" at the end. Finally add an initial condition. dsolve( diff( y(t), t ) = 1 / (t*y(t) + t + y(t) + 1), y(t) ); dsolve( diff( y(t), t ) = 1 / (t*y(t) + t + y(t) + 1), y(t), explicit=true ); dsolve( {diff( y(t), t ) = 1 / (t*y(t) + t + y(t) + 1), y(0) = 0}, y(t), explicit=true ); For the last command, you will see as output (under Release 3) two solutions. Which is the correct one? (Under Release 4, only one solution appears.) 2. Load some differential equation plotting programs. with(DEtools); 3. Show the slope fields for the differential equation dy/dt = t - y, for t in the interval [-2,2] and y in the same interval. Also show the solution curves corresponding to the initial conditions y(0) = 0.4 and y(0) = 1. DEplot1( diff( y(t), t ) = t - y(t), y(t), t=-2..2, {[0,0.4], [0,1]}, y=-2..2 ); 4a. Solve the initial value problem dS/dt = 1/4 - S/10, S(0) = 0, as in exercise 1.2 #35, and call the solution "ans". ans := dsolve( {diff(S(t), t) = 1/4 - S(t)/10, S(0) = 0}, S(t) ); 4b. Compute the value of the solution when t = 10 and t = 1000. Give exact answers instead of decimal approximations. For t = 1000, after a first attempt, try again and ask for 50 digits of precision. evalf( subs( t = 10, ans ) ); evalf( subs( t = 1000, ans ) ); evalf( subs( t = 1000, ans ), 50 ); 4c. Plot the solution, letting t range between 0 and 60. plot( rhs(ans), t=0..60 ); 4d. For amusement, change S(t)/10 to S(t)^2/10, and plot. Then change to S(t)^3/10. Maple won't be able to find an explicit solution, and the plot will fail. But the following command will work. (What does "stepsize" do?) DEplot1( diff(S(t), t) = 1/4 - S(t)^3/10, S(t), t=0..60, {[0,0]}, arrows=NONE, stepsize=0.1 ); 5. Solve dy/dt = t^2 / (y + t^3 y), y(0) = -2, which is exercise 1.2 #31. dsolve( {diff( y(t), t ) = t^2 / (y + t^3*y), y(0) = -2}, y(t) ); If you do this under Release 3, you get as output y(t) = - 1/3 (6 ln(t + 1) + 6 ln(t^2 - t + 1) + 36)^(1/2) If you do it under Release 4, you get as output y(t) = - 1/3 (36 + 6 ln(t^3 + 1))^(1/2) Explain the discrepancy!