To see revisions of this document or browse other course outlines, please Log In

Numerical methods Winter 2024
ECE 204

Published Feb 12, 2024

Class Schedule

Please log in to view this content.

Instructor & TA (Teaching Assistant) Information

Please log in to view this content.

Course Description

ECE 204:

Application of computational methods to engineering problems. Number systems, errors and error propagation. Roots of nonlinear equations. Introduction to numerical linear algebra. Interpolation and numerical integration. Introduction to numerical solutions of ordinary differential equations, optimization. Emphasis will be placed on algorithm development. [Offered: F, W]

Prereq: Level at least 2A Computer Engineering or Electrical Engineering. Antireq: AMATH 342, CS 370, 371, ECE 204A, 204B, MTE 204

As an overview, this course will introduce the application of computational methods for modeling and simulating real-world physical systems. The employment of fixed-precision arithmetic in computers introduces errors that, when unaddressed, can undermine the validity of any approximations or simulations. By comprehending the limitations of such arithmetic, we can develop computational methods that enable us to mitigate these effects allowing us to, in turn, to attain sufficiently accurate approximations or simulations within a practical timeframe.

Learning Outcomes

By the end of this course students should be able to:
To understand, analyze and investigate the weaknesses of using double-precision floating-point numbers.
To understand, evaluate and apply the tools that mitigate the weaknesses of of floating-point numbers.
To describe, examine and develop tools that can be used to approximate solutions to approximating the value of an algebraic expression.
To describe, examine, design and develop tools that can be used to approximate the value of an algebraic expression.
To describe, examine, design and develop tools that can be used to approximate solutions to both linear and nonlinear algebraic equations and systems of such equations.
To describe, examine, design and develop tools that can be used to approximate solutions to analytic equations (initial- and boundary-value problems) and systems of such equations.
To describe, examine, design and develop tools that can be used to approximate extrema of optimization problems.

Tentative Course Schedule

Each full course at the University of Waterloo consists of 36 lectures spread over nominally twelve weeks of classes. These twelve weeks do not include the autumnal and winter reading weeks. If there are holidays throughout the term, there will be make-up lectures at the end of the term. Also, the Department of Electrical and Computer Engineering cancels classes during mid-term week and, instead, offers make-up lectures. Thus, the make-up lectures before the mid-term week will speed the progression through the course material, and after mid-term week, we will be initially a lecture or two behind, but then as subsequent make-up lectures occur, we will catch up once again with the schedule below. The schedule below is "tentative" and not intended to reflect exactly what topics are covered in which week of the course.

Week 1
1 Course introduction
2 Representation of real numbers

Week 2
3 Tools for finding numerical algorithms
3.1 Weighted averages
3.2 Iteration and fixed-point iteration
3.3 Linear algebra

Week 3
3.4 Interpolation
3.5 Taylor series
3.6 Bracketing
3.7 Intermediate-value theorem
3.8 Summary of tools and looking ahead
4 Types and sources of error

Week 4
5 Introduction to approximating the value of expressions
5.1 Evaluating a polynomial at a point and Horner's rule
5.2 Using interpolating polynomials
5.2.1 Approximating values using interpolating polynomials
5.2.2 Approximating derivatives using interpolating polynomials

Week 5
5.2.3 Approximating integrals using interpolating polynomials
5.3 Least-squares best-fitting polynomials
5.3.1 Approximating a point using least-squares best-fitting polynomials
5.3.2 Approximating the derivative using least-squares best-fitting polynomials
5.3.3 Approximating an integral using least-squares best-fitting polynomials

Week 6
6 Approximating solutions to algebraic equations
6.1 Approximating the solution to the quadratic equation
6.2 Approximating solutions to non-linear algebraic equations
6.2.1 Newton's method
6.2.2 The bisection method
6.2.3 The bracketed secant method
6.2.4 The secant method
6.2.5 Muller's method
6.2.6 Inverse quadratic interpolation
6.3 Approximating solutions to systems of linear equations
6.3.1 The Gauss-Seidel method
6.3.2 The method of successive over-relaxation

Week 7
6.4 Approximating solutions to systems of non-linear equations
6.4.1 Newton's method in n dimensions
7 Approximating solutions to analytic equations
7.1 Approximating solutions to ordinary differential equations (ODEs)
7.1.1 Approximating solutions to initial-value problems (IVPs)
7.1.1.1 Approximating solutions to first-order IVPs
7.1.1.1.1 Euler's method

Week 8
7.1.1.1.2 Heun's method
7.1.1.1.3 The 4th-order Runge-Kutta method
7.1.1.1.4 Error analysis of these methods
7.1.1.2 Adaptive techniques for 1st-order initial-value problems (IVPs)
7.1.1.2.1 Adaptive Euler-Heun method
7.1.1.2.2 Adaptive Dormand-Prince method

Week 9
7.1.1.3 Approximating solutions to systems of 1st-order IVPs
7.1.1.4 Approximating solutions to higher-order IVPs
7.1.1.5 Approximating solutions to systems of higher-order IVPs
7.1.2 Approximating solutions to boundary-value problems
7.1.2.1 The shooting method

Week 10
7.1.2.2 The finite-difference method
7.1.2.3 Neumann and insulated boundary conditions
7.2 Approximating solutions to partial differential equations
7.2.1 The heat equation in one dimension

Week 11
7.2.2 The wave equation in one dimension
7.2.3 Laplace's equation
8 Optimization
8.1 Optimizing functions of a real variable
8.1.1 Step-by-step optimization
8.1.2 Newton's method for finding extrema

Week 12
8.1.3 The golden-ratio search
8.1.4 Successive parabolic interpolation
8.2 Optimizing functions of a vector variable
8.2.1 Hooke-Jeeves method
8.2.2 Newton's method for finding extrema in n dimensions
8.2.3 Gradient descent

Texts / Materials

Title / Name Notes / Comments Required
Course web site https://ece.uwaterloo.ca/~dwharder/nm/ No

Student Assessment

Component Value
Final examination F out of 100.
Mid-term examination M out of 100.
Projects Five projects P1, P2, P3, P4 and P5, each out of 100.

Let E = ⅔F + ⅓M be your examination weighted average.

Let P = ⅕(P1 + P2 + P3 + P4 + P5) be your project average.

If E ≥ 50, your grade is ¾E + ¼P.
If E ≤ 30, your grade is E; that is, your projects do not count.
If 30 < E < 50, your grade is ⅛[ (⅒E − 3)P + (11 − ⅒E)E ]; that is, the weight of your projects increases linearly from 0% to 25% as your weighted examination grade increases from 30 to 50. 

To see the full mid-term schedule for ECE students, see this mid-term examination schedule page. This course has its mid-term examination scheduled for Wednesday, February 28, 4:30-6:00 pm (16:30-18:00) in E7 4043, 4053, 4417, 4433. Seating will be arranged through Odyssey.

Source code may be submitted through the Learning Management System (LEARN) at https://learn.uwaterloo.ca/.

Project deadlines:

All projects are due the Monday following the week in which the corresponding laboratory is being held. The laboratory sessions are help sessions where you can speak to a teaching assistant. All deadlines are 22:00 and the deadlines are firm with no exceptions. If any project is missed, or if any grade on a project is less than that of your performance on the final examination, that project grade is replaced by your final examination grade.

  1. Monday, January 22 at 22:00
  2. Monday, February 5 at 22:00
  3. Monday, February 26 at 22:00
  4. Monday, March 18 at 22:00
  5. Monday, April 1 at 22:00

Text-based assignments will be submitted through the Crowdmark course administration and on-line assessment grading system. All Crowdmark submissions are kept on AWS servers in Montreal, Canada.

Assignment Screening

MOSS: Source-code matching software (MOSS) may be used to screen assignments in this course. MOSS is used to verify that all source code in projects is not plagiarized from peers either from this offering or previous offerings of this course. Students' submissions are stored on a server in the United States of America at Stanford University for a period not exceeding one month, therefore students will be given an alternative of having the instructor personally investigate the similarity of their submissions with those of others students.

It is the responsibility of a student to notify the instructor in the first week of term if that student wishes that the instructor personally investigate the similarity of that student's submissions to other.

Notice of Recording

Student notice of recording: It is not anticipated that any part of this course will be recorded; however, in the event of another lockdown, it may be appropriate to record activities such as tutorials. Activities for this course involve recording, in partial fulfillment of the course learning outcomes.  You will receive notification of recording via the Learning Management System (LEARN). Some technologies may also provide a recording indicator. Recordings will be managed according to the University records classification scheme, WatClass, and will be securely destroyed when no longer needed by the University. Your personal information is protected in accordance with the Freedom of Information and Protection of Privacy Act, as well as University policies and guidelines and may be subject to disclosure where required by law.

The University will use reasonable means to protect the security and confidentiality of the recorded information, but cannot provide a guarantee of such due to factors beyond the University’s control, such as recordings being forwarded, copied, intercepted, circulated, disclosed, or stored without the University’s knowledge or permission or the introduction of malware into computer system which could potentially damage or disrupt the computer, networks, and security settings. The University is not responsible for connectivity/technical difficulties or loss of data associated with your hardware, software or Internet connection.

In the event of a lockdown, by engaging in course activities that involve recording, you are consenting to the use of your appearance, image, text/chat messaging, and voice and/or likeness in the manner and under the conditions specified herein. (In the case of a live stream event, if you choose not to have your image or audio recorded, you may disable the audio and video functionality and use a pseudonym instead of your real name if such a feature exists. If you choose not to be recorded, this notice serves as confirmation of your understanding that in the event of a lockdown, you may not be able to participate in tutorials.  

You are not permitted to disclose the link to/URL of an event or an event session recording or copies of recording to anyone, for any reason. Recordings are available only to authorized individuals who have been directly provided the above instructions/link for their use. Recordings for personal use, required to facilitate your learning and preparation of personal course/lecture notes, should not be shared with others without the permission of the instructor or event coordinator. Review the University’s guidelines for faculty, staff and students entering relationships with external organizations offering access to course materials for more information on your obligations with respect to keeping copies of course materials. For more information about accessibility, connect with AccessAbility Services.

Administrative Policy

Supremacy of the final examination grade: Any project or mid-term examination grade will be replaced by the grade on the final examination if the grade on the final examination is higher than the grade for a specific project or the mid-term examination. For example, if nothing is submitted throughout the term, your grade on the final-examination will be your final grade. This policy, however, will not be applied if a grade on a project or the mid-term examination is the result of a Policy 71 investigation.

Extensions: There will be no extensions granted in this course. If any component of this course is missed, the missing grade will be automatically replaced by the final examination grade as described in the previous point.

Generative artificial intelligence: This course includes the independent development and practice of specific skills, such as software design and development. Therefore, the use of Generative artificial intelligence (GenAI) trained using large language models (LLM) or other methods to produce text, images, music, or code, like Chat GPT, DALL-E, or GitHub CoPilot, is not permitted in this class. Unauthorized use in this course, such as running course materials through GenAI or using GenAI to complete a course assessment is considered a violation of Policy 71 (plagiarism or unauthorized aids or assistance). Work produced with the assistance of GenAI tools does not represent the author’s original work and is therefore in violation of the fundamental values of academic integrity including honesty, trust, respect, fairness, responsibility and courage (ICAI, n.d.).

You should be prepared to show your work. To demonstrate your learning, you should keep your rough notes, including research notes, brainstorming, and drafting notes. You may be asked to submit these notes along with earlier drafts of their work, either through saved drafts or saved versions of a document. If the use of GenAI is suspected where not permitted, you may be asked to meet with your instructor or teaching assistant (TA) to provide explanations to support the submitted material as being your original work. Through this process, if you have not sufficiently supported your work, academic misconduct allegations may be brought to the Associate Dean. 

In addition, you should be aware that the legal/copyright status of generative AI inputs and outputs is unclear. More information is available from the Copyright Advisory Committee: https://uwaterloo.ca/copyright-at-waterloo/teaching/generative-artificial-intelligence 

Students are encouraged to reach out to campus supports if they need help with their coursework including: 

Territorial acknowledgement: The University of Waterloo acknowledges that much of our work takes place on the traditional territory of the Attawandaron (Neutral), Anishinaabeg (Ă-nĭsh’-ē-naw-bā or Mississaugas) and Haudenosaunee (Hō-dĕ-nō-shō’-nē or Iroquois) peoples. Our main campus is situated on the Haldimand Tract, the land granted to the Six Nations (Mohawk, Cayuga, Onondaga, Oneida, Seneca and Tuscarora) that includes six miles on each side of the Grand River. Our active work toward reconciliation takes place across our campuses through research, learning, teaching, and community building, and is coordinated within the Office of Indigenous Relations (and here).

Inclusive teaching-learning spaces: The University of Waterloo values the diverse and intersectional identities of its students, faculty, and staff. The University regards equity and diversity as an integral part of academic excellence and is committed to accessibility for all. We consider our classrooms, online learning, and community spaces to be places where we all will be treated with respect, dignity, and consideration. We welcome individuals of all ages, backgrounds, beliefs, ethnicities, genders, gender identities, gender expressions, national origins, religious affiliations, sexual orientations, ability – and other visible and nonvisible differences. We are all expected to contribute to a respectful, welcoming, and inclusive teaching- learning environment. Any member of the campus community who has experienced discrimination at the University is encouraged to seek guidance from the Office of Equity, Diversity, Inclusion & Anti-racism (EDI-R) via email at equity@uwaterloo.ca. Sexual Violence Prevention & Response Office (SVPRO), supports students at uWaterloo who have experienced, or have been impacted by, sexual violence and gender-based violence. This includes those who experienced harm, those who are supporting others who experienced harm. SVPRO can be contacted at svpro@uwaterloo.ca

Religious and spiritual observances: The University of Waterloo has a duty to accommodate religious and spiritual observances under the Ontario Human Rights Code. Please inform the instructor at the beginning of term if special accommodation needs to be made for religious observances that are not otherwise accounted for in the scheduling of classes and assignments. Consult with your instructor(s) within two weeks of the announcement of the due date for which accommodation is being sought. 

Respectful communication and pronouns: Communications with Instructor(s) and teaching assistants (TAs) should be through recommended channels for the course (e.g., email, LEARN, Piazza, Teams, etc.) Please use your uWaterloo email address. Include an academic signature with your full name, program, student ID. We encourage you to include your pronouns to facilitate respectful communication (e.g., he/him; she/her; they/them). You can update your chosen/preferred name at WatIAM. You can update your pronouns in Quest

Mental health and well-being resources: If you are facing challenges impacting one or more courses, contact your academic advisor or Associate Chair for Undergraduate Studies. Mental health is a serious issue for everyone and can affect your ability to do your best work. We encourage you to seek out mental health and wellbeing support when needed. The Faculty of Engineering Wellness Program has programming and resources for undergraduate students. For counselling (individual or group) reach out to Campus Wellness and Counselling Services. Counselling Services is an inclusive, non-judgmental, and confidential space for anyone to seek support. They offer confidential counselling for a variety of areas including anxiety, stress management, depression, grief, substance use, sexuality, relationship issues, and much more. 

Intellectual property: Be aware that this course contains the intellectual property of their instructor, TA, and/or the University of Waterloo. Intellectual property includes items such as:

  • Lecture content, spoken and written (and any audio/video recording thereof).
  • Lecture handouts, presentations, and other materials prepared for the course (e.g., PowerPoint slides).
  • Questions or solution sets from various types of assessments (e.g., assignments, quizzes, tests, final exams); and
  • Work protected by copyright (e.g., any work authored by the instructor or TA or used by the instructor or TA with permission of the copyright owner).

Course materials and the intellectual property contained therein are used to enhance a student’s educational experience. However, sharing this intellectual property without the intellectual property owner’s permission is a violation of intellectual property rights. For this reason, it is necessary to ask the instructor, TA and/or the University of Waterloo for permission before uploading and sharing the intellectual property of others online (e.g., to an online repository).

Permission from an instructor, TA or the University is also necessary before sharing the intellectual property of others from completed courses with students taking the same/similar courses in subsequent terms/years. In many cases, instructors might be happy to allow distribution of certain materials. However, doing so without expressed permission is considered a violation of intellectual property rights and academic integrity.

Please alert the instructor if you become aware of intellectual property belonging to others (past or present) circulating, either through the student body or online.

Continuity plan - fair contingencies for unforeseen circumstances (e.g., resurgence of COVID-19): In the event of emergencies or highly unusual circumstances, the instructor will collaborate with the Department/Faculty to find reasonable and fair solutions that respect rights and workloads of students, staff, and faculty. This may include modifying content delivery, course topics and/or assessments and/or weight and/or deadlines with due and fair notice to students. Substantial changes after the first week of classes require the approval of the Associate Dean, Undergraduate Studies.

Declaring absences: Regardless of the process used to declare an absence, students are responsible for reaching out to their instructors as soon as possible. The course instructor will determine how missed course components are accommodated. Self-declared absences (for COVID-19 and short-term absences up to 2 days) must be submitted through Quest. Absences requiring documentation (e.g., Verification of Illness Form, bereavement, etc.) are to be uploaded by completing the form on the VIF System. The uWaterloo Verification of Illness form, completed by a health professional, is the only acceptable documentation for an absence due to illness. Do not send documentation to your advisor, course instructor, teaching assistant, or lab coordinator. Submission through the VIF System, once approved, will notify your instructors of your absence. 

Rescheduling co-op interviews: Follow the co-op process for rescheduling co-op interviews for conflicts to graded assignments (e.g., midterms, tests, and final exams). Attendance at co-operative work-term employment interviews is not considered to be a valid reason to miss a test.

University Policy

Academic integrity: In order to maintain a culture of academic integrity, members of the University of Waterloo community are expected to promote honesty, trust, fairness, respect and responsibility. [Check the Office of Academic Integrity for more information.]

Grievance: A student who believes that a decision affecting some aspect of their university life has been unfair or unreasonable may have grounds for initiating a grievance. Read Policy 70, Student Petitions and Grievances, Section 4. When in doubt, please be certain to contact the department’s administrative assistant who will provide further assistance.

Discipline: A student is expected to know what constitutes academic integrity to avoid committing an academic offence, and to take responsibility for their actions. [Check the Office of Academic Integrity for more information.] A student who is unsure whether an action constitutes an offence, or who needs help in learning how to avoid offences (e.g., plagiarism, cheating) or about “rules” for group work/collaboration should seek guidance from the course instructor, academic advisor, or the undergraduate associate dean. For information on categories of offences and types of penalties, students should refer to Policy 71, Student Discipline. For typical penalties, check Guidelines for the Assessment of Penalties.

Appeals: A decision made or penalty imposed under Policy 70, Student Petitions and Grievances (other than a petition) or Policy 71, Student Discipline may be appealed if there is a ground. A student who believes they have a ground for an appeal should refer to Policy 72, Student Appeals.

Note for students with disabilities: AccessAbility Services, located in Needles Hall, Room 1401, collaborates with all academic departments to arrange appropriate accommodations for students with disabilities without compromising the academic integrity of the curriculum. If you require academic accommodations to lessen the impact of your disability, please register with AccessAbility Services at the beginning of each academic term.

Turnitin.com: Text matching software (Turnitin®) may be used to screen assignments in this course. Turnitin® is used to verify that all materials and sources in assignments are documented. Students' submissions are stored on a U.S. server, therefore students must be given an alternative (e.g., scaffolded assignment or annotated bibliography), if they are concerned about their privacy and/or security. Students will be given due notice, in the first week of the term and/or at the time assignment details are provided, about arrangements and alternatives for the use of Turnitin in this course.

It is the responsibility of the student to notify the instructor if they, in the first week of term or at the time assignment details are provided, wish to submit alternate assignment.