Multi-Disciplinary Approach To Teaching Numerical Methods To Engineers Using Matlab
Multi-Disciplinary Approach To Teaching Numerical Methods To Engineers Using Matlab
Multi-Disciplinary Approach To Teaching Numerical Methods To Engineers Using Matlab
C216C230, 2006
C216
T. Webb
Abstract
Teaching Numerical Methods to first year engineering students is
improved by a collaboration between engineers, computer scientists
and mathematicians. Our approach has been to teach a problem
based course with six, fortnightly assignments, each revolving around
an engineering problem solved by a specific numerical method. The
collaborative delivery, engineering problem focus, and intensive tutorials all contribute to make this a very successful course that gives
the students a sound foundation to take into later years and hopefully
their careers.
C217
Contents
1 Introduction
C217
2 Background history
C218
C220
4 Example problems
C222
C226
6 Conclusion
C229
References
C229
Introduction
1 Introduction
C218
application of in-built routines is more useful. Students are also more motivated when they can see a direct application to their chosen profession.
An example of the book/technology mismatch is simple integration. It
takes one page to describe the fundamental principles of numerical integration
via Riemann sums. It takes three lines to illustrate the Matlab command
quadl which will do many integrations numerically. Yet many books with titles Numerical Methods using Matlab (for example [4]), aimed at later year
students, spend many pages describing competing methods, barely mentioning the simple Matlab command quadl. More targeted texts such as [2]
emphasise the details of the numerical methods rather than their use in solving engineering problems. However, two recent books [3, 6] deal nicely with
the learning of Matlab with chapters on numerical methods with applications.
Our aim in developing the course Engineering Computational Methods
was to give first year students some of the basic tools for solving engineering
problems, while still giving them some experience in writing more complicated programs and a few of the numerical issued involved in computational
methods. We try to teach them the in-built Matlab commands, their uses
and limitations, as well as an introduction to programming their own simple
routines. The advantage of giving first year students an exposure to Matlab solving of problems, and the underlying numerical methods, is that these
students can then use these skills for all their later courses, hence deepening
their understanding of other topics. As an underlying principle we wanted the
course to be engineering problem focused since having realistic application
both motivates [5] students and gives them a deeper learning experience [7].
Background history
Some fifteen years ago, the Civil Engineering Program at unsw@adfa was
being redesigned and one topic under the spotlight was Numerical Methods
2 Background history
C219
2 Background history
C220
The Course comprises six engineering problems taken from real world experience or related to more advanced engineering courses and was developed by
the second author with assistance from the other two lecturers and engineering colleagues. Development of course notes, framing the mathematical and
numerical basis and overall management of the course fell to the first author.
A third lecturer (Darcy Brooker from School of Information Technology and
Electrical Engineering) provided further numerical and computational insight.
Each topic is presented over a two week period, with two lectures, and four
hours of supervised computer laboratory sessions. The lectures are jointly
delivered by the three lecturers who also conduct the laboratory tutorials
with the assistance of tutors.
A typical lecture delivery would start with a description of the engineering problem to be solved by the engineer, followed by descriptions of the
mathematical background, the relevant Matlab functions, programming
techniques and numerical issues. Most of this would be delivered over two
hours at the start of each topic. The deep learning happens in the computer
laboratories where the students tackle the assignments under supervision.
Through each topic the student has to come to an understanding of the
engineering problem, be able to convert it into an equivalent mathematical
formulation, design Matlab code to solve the problem and finally reinterpret
it as the solution to the engineering problem. The students submit a written
report with attached Matlab code together with its output.
The assignments account for about 50% of the assessment with an exam
accounting for the remainder. The three hour, closed book exam consists
of small problems designed to reflect the knowledge gained by doing the
assignments.
C221
C222
Example problems
4 Example problems
C223
gT 2
L
gT 2 d .
(2)
(3)
and use the roots command in Matlab to find the zeros of this function.
5. Write a Newtons method code to find the zero.
6. If d = 4 000 50 what error does one get with L?
We expected the students to comment on what their results meant. For
example, the plot of the f (L) along with the approximate versions of f (L)
using the asymptotics of tanh are illustrated in Figure 1.
The student should note that the fzero(@f,106 ) gives the answer accurately, since L = 106 is a good first guess, but after several iterations. However, fzero(@f,1) gives the incorrect result of L = 0 since Matlab actually
finds the discontinuity of f (L) at L = 0 , while fzero(@f,[1,106 ]) (giving
Matlab the range x [1, 106 ]) gives the result accurately and quickly.
p
The student then shows that L gT 2 d gives an acceptable result with
an error of 0.003%. Doing the cubic approximation also gives an accurate
answer, but that one has to know enough to discard the inaccurate root at
L = 14 500 . Doing a little programming to do Newtons method, the student
then finds that an accurate answer is obtained with fewer steps than using
fzero even with a starting value of L = 1 .
4 Example problems
C224
F(L)
1.5
x 10
f(L)
Linear approx
Cubic approx
zero
false zeros
f(L) [m]
0.5
0
0.5
1
1.5
5
L [m]
10
5
x 10
4 Example problems
C225
Differential equations
A second example is finding displacement y(x), for a pole bending under
wave drag force, as governed by
2
y 00 = (h x)2 (1 + y 0 )3/2 ,
y(0) = y 0 (0) = 0 ,
(4)
where is a constant, x is the height up the pole, and h is the water depth.
Here we get the student to solve this using Matlab ode45 having first solved
the linear approximation
y 00 = (h x)2
(5)
both analytically and numerically. One of the problem solving strategies addressed in this assignment is to first solve a problem with known solution (the
linear approximation) before solving more complicated nonlinear problems.
In addition we get the student to write a simple Euler solution and comment
on the various solutions.
This assignment coincided with the first year mathematics course where
converting a second order differential equation to systems of first order differential equations was being discussed. There was thus opportunity to address
4 Example problems
C226
the problem of compartmentalism by reinforcing and expanding on the material from the mathematics course.
Developing this course was not easy. Apart from the administrative difficulties of a course taught jointly by three lecturers, and three schools, there
were the difficulties of reconciling our different approaches. As expected,
each of us wanted different emphasis placed on different parts of the course.
However, the resultant course was much better than we could have done
separately. For example, the engineering examples were more realistic that
would have been invented by a mathematician, but the input of mathematics
and computer science meant the students appreciated more the background
to the solution method and did more rigorous testing of their routines. An
additional benefit was that collaboration extended beyond the confines of
the course with more interaction between schools on the development and
administration of our Engineering Mathematics courses. We also found that
each of us learned a great deal, with even our Matlab programming skills
improving with the input of ideas from the other lecturers.
We have seen many benefits for the students with this Course. Students
learned how to write well structured assignments. We are very strict on
presentation and completeness with the solutions. Initial assignments were
typically rather incomplete and scrappy, whereas by the end most were producing well polished assignments with well crafted and commented computer
code as well as sound engineering interpretation. At the beginning many students were computer phobic. This disappeared by the end and most students
were happy and confident in solving problems with Matlab . While the assignments had to be done individually, we saw many pleasing aspects of
teamwork in the tutorials. Students were genuinely helping each other and
keeping the fine balance between collaboration and plagiarism. Most student
C227
quickly became experts in the basics of setting up a Matlab program, using a range of plotting features, writing function subroutines, and sorting out
how to use new commands. They also gained skills in the overall approach to
solving engineering problemssomething that will continue into their later
years.
Positive comments were received from the students in staff-student review
meetings, and elsewhere, and also from our colleagues. The results of a
student survey showed that the majority of the class saw the value in what
we were doing although in the first year (2004) they commented that the
assignments were too long.
We also had relevant comment from students who had not done the
course. In one instance, one of us (Steve Barry) found several second year students working on an engineering assignment that required Matlab . These
students had not done the course because 2004 was the first year it was offered. In helping them Steve showed them what was available in the Course.
They then enthusiastically used the notes to learn what they needed and were
very vocal in their disappointment at not being taught this course when they
were in first year. They felt it was a crucial course for them and one they
wished they had done.
While the Course appears to be successful even in its first year of offering,
it has not been without its problems:
1. We had some instances of plagiarism in 2004. We designed the assignments to be doable within the laboratory time frame; however, only
about half of the students were completing their work in the laboratory times. In retrospect, we made the assignments in this first year
too long, and hence many students felt undue pressure to finish and
resorted to plagiarism. In 2005 the assignments were shorter and more
focused, and there were no cases of plagiarism. In addition we had a
flexible marking scheme whereby a student may count either four, five
or six of the assignments towards their final mark. This meant that
C228
C229
Conclusion
Our teaching of applicable numerical methods to Engineering students benefits greatly from being jointly taught by engineering, mathematics and computer science academics. The students are more motivated, see a more balanced course and quickly learn how to solve an engineering problem with
Matlab . While initially a difficult course to organise and develop, once set
up, it is a course whose benefits to the student and the staff go well beyond
the confines of the course itself.
References
[1] S. Barry. Matlab guide and online tutorial help. http:
//www.pems.adfa.edu.au/~s8704008/MATLAB.dir/MATLAB.html.
C222
[2] S. J. Chapra. Applied Numerical Methods with Matlab for Engineers
and Scientists. McGraw Hill, 2005.
http://www.mhhe.com/engcs/general/chapra/ C218
[3] A. Gilat. Matlab. An introduction with applications. Wiley, 2005.
http://www.wiley.com/WileyCDA/WileyTitle/
productCd-0471694207.html C218
[4] G. Lindfield and J. Penny. Numerical Methods using Matlab. Prentice
Hall, USA, 2000. URL C218
References
C230