The math department has a small collection of Maple worksheets (as Maple files are called) that you can experiment with. What follows are my own results of experimenting with Maple code. Basic Maple etiquette:Every line (or rather, complete expression) must end with a colon (:) or semicolon (;) . A colon will supress the output of the line, a semicolon will print the output of the line. This bit of Maple code:
with(DEtools):
will draw a direction field for the differential equation
This bit of Maple code:
with(DEtools): will draw a bunch of solutions for the equation. From these examples it ought to be fairly straightforward for you to build examples of your own; just replace "diff(y(t),t)=1+x(t)*(y(t)*y(t)-3*x(t)-2)" with "diff(y(t),t)= a function of your own". Note that "x(t)" is how these examples need you to write "t".
The command "dsolve" can be used to solve (symbolically) differential equations: for
example, you can try
This will return all solutions to the differential equation [dy/dt] - y^{2} = 0.
with(DEtools): You can, of course, insert your own functions into `deqn', adjust the stepsize, initial condition, and points you want to evaluate your approximate solution at! Here is some code to explore the solutions to spring-mass problems:
with(DEtools): You can, as usual, change the values of m, gam, k, and om, as well as the initial conditions, to generate examples of the various phenomena that we explored in class. Here is some code for exploring systems of linear first order equations:
with(DEtools): As you can probably tell, a and b are the coefficients in the first equation, while c and d belong to the second. This code will tell you what the associated matrix is, compute its characteristic polynomial and eigenvalues, and draw the direction field and a few solution curves for the equation (i.e., draw a phase portrait). So you can use this to see the effect on the phase portrait of changes to your initial matrix. A much more jazzed up version of this Maple routine can be found here; it will determine (for a 2-by-2 system) where the eigenvectors are, plot all of the straight-line solutions, and attempt to do a good job of picking other representative solutions. It's pretty cludgy (because I kept needing to avoid dividing by 0), so if you know of, or figure out, or stumble across a slicker way to do it, please let me know! |