A.1@ .M^Lttttttt ʰʰʰְ(ʰ>R$v74k1tJP
TEACHING ORDINARY DIFFERENTIAL EQUATIONS
WITH
COMPUTER EXPERIMENTS
(IN A THIRD WORLD COUNTRY)
By Samer Habre, Ph.D.
Lebanese American University
Beirut-Lebanon.
New York Office : 475 Riverside Drive, Room 1846
New York, N.Y. 10115
e-mail : shabre@lau.edu.lb
Phone : (00961) 01-867099 extension 297
Reference code :
Document : Microsoft Word for Windows; version 2.0.
Figures 1 & 2 : MacMath for Macintosh
All other examples : Mathematica 2.0
ABSTRACT
This paper is the outcome of an experiment on computers and the teaching of ordinary differential equations conducted in the Spring of 1995 at the Lebanese American University in Beirut, Lebanon. The majority of the students were future engineers with very few of them majoring in Computer Science and in Mathematics Education. The objective of the experiment was to integrate Mathematica and in few examples MacMath into the course content as an approach to create a novel way for teaching ODE's, clarifying concepts otherwise difficult to present on the board. Other objectives were to assess changes to the course content and to introduce the computer to a society that is still somehow computer illiterate at large.
A principal goal of education is to empower students by providing them with the tools of learning. This was a main reason lying behind this experiment for which I had prepared a "Laboratory Workbook" to come as a supplement to the book adopted for use in our ODE class. Many difficulties were faced in the implementation, the main problem being the limited availability of computers. The experiment had its successes and its failures depending on the material discussed and on the level of my preparation as a lab instructor.
In this paper I choose to present some of the successes of the experiment, such as using MacMath to understand the direction field and using Mathematica to minimize the calculations involved in solving homogeneous and non-homogeneous higher order ODE's. Mathematica was also used to
understand the problems of Springs motion and for finding series solutions of ODE's. Furthermore, the results of a questionnaire that was distributed to the 26 students of the class is presented. The results show some weaknesses in the experiment, however, the experiment was rated as somehow successful and the instructor was encouraged to improve it and repeat it in the future.
INTRODUCTION.
The following paper is the outcome of an experiment on computers and the teaching of ordinary differential equations (odes for short) conducted at the Lebanese American University (Beirut-Lebanon) in the Spring of 1995. The class was a section of "Fundamentals of Differential Equations", a required course for engineering students; however, few of the students were majoring in computer science or in mathematics education. The objective of the experiment was to integrate "Mathematica" and in few examples "MacMath" into the course content, as an approach to create a novel way for teaching odes, clarifying concepts otherwise difficult to present on the board and easing the long calculations involved in solving most odes. Other objectives were to assess changes to the course content and to introduce the computer to a society that is still somehow computer illiterate at large.
THE COURSE CONTENT.
The course "Differential Equations - MTH 204" is described in the syllabus I had prepared as follows: " The theory of Differential Equations constitutes one of the most important areas studied in mathematics since it arises in many other sciences such as physics, chemistry and biology, and is vital for fields such as engineering... " Then I add, "Computers have become a vital machine in our daily life. Teaching, like most other professions is sure to take advantage of this computer revolution. During this semester two computer software (Mathematica and MacMath) will be used to help understand and solve differential equations. For this purpose, a "Laboratory Workbook" was prepared to come as a supplement to the textbook adopted for use. It is important to affirm that the workbook should not be regarded as a substitute for the pencil-and-paper work."
THE LABORATORY WORKBOOK.
A principal goal of education is to empower students by providing them with the tools for learning. If the instructor can provide an environment where a student can experience learning as a process, then the student gains the confidence to learn and discover. This is one of the reasons that lie behind this experiment. Following a workshop that I attended in 1992 at Cornell University on "Teaching Ordinary Differential Equations With Computer Experiments", it occurred to me that I should prepare a computer supplement to the book [2] used in our ode class. About a year of work produced what I called" The Laboratory Workbook for Ordinary Differential Equations". The Workbook was divided into seven chapters as follows:
- CHAPTER 0. INTRODUCTION TO THE SOFTWARE. The purpose of this chapter is to familiarize the reader with some of the features of Mathematica and MacMath (other features will be introduced in the next chapters as the need arises.) Most experiments presented in this chapter assume only a knowledge of calculus. Furthermore, the concept of direction fields is discussed so as to present to the reader the most important application of MacMath.
- CHAPTER 1. FIRST ORDER ODES. In this chapter, a Mathematica command (DSolve) is introduced allowing the student to find the solution to an ode (of any order) in just one step. However, the reader is reminded that this command should be used only to check his/her answer. Furthermore, first order odes are analyzed graphically by drawing the solution to an ode together with its derivative, preferably on the same coordinate system. Examples are given whereby both software are used and more of their features are introduced (such as colored graphs!).
- CHAPTER 2. LINEAR SECOND ORDER EQUATIONS. The reader here is asked to follow the steps learned in class for solving homogeneous and non-homogeneous second order odes using Mathematica as a tool to help attain the final result..
- CHAPTER 3. LINEAR ODES OF HIGHER ORDER. No new material is introduced in this chapter. The methods learned in chapter 2 are reiterated with very little change.
- CHAPTER 4. APPLICATIONS. Using Mathematica and MacMath we are able to explain graphically the motion of a suspended spring. Of particular importance is the ability to understand questions such as: "When will a mass reach its minimum height after being set in motion?" or "When will the mass reach first its equilibrium position?".
- CHAPTER 5. LAPLACE TRANSFORMS. Laplace Transforms may be used to solve initial value problems. The method is summarized into three steps in which a system of n equations into n unknowns requires a solution. Mathematica is used at this stage together with finding inverse Laplace Transforms.
- CHAPTER 6. POWER SERIES SOLUTIONS OF LINEAR DIFFERENTIAL EQUATIONS. At an ordinary point, solutions to linear odes are expected to be analytic, hence represented by power series. Coefficients of power series are determined using Mathematica.
THE EXPERIMENT.
As much as the students were enthusiastic and anxious about their trip to the computer laboratory, I was nervous about it. In the short time I have been a university math professor, I have used the computer only twice as part of my teaching process. This was back in 1992 when I was a visiting assistant professor at the State University of New York, College at Geneseo. There I had used a portable computer in a Calculus class to illustrate to the students how the Maclaurin /Taylor Series of some functions converge to the functions themselves. It was a simple experiment compared to the project I was about to start at LAU. For this reason, I had to remind myself constantly of the goals of the experiment and in particular of the fact that by introducing the students to Mathematica and MacMath, they are learning more than what the instructor can provide them with and they are gaining more confidence sitting behind a machine that many people in Lebanon still fear.
On the technical side, I was faced with many difficulties. LAU is a small university with a relatively small computer center. Providing a personal computer to each of the twenty six students of my class was impossible. In fact, only six terminals (IBM compatible) were provided forcing me to divide the class into two groups that met weekly at two different times. However, even with this arrangement, terminals had to be shared by at least two students. As for the Macintosh (which I needed for the MacMath), only one was available, which meant that I had to minimize on its applications. Practice is important to know more about the software, but in a country where the minimum wage is around $200 owning a personal computer is still restricted to the wealthy.
Our First Day.
Early in the semester and before taking our first trip to the computer laboratory, I had explained to the students the idea of a direction field of a first order ode. For those who are familiar with the subject, this method is a powerful tool that approximates solutions to initial value problems, but is very difficult to do. Yet using MacMath, the task becomes very simple:
1. Open "DiffEq 9.x";
2. Input the desired equation;
3. Under "Settings" click on "Show Axes"; then on "Show Tickmarks"; then on "Show Slope Marks", and the direction field is shown on the screen.
It is the simplicity of this algorithm (compared to the pencil-and-paper work required to do a direction field) and the importance of this concept that led me to start our experiment with an application to direction fields. Many examples were studied. Here are two:
Example 1. The direction field of: EMBED Equation
FIGURE 1
This example is excellent because it shows clearly the "isoclines", an idea that was not very clear during the class discussion (see figure above). By studying carefully the direction field of this ordinary differential equation, the students were able to picture the solution anywhere on the screen. They understood that by clicking on the screen they are actually choosing an initial condition (the point appears on the right upper corner of the screen) and that the solution graph obtained satisfies that initial condition.
Example 2. The direction field of: EMBED Equation
FIGURE 2
In this problem the isoclines are not clear, but the student is still able to picture the solution "almost" anywhere on the screen. For instance, it is easy to see that the tangent is horizontal at the point (EMBED Equation ,-3) and in fact by browsing on the screen to get closer to this point, the student is able to deduce that the tangent is indeed horizontal. However, on the left bottom part of the screen, the shape of the solution appears to be different and the students were curious to know why. This allowed me to go over some of the other features of this software. Thus, we discussed changing the range and/or the domain of the solution, the different methods for approximating a solution ( such as the Euler Method and the Runge-Kutta method). We also discussed the "step size" and its effect on the approximation.
Other examples were prepared for the students to work on and some additional problems were given from the book "MacMath, a dynamical system software package for the Macintosh" [1].
The study of Mathematica was initiated by simple experiments to familiarize the student with the different features of this software.
(e.g. Finding roots of polynomials:
EXAMPLES 3 &4
The purpose of these examples was to show to the reader the efficiency of the software and the effect of the perturbation of the coefficients on the solutions.)
Other features that were quickly discussed were: numerical evaluation, derivatives, partial derivatives, integral of functions, graphs and colored graphs.
A Set Back.
Following these sessions, the time became appropriate to start implementing those ideas on Differential Equations. The command DSolve was introduced and used to solve first order odes. Initial value problems were discussed and sketches of solutions were done using Mathematica.
This experiment was simple and signs of boredom were clear on the faces of the students. In fact, the following session had very few students since attendance was not mandatory. It was necessary then to sit down and reflect on the experiment itself and on ways of improving it so that it becomes more exciting to the students. I asked the students themselves and most agreed that a printout of the different results may be an incentive to work harder. (However, with the few equipment we had, this was not possible). On the other hand, I thought that the complexity of the problems to come is going to be an incentive not to give up but rather to go on with the experiment.
A Come Back.
In the meantime, we had started discussing in class homogeneous/non-homogeneous second and higher order linear ode's with constant coefficients. These problems are time consuming for, in the non-homogeneous case, they require finding the solution yh of the corresponding homogeneous equation, guess a particular solution yp of the non-homogeneous one and solve for the undetermined coefficients in the guess of yp. Furthermore, if initial conditions are imposed, the constants in yh are to be evaluated also. The complexity of the problem proved to be an incentive for the students to learn more about Mathematica. The computer session devoted to this topic proved to be very successful. In the laboratory workbook I had prepared, an algorithm was developed for solving such problems. Here is an example:
EXAMPLE 5
In order to create analytical thinking and to promote group work, students were asked to develop their own algorithm until we find a most efficient one. A number of these algorithms were presented and ways for minimizing the time required to solve such problems were developed. Readings about Mathematica [3] were required in order to use the sotware more efficiently leading the students to know more about the software and its characteristics. I choose to present one:
EXAMPLE 6
Since most of the students were future engineers, it was only natural to talk about some applications to the theories developed. One of the applications had to do with the motion of springs. A typical exercise would be to attach a mass to a hanging spring, stretch it and apply an upward/downward velocity to set it in motion. Many cases are studied, namely the undamped free case, the damped free case and the case of forced vibrations. In most exercises, the student is asked to plot the curve representing the motion of the spring and to answer questions such as: When will the mass reach its maximum/minimum height? or when will the mass first reach its equilibrium position? In general, those questions are not easy to answer unless we are able to see the graph in details. Mathematica is a very helpful tool for such problems, as the next experiment suggests.
EXAMPLE 7
The computer sessions on using Laplace Transforms to solve initial value problems for linear differential equations required no new knowledge of Mathematica other than the commands "LaplaceTransform" and "InverselaplaceTransform". The use of Mathematica for such problems is limited but helpful, in particular for finding the inverse Laplace Transform.
EXAMPLE 8
Perhaps Mathematica is most useful for finding power series solutions of linear odes.
Consider the homogeneous second order linear ode written in standard form:
EMBED Equation
A point EMBED Equation is called an ordinary point of equation EMBED Equation if both EMBED Equation and EMBED Equation are analytic at EMBED Equation . ( If EMBED Equation is not an ordinary point then it is called a singular point).
At an ordinary point EMBED Equation of equation EMBED Equation , the coefficient functions EMBED Equation and EMBED Equation are analytic, hence the solutions to this equation are expected to inherit this property. The tedious part of the power series solution is the algebra associated with substituting a power series with undetermined coefficients into the differential equation and collecting the coefficients of like powers. However, Mathematica can take care of these details, as the next experiment shows.
EXAMPLE 9
The experiment had its successes and its failures and some problems were faced in the implementation, the main problem being the limited availability of computers. To assess the experiment, a questionnaire was distributed to the twenty- six students of the class. The outcome was encouraging and may be summarized as follows:
In response to whether the lab sessions were helpful for a better understanding of the material covered in class, the majority of the responses ranged between always ( 38.5%) and sometimes (46%). Evaluating both software, namely MacMath and Mathematica, for the purpose of a Differential Equations class, the class felt that they were beneficial (40% very good and 52% good). Rating the experiment as a whole, 38.5% of the respondents thought that it was very good, while 50% thought that it was good. When asked if it is advisable for the professor to repeat the experiment with similar students, the vast majority (96%) replied positively.
As for the written comments, the respondents agreed that the experiment shows the importance of computers in helping solve some mathematical computations in a shorter time. However, few felt that one lab hour was not enough to practice and become more familiar with the software. Yet, even in the little time spent in the lab, the experiment was rated as somehow successful with a need for improvement. An additional point worthy of mention is the effect it had on the Lebanese students for it was a novel experience to them in their academic life.
A math professor is bound to face the dilemma of whether to use computers in the classroom or not. The "puritans" in mathematics would definitely oppose the idea; others beleive that, since computer science depends heavily on mathematics, why should mathematics (and the other sciences) not benefit from the advances done in the world of programming? Do mathematicians think that the convergence of the Maclaurin series of EMBED Equation to EMBED Equation is easy to explain? A lot of math software would enable the student to see this convergence. Is this harmful at all? The answers to the above questions remain to be revealed.
REFERENCES
[1] J. Hubbard and B. West, MacMath, A Dynamical Systems Software Package for the Macintosh, Springer-Verlag, 1991.
[2] R. K. Nagle and E. Saff, Fundamentals of Differential Equations, 3rd ed., Addisson-Wesley Publishing Company, 1993.
[3] S. Wolfram, Mathematica, a System for Doing Mathematics by Computer, 2nd ed., Addisson-Wesley Publishing Company, 1991.
PAGE2
vv.A anz:M+$D .1&MathType- M4Times New Roman-!dxiL!dt@j!t@w!x@0Symbol-!=@>!-@7Times New Roman-!."System-!;~BRcvar:g*D & .1&MathType- M4Times New RomanM-!dxiL!dt@!xSin@!t@0Symbol-!=@ATimes New RomanM-! @1Times New Roman?-!."System-th::==&* p .1 &MathType Symbol-!p"System-w :E*
l 9 .1&MathType- !4Times New RomanU-!d!x^!dtQ!p!t5!dxM!dt<
!q!t5 Times New RomanLU-!2!2~Times New RomanU-!0Symbol-!+ !+D
!=6!*)Times New RomanU-!(a!) !(X!)>!.!(!)Times New RomanLU-!
"System-:=) .1 &MathType@@Times New Roman-!t Times New Roman-!0"System-:W)T .1 &MathType@ Times New Roman-!( !) Symbol-!*"System-cSymbol!:N6) .1&MathType@ DTimes New RomanM-!p !t Times New Roman-!( T!)"System-:+( .1&MathType@ Times New RomanM-!q !t Times New Romanw -!( 0!)"System-:=) .1 &MathType@@Times New Roman-!t Times New Roman-!0"System-:=) .1 &MathType@@Times New Roman-!t Times New Roman-!0"System-!:=) .1 &MathType@@Times New Roman-!t Times New Roman-!0"System-!:W)T .1 &MathType@ Times New Roman-!( !) Symbol-!*"System-cSymbol!:N6) .1&MathType@ DTimes New RomanM-!p !t Times New Roman-!( T!)"System-:+( .1&MathType@ Times New RomanM-!q !t Times New Romanw -!( 0!)"System-:. .1&MathTypeTimes New RomanM-!e Times New RomanX-!x"System-6"vv^&8&6t jj&6:. .1&MathTypeTimes New RomanM-!e Times New RomanX-!x"System-6"vv^&8&6t jj&6! Equation`
dxdt=t-x.&YesN#
METAFILEPICTMHM+ .1&MathType- M4Times New Roman-!dxiL!dt@j!t@w!x@0Symbol-!=@>!-@7Times New Roman-!."System-!;~BRcv Equation`
dxdt=xSin t.
METAFILEPICTghg* & .1&MathType- M4Times New RomanM-!dxiL!dt@!xSin@!t@0Symbol-!=@ATimes New RomanM-! @1Times New Roman?-!."System- Equation@
p'* *tali
METAFILEPICT===&* p .1 &MathType Symbol-!p"System- Equation
d2
xdt2
+p(t)dxdt+q(t)=0. (*)I2
METAFILEPICTE* 9 .1&MathType- !4Times New RomanU-!d!x^!dtQ!p!t5!dxM!dt<
!q!t5 Times New RomanLU-!2!2~Times New RomanU-!0Symbol-!+ !+D
!=6!*)Times New RomanU-!(a!) !(X!)>!.!(!)Times New RomanLU-!
"System- Equation@
t0
METAFILEPICT=h=) .1 &MathType@@Times New Roman-!t Times New Roman-!0"System- Equation@
(*)*
METAFILEPICTW6hW/ .1 &MathType@ Times New Roman-!( !) Symbol-!*"System-cSymbol Equation@
p(t)*v
METAFILEPICTN6N6) .1&MathType@ DTimes New RomanM-!p !t Times New Roman-!( T!)"System-ua Equation@
q(t)*INFO
METAFILEPICT+6+( .1&MathType@ Times New RomanM-!q !t Times New Romanw -!( 0!)"System-ua Equation@
t0
METAFILEPICT=h=v+ .1 &MathType@@Times New Roman-!t Times New Roman-!0"System- Equation@
t0
METAFILEPICT=h=) .1 &MathType@@Times New Roman-!t Times New Roman-!0"System- Equation@
t0
METAFILEPICT=h=+ .1 &MathType@@Times New Roman-!t Times New Roman-!0"System- Equation@
(*)*
METAFILEPICTW6hW, .1 &MathType@ Times New Roman-!( !) Symbol-!*"System-cSymbol Equation@
p(t)*v
METAFILEPICTN6N. .1&MathType@ DTimes New RomanM-!p !t Times New Roman-!( T!)"System-ua Equation@
q(t)*INFO
METAFILEPICT+6+, .1&MathType@ Times New RomanM-!q !t Times New Romanw -!( 0!)"System-ua Equation@
ex^&
METAFILEPICT6h. .1&MathTypeTimes New RomanM-!e Times New RomanX-!x"System-6"vv^&8&6t jj&6 Equation@
ex^&
METAFILEPICT6h" .1&MathTypeTimes New RomanM-!e Times New RomanX-!x"System-6"vv^&8&6t jj&600
3
vv.A Equation@
ex^&
METAFILEPICT6h" .1&MathTypeTimes New RomanM-!e Times New RomanX&3M_w=>@D
*
A
H
24L*!89;C!N!S!Z!#$%%n&u&~((((((
Dl
!
! H(((((***++++++++#++++,
,,,,m.p.&/1/>/I///////6181C1G1Q2_2555666Y6[6\6]6֨ڑ
S
@stP
@o
M4]666666666u77C8L8u99+:6:F=Q======E>P>>>?$?A?M?H@I@X@Y@Z@[@e@f@u@v@w@x@@@@@@@@@@ȻZ
@P|(Y
@XzLT
@t
4@@@@@@@@@@@@
AAA
AAA%A&A'A(A}A~AAAAAAAAAAAAAAڵڜڃvj]d
@`c
@hta
@p_
@x^
@``\
@H~$AAAAAAAAAA0C;CCCzEEEEEEEE:FCFLFPFFFFF/K0K?K@KAKBKFKGKVKWKXKYKLWLLLLڽڷڱڱڽڽڱڱڱڱڥڌڽ{w{0\k
@i
@
h
@pHf
@X.L!MiMMMMMMMMMMMvxz|}
! 0 '8j&Msuwy{}cs !#%')+-/1@C24NP')+-$&)!#a#%68; "%%%%&&&p'r'~((((((((**++++%+'+)+++m.o.&/(/*/,/./0///////006181E1G1_2b25555A8C8N8P8):+:-:8:::=====???&?(?*?,?.?0?2?4?6?8????@]@hA}CCCCCCaCCD^GILLLLLLLLLL!L#L%L'L)L+L-L/L1L3L5L7L9L;L=L?LALCLELGLILKLMLOLQLSLULWLcLeLgLLLWMYMMMMMMMMz|f 3:)@ nL} '-6= HJnL
8Y
8>Tpr IKMOQSUWY[]_as >
@
U
W
np,.} ####%2%S%%%''<'>'@'J'L'N'_)a))))))))),,------=.b.e.h.w.y.//////003333666688888"<(<3<5<7<=============>>d>>>?BBBBBBB^CE HJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ`KbKKKZL\LnLf 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f 3f 3f 3f 3f 3f 3f 3f 3f .
f .f .f .f .f .f .f .f .f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f 3f cf .f .f 3f cf .f cf 3f .f f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f 3f 3f 3f 3f 3
f .
f .f .f .f .f .f .f .f .f .f .f .f Ef .f .f .f .f .f .f .f Ef .f .f .f .f .f .f .f 3
f cf .f cf cf cf cf cf .f cf cf cf .f .f .f .f .f cf .f 3f .f . f .f .f .f .f
f .f .f .f .f .f .f .f .f .f cf .f f f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f kf Bf =f .f .f .f .f .f .f . f .f . f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f .f 3f 3f 3f 3f 3f 3f 3f 3f 3(]6@ALJKLMNO#C|PQR>Times New Roman Symbol&ArialTraditional Arabic''7'9')))***>>>>>>&?6?8?C?S?U?Z?j?l?~??????@@@!@1@3@P@`@b@g@w@y@IIIIIInL::::::::::::::::! \L^LdLeLjLlLnLv8x1zM|MMM"h
DJ1Computer CenterComputer Center