Paper ID #11518
Advanced Undergraduate Engineering Mathematics
Dr. Michael P. Hennessey, University of St. Thomas
Michael P. Hennessey (Mike) joined the full-time faculty as an assistant professor in the fall of 2000.
Mike gained 10 years of industrial and academic laboratory experience at 3M, FMC, and the University
of Minnesota prior to embarking on an academic career at Rochester Institute of Technology (3 years) and
Minnesota State University, Mankato (2 years). He has taught over 20 courses in mechanical engineering
at the undergraduate and graduate level, advised 11 MSME graduates, and has written (or co-written)
45 technical papers (published or accepted), in either journals (11), conference proceedings (33), or in
magazines (1). He also actively consults with industry and is a member of ASME, SIAM and ASEE.
Page 26.161.1
c American Society for Engineering Education, 2015
Advanced Undergraduate Engineering Mathematics
Abstract
This paper presents the details of a course on advanced engineering mathematics taught several
times to undergraduate engineering students at the University of St. Thomas. Additionally, it
provides motivation for the selection of different topics and showcases related numerical and
graphical work done mostly in MATLAB. Primary course topics covered in this survey course
include: (1) vector integral Calculus, (2) an introduction to Fourier series, (3) an introduction to
partial differential equations (PDEs), (4) an introduction to complex analysis, and (5) conformal
mapping and applications. Also, examples of student project work are shown. Lastly, useful
student feedback and lessons learned is shared that others involved in engineering mathematics
instruction may find useful or be able to relate to.
Keywords: Vector integral Calculus, Fourier series, partial differential equations, complex
analysis, conformal mapping, engineering mathematics education
1. Introduction
Due to increasing undergraduate enrollments in both electrical and mechanical engineering
within the School of Engineering and interest in helping our graduates become better prepared to
handle the applied mathematical rigors of engineering graduate school, especially at top
institutions, a technical elective course entitled Advanced Engineering Mathematics was
developed and has now been taught a total of 3 times. The prerequisites were both Multivariable
Calculus (MATH 200) and Introduction to Differential Equations and Linear Algebra (MATH
210)1. A survey approach was adopted and topics were selected to appeal to both the needs of
electrical and mechanical engineering students, and for which there are mainstream textbooks
available.
Page 26.161.2
As part of the content selection exercise, an effort was made to solicit input (via email) from
directors of graduate studies at several well-known R1 engineering graduate schools, especially
ones offering Ph.D.’s in both electrical and mechanical engineering, since those are the
undergraduate programs that St. Thomas offers (3 requests in total). Unfortunately, none of
them responded! That said, based on the author’s academic experience over many years along
with discussions with other faculty members (including several from the Mathematics
Department), the following core topics were selected: (1) vector integral Calculus, (2) an
introduction to Fourier series, (3) an introduction to partial differential equations, (4) an
introduction to complex analysis, and (5) conformal mapping and applications. Note that a high
percentage of the material builds upon itself. More specifically, the solution of a PDE as a
Fourier series via separation of variables follows the topic of Fourier series and complex analysis
notions like conformal mappings and analytic functions follow the PDE topic in which harmonic
functions are introduced. Much of the material is classic engineering mathematics that has
admittedly been around for decades and hasn’t really changed. However, modern software such
as MATLAB2,3 or Mathematica4, brings the material more to life and offers tremendous
advantages for related numeric, graphic, and associated student project work.
Originally, vector integral Calculus (specifically the 3 integral theorems due to Green, Gauss,
and Stokes) was not going to be covered since theoretically these topics would be covered in
Multivariable Calculus (MATH 210). However, based on discussions with the Mathematics
Department, it was felt that it would be a good idea as most engineering students find it to be
difficult material and it can’t be guaranteed that all 3 theorems would be covered in MATH 210.
This decision had the effect of bumping another popular topic, namely, the Calculus of
Variations, but the resultant slate of topics fits well with available texts on engineering
mathematics currently in print (unlike the text by Wylie and Barrett5, which the author has taught
out of), such as that written by Kreyszig in his 10th edition6. As an interesting side story, the
author (who is clearly dating himself) was first exposed to Kreyszig’s 3rd edition decades ago7.
The existing engineering education academic literature on the topic of applied mathematical
preparation of students for engineering graduate school is very limited, as determined from
Compendex and Google Scholar. This is perhaps due to the greater need associated with issues
dealing with required undergraduate engineering mathematics courses (i.e. Calculus, introduction
to differential equations and linear algebra) and the fact that the smaller population of graduate
school-bound students are better at mathematics anyway. On the required undergraduate
mathematics topic, the literature is quite extensive, dealing with issues like the mathematical
preparation of freshman students, improving the performance and retention of students,
especially demographically under-represented groups, projects, and use of technology, such as elearning, classroom technology, etc. One school, Wright State University, with NSF funding,
even revamped their entire required engineering mathematics curriculum to improve program
attributes such as student retention (Klingbeil and Bourne8). That said, Sun et. al9. advocate for
the use of applied mathematical project work as means of better preparing students for
engineering graduate school and Siegenthaler pushes for plowing through a rigorous text by
Arfken and Weber on mathematical physics10. Specific engineering disciplines may have more
focused or nuanced needs. For example, in chemical engineering, Kauffman11 makes the case
that applied mathematics is one of the top 3 topical areas within a US Ph.D. program. Lastly, in
mechanical engineering, Yerion12 uses finite differences and other numerical analysis techniques
in a course that is a prerequisite for heat transfer.
2. Commentary on Topical Areas
Vector Integral Calculus: It is the opinion of the author that, generally speaking, vector
differential Calculus is an easier topic than vector integral Calculus, and that students have some
proficiency with this topic from their Multivariable Calculus course, which of course is a
prerequisite. The main focus then is on the 3 famous integral theorems from Green, Gauss, and
Stokes, namely:
Green:
Gauss (Divergence):
+
�
∇∙�
=
�=
�
�
�
−
�
�
�∙�
�
Page 26.161.3
Stokes:
∇ × � ∙ � = �� � ∙ �
�
Beyond coverage of an overview of the derivations and typical verification-style example
problems (e.g. checking both sides) some other interesting discussions can take place such as the
relationship between these theorems (e.g. Green’s is an obvious special case of Stokes), and for a
given problem, which side would be easier to evaluate. With the internet, students were looking
up this topic on Kahn Academy13 and learning a bit of history associated with these
mathematicians, including their desire to achieve integral order reduction, which is really the
mathematical spirit of these theorems, especially when further generalized (e.g. to higher
dimensional manifolds), beyond the scope of this course however. Applications of these
theorems were of primary interest, including calculation of area using a line integral (using
Green’s Theorem), to fluid mechanics & electromagnetic field theory that involve notions such
as flux, circulation, projections, and sources & sinks. It was noted that your standard GPS unit,
such as an eTrex Legend14 has the capability of calculating area based on a closed track (or path)
file. This topic also provided an excuse to purchase a planimeter for a few hundred dollars15 (see
Fig. 1), a neat mechanical instrument used to calculate the area of closed curves (e.g. for use in
quantifying experimental aspects of thermodynamic cycles) that, while not in common use today
due to technical obsolescence, is of historical significance, much like the now obsolete slide rule.
Exploring the details of its usage and operational mysteries was the basis for a student project.
Fig. 1 Area measuring planimeter instrument (Model L-10 from LASICO Inc.).
Page 26.161.4
Introduction to Fourier Series: Basic coverage of interest to both electrical and mechanical
engineering students was achieved with a focus on applications that typically take the form of
cosine and sine series representations of different periodic scalar-valued real functions, e.g. see
Fig. 2. Other standard tricks of the trade, like odd/even extensions, non-periodic functions,
functions of arbitrary periods, and Parseval’s Theorem for error estimates were covered as well.
This topic lends itself to the use of MATLAB for practical numerical and graphical studies, such
as convergence, both from a quantitative and qualitative point of view as well as studying the
frequency content and how the oddness or evenness of different functions affects the
coefficients, such as if they are zero or nonzero. Students were impressed with what can be done
with only a few lines of code in a MATLAB script style M-file and it gave them some more
practice with MATLAB, especially working with nested loops and arrays, which are used in
other engineering courses such as Dynamics (ENGR 322) and Control Systems and Automation
(ENGR 410). Lastly, the utility of the Fourier series representation was brought to use in solving
linear ordinary differential equations (ODEs) with constant coefficients but a “non-friendly,” but
periodic right hand side (RHS) that serves as a forcing function. This last topic was a good
opportunity to refresh the student’s knowledge regarding different partitions of an ODE solution
(i.e. homogeneous/particular and transient/steady-state) which have both mathematical and
engineering significance.
Introduction to Partial Differential Equations: The classic separation of variables method in
which the solution is represented as a Fourier series was covered in detail and illustrated through
a number of common engineering examples dealing with the PDEs associated with
strings/membranes, vibrating beams, steady and unsteady heat conduction, and electro-statics
and fluid mechanics. We’re talking about equations such as:
Laplace (2D): ∇2 � =
�
�
+
�
Heat Conduction (1D, 2D):
�
Wave (1D, 2D):
�
=
�
�
�
2�
�
�
,
�
�
�
=
=
=
2�
�
2 �
�
,
�
�
+
=
�
�
2 �
�
+
�
�
= 2
Vibrating Beam:
�
�
And, of course appropriate boundary and/or initial conditions must be provided. Beyond asking
students to plow through various solution steps, including all of the symbolic manipulations,
dealing with boundary conditions, and well-posedness, which is important for establishing a
good foundation, it’s a good excuse to do some more numerical work in MATLAB, as shown in
Fig. 3. For problems involving time, MATLAB movies (“animation” vs. “movie” is perhaps a
more accurate, and less over-stated term) can be made and with the creation of files with the
proper format, played on a typical smart phone, such as an iPhone5-6 which are in common use
by students. They seemed to really like this idea and could show video snippets lasting only a
few seconds (and then looped) to others such as classmates, friends, and relatives. Again, they
were impressed with the power of just a few lines of MATLAB code and as a fun class topic,
they were shown how to solve the 1D wave equation and make an animation with only 10
essential lines of MATLAB code (see Appendix).
Fig. 3 Steady-state solution of 2D thermal
conduction problem.
Page 26.161.5
Fig. 2 Fourier series approximation of a
periodic sawtooth function with N = 15 terms
using MATLAB.
Introduction to Complex Analysis: This topic was covered primarily to lay the theoretical
background for the rich set of applications in engineering using conformal mapping. A review of
complex numbers and complex algebra served as a warm-up for introducing some old and new
ideas in the complex realm such as limits, continuity, differentiation, analyticity (including the
Cauchy-Riemann equations), and working with common elementary functions, all of which have
familiar real versions. The tie-in to the notion of a harmonic function was a natural, having just
covered a PDE introduction. Details and nuances that get into issues like multiplicity, branches
of functions, clarification of domains and ranges, and elementary point-set topology concepts
were covered. Coverage of the point-set topology ideas were needed to better understand certain
theorems, such as their assumptions and limitations. In an effort to become somewhat proficient
with basic knowledge, students were challenged with evaluating odd expressions such as � � ,
using the delta method to establish derivatives, differentiation of unusual functions, etc.
Conformal Mapping and Applications: One of the big ideas on this topic, expressed as a
consequence of the Harmonic Functions under Conformal Mapping Theorem, is that one can
transform a problem on a difficult domain to a more favorable domain for which an analytical
solution can be obtained through standard means, and then transform back to the original
problem domain, thereby obtaining the solution to the original problem posed. Of course, prior
to using the above mentioned theorem to solve some neat engineering analysis problems, one
needs to understand what a conformal mapping is and to exercise one’s thinking about this idea,
such as when it breaks down, etc., as it is only a local concept. One of the activities promoted
was a conformal mapping artwork contest, in which students could create their own exotic
artwork that graphically illustrated conformality, at least approximately through the mapping of
orthogonal grids of non-infinitesimal resolution, as shown in Fig. 4.
Fig. 4 Example conformal mapping “artwork” generated from
applied to an origin centered square grid and
from the origin to infinity.
=
+
+
=
, including
=
2
applied to a wedge emanating radially
Page 26.161.6
As a prelude for solving some interesting engineering problems, the idea of a linear fractional
transformation (LFT), or Mobius transformation was introduced, namely:
+
,
−
≠
=
=
+
with , , , being complex constants. LFTs are conformal, with the additional property of
transforming circles or lines to circles or lines and often provide a convenient mechanism for
transforming difficult problem domains into ones for which a solution is more easily obtained
(and then back again to the original problem domain). As an example of this approach, and to
showcase one of the author’s favorite problems from the course, consider a MATLAB version of
Kreyszig’s Example 1 of Section 2 in Chapter 18 that aims to find the electro-static potential
between 2 non-concentric circles. Its solution, complete with both orthogonal constant potential
and constant stream function lines, is shown in Fig. 5. It entails applying an LFT to create a
problem involving concentric circles, for which a solution is known, and then transforming back
to the original geometry. This very problem, with the same conceptual solution approach using
conformal mapping, is also discussed in Jeng-Tsong et. al16. Another interesting problem is a 2D
heat conduction problem with mixed boundary conditions (see Fig. 6).
Fig. 5 Electro-static equi-potential and
equi-stream lines for asymmetric axial
cables.
Fig. 6 Mixed boundary value problem involving heat
flow with both boundary insulation [ − , ] and
temperature sources [both −∞, − & , ∞ ].
The last topic of the course introduces the idea of a complex potential function �
and Figs. 78, with the aid of MATLAB, illustrate the famous examples involving 2D flow past a circular
cylinder (�
= + / ) and a family of Joukowski airfoils ( = + / applied to a special
set of circles).
Page 26.161.7
Project: Project work gives the students an opportunity to delve more deeply into a specific
problem, focus on an application of interest to them, be creative, perform some numerical and
graphical computing using MATLAB, possibly some other software like Mathematica and
Simulink2,17 and lastly, present their work to the class in our own “conference.” The objective of
the project is to gain expertise in using applied mathematics to solve an engineering problem. In
the process the student teams are engaged in the following activities (as given to students):
Understand and/or clarify step-by-step (e.g. fill-in missing steps) how applied
mathematics is used to model an engineering system of interest
Create appropriate and mathematically correct simulation models using MATLAB
incorporating relevant parameters
With specific scenarios in mind, perform MATLAB simulation runs, plot results, and
create animations
Prepare a technical report (with CD of all relevant computer files) and make a short
presentation to the class (you can use a few PPT slides, or not!)
Demonstrate how the engineering device works (if applicable)
Receive feedback on the technical report with an opportunity to correct/address any
issues raised with the goal of improving the overall quality
Fig. 7 Streamlines associated with flow
over a 2D circular object with �
= +
/ .
Fig. 8 A family of 3 Joukowski airfoils plus a center
curve.
On the last day of class an “Advanced Engineering Mathematics Conference” was held. Grading
of the project incorporated the following elements:
Title page (1%)
Abstract (4%)
Development of System Equations and Solution (30%)
MATLAB Numerical Work (30%)
Scenarios (5%)
Presentation (10%)
CD contents (20%, MATLAB graphics including any animations + storage of all files)
Table 1 identifies specific projects undertaken by different student teams for all 3 semesters with
Figs. 9-11 illustrating sample project work.
Table 1 Student Project Listing
Page 26.161.8
Spring 2011
Piston Motion in a Hydraulic Accumulator (Sean Engen, Frances Van Sloun)
Solving Rectangular Vibrating Membranes using Double Fourier Series (Michael Cowdrey, Ryan Huynh)
1-D Transient Heat Conduction Application (Colin Grist, Chris Cogan)
Spring 2012
Partial Differential Equations, Fourier Series, and Vibrating Membrane Equations (Perry Jagger, Luke LoPresto)
Vibration of a Rectangular Membrane (Adam Gibson, Andy Edmunds)
Electrostatics of Nonsymmetrical Semicircular Plates: Mapping constant potential lines using Linear Fractional
Transformations (Artem Mosesov, Julie Olson)
The Mechanical Planimeter and Green’s Theorem (David Bailly, Matthew Moore)
Spring 2014
2D Steady Heat Flow through a Rectangular Plate (Noel Naughton, Alex Krause)
Vibration of a Rectangular Membrane (Lucas Unger, Cole Hazelbaker)
Longitudinal Vibrations in an Elastic Bar (Brendan O’Connell, Drew Stangler)
Vibration of a Rectangular Membrane (Sam Miller)
Fig. 9 Time-varying rectangular membrane deflection frame sequence (Lucas Unger, Cole
Hazelbaker).
Fig. 10 Constant potential lines between 2 nonsymmetrical semicircular plates at different
potentials (red & dark blue; Artem Mosesov, Julie Olson).
3. Lessons Learned, Other Issues, and Student Feedback
Having taught this course a total of 3 times, there have been some reoccurring issues and lessons
learned that are worth mentioning, dealing with: (1) vector integral Calculus, (2) programming
loops, (3) ODE solution structures, (4) the impact of friction on various mathematical theories
and their practical usage, and (5) student feedback. Some of these (and related) issues have been
previously shared with the Mathematics Department18.
Page 26.161.9
Vector Integral Calculus: Theoretically, in their Multivariable Calculus course (MATH 210)
the students have seen the 3 famous integral theorems due to Green, Gauss, and Stokes, and
should be comfortable with this material. As conjectured by instructors of those courses in the
Mathematics Department, another pass through the material, perhaps from a slightly different
perspective, would be beneficial. I found this to be the case as well. They may have seen the
material before but in talking to them and working through the material, both theory and
application problems, it is clear that another pass is warranted. From a learning and pedagogy
point of view, this practical observation is consistent with the idea that if you want to learn
mathematics at level N very well, you need to see it at level N + 1! This situation also presents
an opportunity to delve into some important engineering applications and interpretations of
related theories.
Fig. 11 Simulink model of piston dynamics (Sean Engen, Frances Van Sloun).
Programming Loops: Loops and the generalization to nested loops (e.g. of order 2, 3, or even
4) are not that well understood by most of the students, in spite of having taken a 4 CR
Introduction to Programming course (CISC 1301) based on MATLAB and C. Of course, when
solving PDEs numerically using series expansions this becomes an issue, especially as the spatial
dimension order is increased beyond 1, as the most straight forward approach is to use nested
loops.
Page 26.161.10
ODE Solution Structures: Maybe it’s just the author, but the “old school” method in which he
learned elementary differential equations is unfamiliar to the students and consequently they
have trouble following the construction of certain solution structures. More specifically, this
refers to the solution of linear, non-homogeneous, ordinary differential equations with constant
coefficients with a “friendly” RHS, as in Rainville and Bedient19, the author’s undergraduate
ODE book. “Friendly” in the sense that conversion from a non-homogeneous ODE to a
homogeneous ODE is made possible through the creation and application to both sides of a
minimal-order polynomial-style differential operator with constant coefficients based on an
analysis of the roots associated with the RHS. And of course, more generally, the “roots
perspective” lays the groundwork for the structure of both the homogeneous and particular
solutions that very clearly and readily deals with issues such as multiplicity (within the LHS,
RHS, or hybrid LHS/RHS) and complex vs. real roots. Anyway, enough about refreshing the
reader on the details of this method, the point being that the students lack the “roots perspective”
and therefore are at a loss for where certain solution structures come from, relying only on a
recipe for a few special cases, typically being lower-order (e.g. second order). Within the course
this issue shows up when solving linear ordinary ODEs with constant coefficients on the LHS,
but a “non-friendly” RHS. The solution strategy is to represent the RHS as a Fourier series and
on a term by term basis solve an infinite series of implied non-homogeneous ODEs (indexed
with the ℎ series term) and then add all of these pieces of the solution together to construct the
entire solution.
Impact of Friction on Various Mathematical Theories their Practical Usage: Critics of the
topic of “potential flow” and its analogies in other energy domains (like electro-statics)
accurately point out that this elegant mathematical theory which connects key ideas in both
complex analysis and PDEs via analytic functions whose real and imaginary components are
harmonic functions, doesn’t readily handle internal friction and therefore it is not that useful.
Rather, numerical solutions to problems involving friction that form the basis of finite element
analysis (FEA) is preferred, especially when powerful commercial software is available. The
author’s view on this issue is that, while true, in many cases ignoring internal friction can be
justified, it is important to follow the historical development of the applied mathematical theories
and their application to engineering analysis problems, and that the topics (especially dealing
with harmonic functions) are good for the mathematical maturity of the student who will
undoubtedly encounter more advanced topics that use PDEs and/or complex analysis, should
they go on to engineering graduate school in a rigorous program.
Student Feedback: Feedback comes in 2 forms: (1) IDEA20 numbers and written comments,
and (2) comments heard directly from students. As for IDEA feedback, the average course
rating was “very good” and written comments have been generally positive. One student wrote
“I feel much better at understanding the math behind engineering,” with the most negative
comment being “More problems that have real-world applications would be beneficial.” As for
anecdotal feedback, one student who was back home visiting from his new graduate school felt
that he had an advantage over other engineering graduate students when studying the underlying
principles of how Magnetic Resonance Imaging (MRI) machines work since he knew about
conformal mapping.
4. Conclusions and Future Work
The offering of the above described technical elective course on engineering mathematics makes
good sense for both of our BSEE and BSME programs, especially for graduate-school bound
students. Informal feedback from previous students who have moved on to graduate school has
been that it has been useful in terms of better preparing students for the applied mathematical
rigors encountered. Over time the hope is that the enrollment will grow and an effort is
underway to make it an official course listed in the catalog.
Acknowledgements
Page 26.161.11
The author acknowledges Dr. Don Weinkauf, dean of the School of Engineering, who, based on
his experience in working with senior-level chemical engineering students, advocated for the
development and delivery of this course (by the author) and Dr. Cheri Shakiban of the
Mathematics Department, who provided critical review and input regarding the development of
this course. Additionally, acknowledgement of the efforts of the students who took this course
and worked on interesting projects is expressed.
Bibliography
[1] University of St. Thomas, Undergraduate Catalog: 2012-2014, St. Paul, MN, 2012.
[2] http://www.mathworks.com/.
[3] Hanselman, D. and Littlefield, B., Mastering MATLAB 7TM, Pearson Prentice Hall, Upper Saddle River, NJ,
2004.
[4] www.wolfram.com.
[5] Wylie, C. R. and Barrett, L. C., Advanced Engineering Mathematics, 6th Edition, McGraw-Hill, New York,
NY, 1995.
[6] Kreyszig, Advanced Engineering Mathematics, 10th Edition, Wiley, Hoboken, NJ, 2011.
[7] Kreyszig, Advanced Engineering Mathematics, 3th Edition, Wiley, Hoboken, NJ, 1972.
[8] Klingbeil, N. W., and Bourne, A., “A national model for engineering mathematics education: Longitudinal
impact at Wright State University,” 120th ASEE Annual Conference and Exposition, June 23-26, 2013.
[9] Sun, C., Dusseay, R., Cleary, D., Sukumaran, B., and Gabauer, D., “Open-ended projects for graduate schoolbound undergraduate students in civil engineering,” ASEE Annual Conference and Exposition, p 7647-7656,
June 24-27, 2001.
[10] Siegenthaler, K., “Advanced mathematics preparation for graduate school of undergraduate science and
engineering students,” ASEE Annual Conference and Exposition, p 297-308, June 20-23, 2004.
[11] Kauffman, D., “The core graduate chemical engineering program: Does it exist?,” ASEE Annual Conference
and Exposition, p 7435-7440, Montreal, Quebec, June 16-19, 2002.
[12] Yerion, K. A., Computer experiments with diffusion: finite difference, round-off error and animal stripes?,
International Journal of Mechanical Engineering Education, v 41, n 3, p 227-45, Manchester University
Press, July 2013.
[13] http://www.khanacademy.org/.
[14] Garmin Inc., eTrex HC series: personal navigator Owner’s Manual, Olathe, KS, 2007
(www.garmin.com/products/etrexLegend).
[15] LASICO (Los Angeles Scientific Instrument Company) Inc., Instruction Manual for Mechanical Polar
Planimeters, Los Angeles, CA (www.lasico.com).
[16] Jeng-Tzong, C., Ming-Hong, T., and Chein-Shan, L., Conformal mapping and bipolar coordinate for eccentric
Laplace problems, Computer Applications in Engineering Education, v 17, n 3, p 314-22, September 2009.
[17] Dabney, J. B. and Harman, T. L., Mastering SIMULINKTM, Pearson Prentice Hall, Upper Saddle River, NJ,
2003.
[18] Hennessey, M. P., “Applied Mathematics in an Undergraduate Engineering Program,” presented to the statistics
contingent of University of St. Thomas Mathematics Department, May 13, 2011.
[19] Rainville, E. D. and Bedient, P. E., A Short Course in Differential Equations, 5th Edition, Macmillan, New
York, 1974.
[20] http://ideaedu.org.
Appendix: MATLAB Script File Listing: StringMovieCompact.m
Page 26.161.12
c=1.0;k=0.5;L=1.0;N=3;M=500;TT=5.0;x=[0.000:0.01:1.00]';hold off
for T = 1:1:M
t=(T-1)*(TT/(M-1));u = zeros(size(x));
for n = 1:1:N
ln=c*n*pi/L;bn=(8*k/(n^2*pi^2))*sin(n*pi/2);
u=u+bn*cos(ln*t)*sin(n*pi*x/L);
end
plot(x,u,'LineWidth',6,'Color','green');xlim([0.0 1.0]);ylim([-0.5 0.5])
String(:,T) = getframe;
end