Algorithms and Computing II

Posted: January 30, 2018 in General

Below are the worksheets for the tutorials for MH1402.

Students are to work in groups at the beginning of the class (usually around 15 min) to fill up the worksheet. The worksheet is loosely based on the tutorial problems. After which, the tutor will go through with the worksheet as a class.

Tutorial – Week 6

Tutorial – Week 5

Tutorial – Week 4

Lab 1 – Week 4
In this lab, you will be creating data structures using the Python class objects. There are many online resources that introduce these objects and I list two videos from ProgrammingKnowledge. Please review them before the lab session. 🙂

Python Tutorial for Beginners 15 – Classes and Self
Python Tutorial for Beginners 16 – Class Constructors (__init__) and Destructor (__del__)

Tutorial – Week 3


I will briefly go through the minor mistakes committed by students. These mistakes are in fact documented in this list, Common Math Errors, written by Paul Dawkins. TL;DR: go straight to page 25, on calculus errors.

Assignment 1

  • For Q1(a), some left out the absolute sign in the \int\frac{1}{x+1} dx=\ln|x+1|+C without explaining why (because x>0).
  • For Q1(b), we are to use the method of variation of parameters. Some tried to use method of undetermined coefficients and managed to solve for the coefficients by comparing some terms. This is not correct! For this method to work, you need to compare all terms and make sure your coefficients work for all of them. Here is  a good summary of the method of variation of parameters, that is similar to the one taught in this course.
  • For Q2(a), please be careful! t_0\ne 0. Please leave the final expression in terms of both m_0 and t_0
  • For Q3, surprisingly, some made mistakes in computing \int\frac{11}{380+8t}dt=\frac{11}{8}\ln|380+8t|+C. The mistake usually occurs in the coefficient \frac{11}{8}.

Assignment 2

For Q2, I was pleased that most were able to find limits along two paths that are different (even for Q2(b)) so as to conclude that the multivariate limit does not exist. Good! I checked with the lecturer and we clarified that if the limit along one path is \infty or the limit along one path is -\infty, then it is sufficient to conclude the limit does not exist.

For example, suppose we want to determine \lim_{(x,y)\to\infty}f(x,y)=\frac{1}{x^2+y^2}. Now, along y=0, f(x,0)=\frac{1}{x^2} and \lim_{x\to 0}\frac 1{x^2}=\infty. Hence, we conclude that \lim_{(x,y)\to\infty}f(x,y) does not exist.

Mathematics 2 (for Engineers)

Posted: January 19, 2016 in General

Below are the worksheets for the tutorials for MH1811.

Students are to work in groups at the beginning of the class (usually around 15 min) to fill up the worksheet. The worksheet is loosely based on the tutorial problems. After which, the tutor will go through with the worksheet as a class.

are here.

Tutorial 11
In this tutorial, we look at power series and determine the radius of convergence. We also approximate functions using Taylor polynomials and bound the error term.

Tutorial 10
I summarized most of the known tests for convergence and absolute convergence. Please use it to attempt your tutorials.

Tutorial 9

Tutorial 7
In this tutorial, we find the volume under a surface using double integration.

Tutorial 6
In this tutorial, we

  • find both local and global extrema;
  • find global extrema with one equality constraint using Lagrange multipliers.

Please spend time doing the exercises and understanding the method. You will encounter the method in many guises in your engineering course and perhaps your engineering career.


Tutorial 5
My apologies for the late post. Feel free to attempt the worksheet before trying out the actual tutorial problems.
In this tutorial, we

  • solve exact differential equations and nonexact differential equations using integrating factors;
  • find tangent planes and normal lines at a point on a surface, use tangent planes / linear approximate to approximate values of multivariate functions, use total differentials to approximate increments;
  • compute directional derivatives and determine the direction that maximizes the rate of change.

Tut 3, Q10
Tutorial 4
Please be reminded that there will be no classes on 9 Feb. Instead, Dr Tan will conduct a mass tutorial session on 11 Feb from 8:30am to 9:30am at LT24.

Have a prosperous Lunar New Year!

Tutorial 3
Tut 3, Q7

Tutorial 2
A student asked about setting “g(y)=0” when we substitute y=Vx. In these cases, we may obtain extra solutions by setting g(V)=0.

For Q3(a), we divided by V=0 to separate the equation. So, the additional solution is y=Vx=0.

For 3(b), we divided by \cos V=0 to separate the equation. So, the additional solution is \cos V=0, or V=(n+\frac12)\pi, where n is an integer. The extra solutions are therefore y=(n+\frac 12)\pi.

While this sort of accounting seems rather abstract, there is usually a “natural” interpretation for the extra solution g(y)=0 in most engineering problems. For example, when we look at Newton’s law of cooling in Tutorial 1, Q6. The extra solution T-T_m=0 corresponds to the case where the temperature of the object T is equal to the temperature of the surroundings T_m. Clearly, there will be no cooling or warming.

Tutorial 1

Below are the worksheets for the tutorials for MH2814.

Tutorial 7
Worksheet with blanks.

Tutorial 6, Part 2
Worksheet with blanks.

Tutorial 6
Worksheet with blanks.

Tutorial 4
Worksheet with blanks.

Tutorial 3
Worksheet with blanks.

Tutorial 2
Worksheet with blanks.

Some FAQs (updated now and then).

I’ve excluded the Chapters 17 to 20 from David Lerner’s notes. Does that mean that orthogonal projections, inner product and trace will not be tested?

No. I excluded them because in the notes, more “advanced” concepts are discussed in the chapters. For example, the chapter on inner product introduce the concept of positive definite and bilinear, which may be confusing. However, you will still need to know that how to compute the inner product between two vectors and what it means for two vectors to be orthogonal.

Similarly, orthogonal projection and trace are classic examples of linear transformations. Hence, you should be able to determine the kernel and range of these transformations. For example, Tut 10 Q2 asks you to determine the range of a trace map, which is within your ability. However, we will not ask you to show that trace map is invariant with respect to a change of basis.

I do not understand the concept of determining a matrix associated with a linear transformation.

Please take a look at this video from khan academy. I hope this is more illuminative.

Tut 11, Q4 is wrong.

My apologies. I’ve updated the worksheet.

When am I going to provide the feedback for the Final Sample?

Now. Here are the solutions with some feedback. Do not be too bothered by question 5.
If you want to find out more about projections as linear transformation, you can look at this video.

Am I going to provide the answers for the tutorial fill-in the blanks?


Here are some general guidance to studying linear algebra:

David Lerner’s notes are useful for self-study. They contain small exercises that help understanding and sometimes give hints to the tutorial questions.

Chapters to take note are: Ch 1- 8, Ch 10-13, Ch 15.

Khan Academy also has a comprehensive course for linear algebra too.

Relevant videos/lessons are:

  • Vector and spaces – Vectors, Linear combinations and spans, Linear dependence and independence, Subspaces and the basis for a subspace, Vector dot (without cross) product, Matrices for solving systems by elimination, Null space and column space.
  • Matrix transformations – Functions and linear transformations, Linear transformation examples, Transformations and matrix multiplication (matrix products are more relevant), Finding inverses and determinants.
  • It looks a lot, but the videos are typically very short. You can also select the topics to revise.

    For those who prefer the “abstract” flavour, you can search for the text Linear Algebra Done Right by Sheldon Axler. (The link is the link to the official website. The book is easily found online, but I would not place it here.) This text is probably more useful for Linear Algebra 2.

    My consultation hours are: Mon – Wed, 10am to 5pm. Please drop an email to arrange for consultation.

    Good luck for your examinations!

    Here is some feedback for those who submitted the midterm samples.

    There are some who attempted Q5 to Q7 (in Tutorial 6). I have also provided the solutions and feedback for these questions too.

    Question 1 and 5

    Solution: (Q1) Since the equation contains the term {x^2}, there are no values of {k} that make the equation linear. (Q5) Since the equation contains the term {xy}, there are no values of {\lambda} that makes the equation.

    Feedback: Unless otherwise specified, unknowns in an equation are given by {x}, {y} and {z}. For an equation to be linear, any term containing an unknown must be of the form (constant){\cdot}(unknown). Terms like {xy} and {x^2} are not of the required form and hence, the equation is not linear.

    Some mistakes:

    1. Writing “{k=0}” and “{k=\emptyset}” to mean “there are no values of {k}”. This is not the case. “{k=0}” means {k} can be {0}. “{k=\emptyset}” means {k} is a set which contains no element.

    2. There is a solution that states {k=0}, because {x^2-1=0} is in fact two straight lines. This is not correct. Prof Putinar mentioned that {y^2=x^2} is in some sense “linear”. Do not interpret this as saying that the equation {y^2=x^2} is linear. By definition, both {x^2-1=0} and {y^2=x^2} are not linear equations.

    Read the rest of this entry »

    SPMS Freshmen Survey

    Posted: October 2, 2013 in General

    Reposted from SPMS Student Welfare:

    Hi Year 1s! We would like to have your feedback and suggestions on SPMS Freshmen Orientation 2013. Please click here to access the survey! Appreciate the time taken! Thank you!

    SPMS Freshmen Survey