Professional Documents
Culture Documents
MAT538
APPLIED MATHEMATICS
Prepared by
Mohamad Najib Mohamad Fadzil
Universiti Teknologi MARA Perlis, Kampus Arau
Dr. Iskandar Shah Mohd Zawawi
Universiti Teknologi MARA Shah Alam, Selangor
Name:
Student ID:
Group:
Programme:
Semester:
Contents
1 Matrices 3
1.1 Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1 Size of a Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.2 Row Echelon form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.3 Reduced Row Echelon form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.4 Elementary Row Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.5 Rank of a Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.6 Transpose of a Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.7 Symmetry of a Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Operations on Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1 Equality of Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.2 Matrix Addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.3 Scalar Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.4 Matrix Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Inverse of a Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4 Solving System of Linear Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.1 Gaussian Elimination Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.2 Gauss-Jordan Elimination Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.3 Inverse Matrix Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 Application of Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2 Vectors 16
2.1 Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.1.1 Component Form, Magnitude and Direction of a Vector . . . . . . . . . . . . . . . 16
2.1.2 Unit Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2 Basic Operations on Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 Dot Product of Two Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.1 Properties of the Dot Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.2 Angle Between Two Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.3 Application of Dot Product: Vector Projection . . . . . . . . . . . . . . . . . . . . 20
2.4 Cross Product of Two Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4.1 Properties of Cross Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4.2 Application of Cross Product: Area of Parallelogram and Triangle . . . . . . . . . 22
2.5 Triple Scalar Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3 Partial Derivatives 25
3.1 Partial Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 Higher Partial Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 Chain Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.4 Implicit Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.5 Relative Maxima and Minima of Functions of Two Variables . . . . . . . . . . . . . . . . 29
4 Double Integrals 31
4.1 Double Integration Over Rectangular Region . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2 Double Integration Over General Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3 Double Integration in Polar Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Contents 2
6 Numerical Methods 39
6.1 Trapezoidal Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2 Simpson’s Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.3 Fourth Order Runge-Kutta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7 Fourier Series 43
7.1 Odd and Even Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.2 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Matrices
1.1 Matrix
A matrix (plural: matrices) is a rectangular array of elements arranged in an orderly fashion with rows
and columns. The element of the matrix is denoted as aij with the index i is to represent the i th row
and the index j is to represent the j th column. The following equation shows the definition of a matrix
A having M rows and N columns.
A = {aij ; i = 1, 2, . . . , M ; j = 1, 2, . . . , N }
a11 a22 · · · a1N
a21 a22 · · · a2N
= .
.. .. ..
.. . . .
aM 1 aM 2 ··· aM N
The following
are basic
types of a matrix.
a11 a12 a13 Square Matrix: A square matrix is a square array where the
a21 a22 a23 number of rows and columns are equal.
a31 a32 a33
0 0 0 Zero Matrix: All elements of a matrix are zero. It is also known
0 0 0 as null matrix.
0 0 0
a11 0 ··· 0
0 a22 ··· 0 Diagonal Matrix: A square matrix that has zero elements ev-
erywhere axcept on the major diagonal line.
.. .. .. ..
. . . .
0 0 ··· aM N
1 0 ··· 0
0 1 ··· 0 Identity Matrix: A square matrix that has zero elements ev-
erywhere except 1 on the major diagonal line. Identity matrix is
.. .. .. ..
. . . . denoted as I.
0 0 ··· 1
a11
a21
Column Matrix: A matrix that has only one column.
..
.
aM 1
a11 a12 ··· a1N Row Matrix: A matrix that has only one row.
Chapter 1. Matrices 4
a11 a12 ··· a1N
0 a22 ··· a2N Upper Triangular Matrix: A square matrix that has all zero
elements below the major diagonal line.
.. .. .. ..
. . . .
0 0 ··· aM N
a11 0 ··· 0
a21 a22 ··· 0 Lower Triangular Matrix: A square matrix that has all zero
elements upper the major diagonal line.
.. .. .. ..
. . . .
aM 1 aM 2 ··· aM N
Flash Tutorial
Write the following matrices into Row Echelon form.
3 1 2 3
2 3 1 4 3
(a) (b) 2 (c) (d) 5 4 7
1 4 2 8 6
1 1 1 2
1 1 2 3
1 32
1 4 3
Answer: (a) (b) 0 (c) (d) 0 1 43
0 1 0 0 0
0 0 0 1
Solution
Flash Tutorial
State the rank of the following matrices.
3 1 2 3
2 3 1 4 3
(a) (b) 2 (c) (d) 5 4 7
1 4 2 8 6
1 1 1 2
Answer:
Because the size of matrices are equal of 2 × 2 then a11 = 2, a12 = −1, a21 = −3 and a22 = 0.
3 7 5
2 1 5 9 =
2 5 3
Squaring a Matrix
Example 1.2.4. Find the product A2 if
3 −1
A=
1 2
Solution
Solution
12 1 4 0 −7 −10
Example 1.2.6. Given M = 0 −1 5. Find a matrix A such that 2AT − 3M = 8 5 −3 .
−2 0 9 10 4 −29
Solution
Flash Tutorial
6 4
1. If A = 2 1 and B = , if possible
2 11
AA−1 = In = A−1 A
then A−1 is called the inverse of A. The symbol A−1 is read ”A inverse”. A is a nonsingular matrix
if A−1 exists, otherwise, A is a singular matrix.
Example 1.3.1. Show that B is the inverse of A, where
−1 2 1 −2
A= and B =
−1 1 1 −1
Solution
Flash Tutorial
Show that B is the inverse matrix of A, where
2 −1 −1 −1
A= and B =
−3 1 −3 −2
2. If possible, row reduce A to I using elementary row operations on the entire matrix. The result
will be the matrix
.
h i
I .. A−1
If this is not possible, then A is a singular matrix.
3. Check your work by proving the definition AA−1 = I = A−1 A.
Example 1.3.2. Find the inverse of
1 −1 0
A = 1 0 −1
6 −2 −3
Solution
Example 1.3.3. Use the Gauss-Jordan elimination to determine the singularity of the matrix
3 2 4
A = 1 5 3
−1 8 2
Solution
a1 x + b1 y + c1 z = k1 ;
a2 x + b2 y + c2 z = k2 ;
a3 x + b3 y + c3 z = k3 .
The system can be written as an augmented matrix and coefficient matrix as follows
..
a1 b1 c1 . k1
a1 b1 c1
..
: augmented matrix a2 b2 c2 : coefficient matrix
a2 b2 c2 . k1
.
a3 b3 c3
a3 b3 c3 .. k3
a, b, c are coefficients of the system and k is constant of the system. The solution for the system can be
unique or exact, infinitely many or no solutions. The following are examples of a unique solution.
x+y+z = 0
3x + 5y + 4z = 5
3x + 6y + 5z = 2
Solution
Example 1.4.2. Use the Gauss-Jordan Elimination method to solve the system of equations in example
1.4.1.
Solution
x − y + 2z = 4
x+z = 6
2x − 3y + 5z = 4
3x + 2y − z = 1
Solution
2x + 4y − 2z = 0
3x + 5y = 1
Solution
Example 1.4.6. Determine the value(s) of k using Gaussian elimination method so that the system
x + y + kz = 1
x + ky + z = 1
kx + y + z = 1
Writing the augmented matrix from (1) and find the unknown variables X1 , X2 , X3 and X4 by using the
Gauss-Jordan Elimination method.
.. .. ..
5 0 −1 0 . 0 1 2 −2 −1 . 0 1 2 −2 −1 . 0
. . R2 −12R1 .
12 0 0 −2 .. 0 R1 ↔R3 12 0 0 −2 .. 0 −→ 0 −24 24 10 .. 0
R3 −5R1
.. .. .
1 2 −2 −1 . 0 5 0 −1 0 . 0 0 −10 9 5 .. 0
.. .. ..
1 1
1 2 −2 −1 . 0 1 0 0 − 6 . 0 1 0 0 − 6 . 0
1
24 R2
−→ 0 10
.. R1 −2R2
−→ 10
.. −R3
−→ 10
..
1 −1 − 24 . 0 R3 +10R2 0 1 −1 − 24 . 0
0 1 −1 − 24 . 0
.. .
.. 0 .
0 −10 9 5 . 0 0 0 −1 5
6 0 0 1 − 65 .. 0
..
1
1 0 0 − 6 . 0
−→ 0 1 0 − 15 ... 0
R2 +R3
12
.
0 0 1 − 5 .. 06
Example 1.5.2. In the following equation, how many moles of aluminium are needed to form 3.70 moles
of aluminium oxide, Al2O3?
4 Al + O2 2 Al2O3
Solution
First, we assume the balanced equation as follows
since X1 = X3 , then
2X3 = 3.70;
3.70
X3 = = X1
2
3.70
hence, 4X1 = 4 = 7.40moles.
2
Practice
1. Determine the type of the following matrices.
5
0 0 1 0 9
(a) (b) (c) 1 2 5 6 (d)
0 0 0 1 8
1
1 0 0 0
7 0 0 1 7
0 3
5 0 0 0
(e) 1 0
(f) 0(g) 1
0 4
0 3 0
2 3 0 0 0 1
0 0 0 5
ans: (a) zero/null (b) identity (c) row (d) column (e) lower triangular
(f) upper triangular (g) diagonal
2. Find the rank of the matrices.
1 2 3
1 0 2
1 2 3 2 3 5
(a) (b) 2 1 0 (c) ans: (a) 1 (b) 3 (c) 2
2 4 6 3 4 7
3 2 1
4 5 9
3. State whether the following
matrices are symmetry.
3 −5 0
0 2
(a) 2 4 (b) −5 1 0 (c)
1 −1
0 0 1
ans: (a) not symmetry (b) symmetry (c) not symmetry
4 x+2
4. Find x if A = is a symmetric matrix. ans: x = 5
2x − 3 x + 1
5. Given the matrices
3 1 2 3 1 1 3
1 2 4 7 1 3 4
A= B= C= D = 1 E = 5 6 1 F = 4 0 1
3 −4 8 9 5 6 1
6 0 1 6 3 1 2
Find (if possible)
Vectors
2.1 Vector
A vector which has magnitude and direction is a quantity to describe things in real life such as wind,
force, velocity and many more. In this section, we will study vector algebraically, in two dimensional
plane ℜ2 and three dimensional space ℜ3 .
y
−−→
From the diagram, the vector AB is represented by a
y1 B(x2 , y2 ) directed line segment that has initial point A(x1 , y1 ) and
−−→
terminal point B(x2 , y2 ). The magnitude of AB which is
−−→
denoted by |AB| is the length of directed line segment
−−→ u2 and also can be found by using the distance formula.
AB
A vector is also can be denoted by lowercase, boldface
−−→
letter such as u = AB or over-right-arrow letter such as
θ u1 −−→
y2 ⃗u = AB. A vector which is start at the origin is called
A(x1 , y1 ) a position vector.
x
x1 x2
(a) The magnitude (or length) of ⃗u is given by (b) The direction of ⃗u is given by
p u2
|⃗u| = (x2 − x1 )2 + (y2 − y2 )2 ; tan(θ) = ;
q u1
= u21 + u22 .
−1 u2
θ = tan .
u1
If | ⃗u |= 1, then ⃗u is a unit vector. The component form of ⃗u in ℜ3 is ⃗u = ⟨u1 , u2 , u3 ⟩ or in standard
basis form ⃗u = u1⃗i + u2⃗j + u3⃗k.
Example 2.1.1. Find the component form and magnitude of ⃗v that has initial point (4, −7) and the
terminal point (−1, 5). Hence, find the direction of the vector ⃗v .
Solution
Chapter 2. Vectors 17
Solution
Example 2.1.3. Given the vector ⃗a = 4⃗i − ⃗j + ⃗k. Compute a unit vector that is parallel and in the same
direction of ⃗a.
Solution
→
−
u The direction angles of a nonzero vector ⃗u = ⟨u1 , u2 , u3 ⟩ are the angles,
let say (θx , θy and θz ) that ⃗u makes with the positive x-,y- and z-axes,
θy respectively. The cosines of these direction angles, cos(θx ), cos(θy ) and
cos(θz ) are called the direction cosines of a vector ⃗u such that
θx
u1 u2 u3
x cos(θx ) = , cos(θy ) = , cos(θz ) = .
|⃗u| |⃗u| |⃗u|
θz
z
Example 2.1.4. Find the direction angles of the vector ⃗u = ⟨1, 2, −3⟩.
Solution
Example 2.2.1. Let ⃗u = ⟨2, 3⟩ and ⃗v = ⟨4, 6⟩. Find 2⃗u, ⃗u + ⃗v and ⃗u − 2⃗v .
Solution
√
2π 1 3
7. The unit vector that makes an angle θ = with the positive x-axis. ans − ,
3 2 2
3π 1 1
8. The unit vector that makes an angle θ = − with the positive x-axis. ans − √ , − √
4 2 2
9. The unit vector obtained by rotating the vector ⟨0, 1⟩, 120o counterclockwise about the origin. ans
√
3 1
− ,−
2 2
7
10. Find a vector of magnitude 7 in the direction of ⃗v = 12⃗i − 5⃗k. ans (12⃗i − 5⃗k)
13
1 1 1⃗
11. Find a vector of magnitude 3 in the opposite direction to the vector ⃗v = ⃗i − ⃗j − k.
2 2 2
−3
ans √ (⃗i − ⃗j − ⃗k)
3
1
12. Find the vector projection ⃗u onto ⃗v if ⃗u = ⟨2, 2⟩ and ⃗v = ⟨6, 1⟩. ans ⟨84, 14⟩
37
21 21 7
13. Find the vector projection ⃗b onto ⃗a if ⃗a = 3⃗i − 3⃗j + ⃗k and ⃗b = 2⃗i + 4⃗j − ⃗k. ans − + −
19 19 19
→
−
v ⃗u and ⃗v are orthogonal or perpendicular if
θ
⃗u.⃗v = 0.
x
Example 2.3.4. Let A(3, 2, −1), B(0, −1, 2) and C(−2, 3, 0) are points in three dimensional space . Find
−−→ −→
the angle between AB and AC.
Solution
Example 2.3.5. Are the vectors ⃗u = ⟨2, −3⟩ and ⃗v = ⟨6, 4⟩ orthogonal?
Solution
Example 2.3.6. Give two vectors ⃗u = (β 2 − 3)⃗i − ⃗j + (2β − 1)⃗k and ⃗v = ⃗i + (2β + 3)⃗j + β⃗k. Find the
values of β if ⃗u is perpendicular to ⃗v .
Solution
Example 2.3.7. Find the vector projection ⃗u = ⟨3, −5⟩ onto ⃗v = ⟨6, 2⟩.
Solution
Example 2.3.8. Find the vector projection of ⃗b = ⟨1, 1, 2⟩ onto ⃗a = ⟨−2, 3, 1⟩.
Solution
Practice
1. Find ⃗u · ⃗v .
(a) ⃗u = ⟨7, 1⟩, ⃗v = ⟨−3, 2⟩. (b) ⃗u = ⟨6, 10⟩, ⃗v = ⟨−2, 3⟩. (c) ⃗u = ⟨−4, 1⟩, ⃗v = ⟨2, −3⟩.
(d) ⃗u = 4⃗i − 2⃗j, ⃗v = ⃗i − ⃗j. (e) ⃗u = 3⃗i + 4⃗j, ⃗v = 7⃗i − 2⃗j. (f) ⃗u = 3⃗i + 2⃗j, ⃗v = −2⃗i − 3⃗j.
ans (a) −19, (b) 18, (c) −11, (d) 6, (e) 13, (f) −12
√
2. Use the dot product to find the magnitude of ⃗u = 20⃗i + 25⃗j. ans 5 41
3. Find the θ between the vectors.
(a) ⃗u = ⟨1, 0⟩, ⃗v = ⟨0, −2⟩. (b) ⃗u = 3⃗i + 4⃗j, ⃗v = −2⃗j. (c) ⃗u = 2⃗i − ⃗j, ⃗v = 6⃗i + 4⃗j.
ans (a) 90o , (b) 143o , (c) 60o
1 5
4. Determine whether ⃗u = ⟨−12, 30⟩ and ⃗v = ⟨ , − ⟩ are orthogonal? ans not orthogonal
2 4
5. Determine whether ⃗u = 2⃗i − 2⃗j and ⃗v = −⃗i − ⃗j are orthogonal? ans orthogonal
2 1 2
6. Find the direction cosines and direction angles of the vectors ⟨2, 1, 2⟩. ans , , : 48o , 71o , 48o
3 3 3
7. Find the direction cosines and direction angles of the vectors ⃗i − 2⃗j − 3⃗k.
1 −2 −3
ans √ , √ , √ : 74o , 122o , 143o
14 14 14
Example 2.4.1. Find ⃗u × ⃗v where ⃗u = 2⃗i − ⃗j + 3⃗k and ⃗v = 7⃗j − 4⃗k. Verify the answer.
Solution
Example 2.4.2. Find a nonzero vector that is orthogonal to both ⃗v = −2⃗i + 3⃗j − 7⃗k and w
⃗ = 5⃗i + 9⃗k.
Solution
Example 2.4.3. Given the vectors ⃗a = 4⃗i − ⃗j + ⃗k and ⃗b = 2⃗i + 4⃗j + 3⃗k. Compute a vector that is
perpendicular to both ⃗a and ⃗b.
Solution
⃗u × ⃗v = ⃗0 =⇒ |⃗u × ⃗v | = 0.
y y
→
− →
−
u
u
Ap At
θ → − θ →−
v
v x
x 1
Ap = |⃗u × ⃗v |. At = |⃗u × ⃗v |.
2
Example 2.4.4. Find the area of the triangle with vertices P (−2, 4, 5), Q(0, 7, −4) and R(−1, 5, 0).
Solution
The vectors are coplanar if the determinant is zero and by finding | (⃗u × ⃗v ) · w|
⃗ then we have the volume
of parallelepiped.
y
⃗u × ⃗v V = Ah;
w
⃗ height h = |⃗u × ⃗v ||w||
⃗ cos(θ)|;
(⃗u × ⃗v ) · w
⃗
θ ⃗u = |⃗u × ⃗v ||w|
⃗
|⃗u × ⃗v ||w|
⃗
;
base A
⃗v = | (⃗u × ⃗v ) · w|.
⃗
x
parallelepiped
Example 2.5.1. Consider three vectors ⃗a = ⟨1, 0, 6⟩, ⃗b = ⟨2, 3, −8⟩ and ⃗c = ⟨8, −5, 6⟩. Compute the
volume of parallelepipied determined by the vectors ⃗a, ⃗b and ⃗c.
Solution
Practice
1. State whether each expressions is scalar, vector or none of them.
(a) ⃗a · (⃗b × ⃗c) (b) ⃗a × (⃗b · ⃗c) (c) ⃗a × (⃗b × ⃗c) (d) ⃗a · (⃗b · ⃗c)
⃗ ⃗ ⃗ ⃗
(e) (⃗a · b) × (⃗c · d) (f) (⃗a × b) · (⃗a × b)
ans (a) scalar (b) none (c) vector (d) none (e) none (f) scalar
2. Find ⃗u × ⃗v for the following vectors.
(a) ⃗u = ⟨2, 3, 0⟩, ⃗v = ⟨1, 0, 5⟩ (b) ⃗u = ⟨4, 3, −2⟩, ⃗v = ⟨2, −1, 1⟩
(c) ⃗u = ⃗j − 4⃗k, ⃗v = −⃗i + 3⃗j + ⃗k (d) ⃗u = 3⃗i + 3⃗j − 3⃗k, ⃗v = 3⃗i − 3⃗j + 3⃗k
ans (a) ⟨15, −10, −3⟩, (b) ⟨1, −8, −10⟩, (c) 13⃗i + 4⃗j + ⃗k, (d) −18⃗j − 18⃗k
3. Find a vector that is orthogonal to both ⃗u and ⃗v for the following problems.
(a) ⃗u = 2⃗i + ⃗k and ⃗v = ⃗i − ⃗j − ⃗k (b) ⃗u = ⃗i + ⃗j + ⃗k and ⃗v = 3⃗i + 12⃗j − 4⃗k
ans (a) ⃗i + 3⃗j − 2⃗k, (b) −16⃗i + 7⃗j + 9⃗k
4. Find the area of the parallelogram determined by the following vectors.
(a) 3⃗i + 4⃗j and ⃗i + ⃗j − ⃗k (b) 2⃗i − ⃗j + 2⃗k and 4⃗i − 3⃗j
(c) 4⃗i − ⃗j + ⃗k and 2⃗i + 3⃗j − ⃗k (d) 2⃗i + 3⃗j + ⃗k and 2⃗j − 3⃗k
√ √ √ √
ans (a) 26 (b) 104 (c) 2 59 (d) 173
5. Find the area of parallelogram with vertices A(−3, 0), B(−1, 3), C(5, 2) and D(3, −1). ans 20
6. Find the area of ∆P QR in the following problems.
(a) P (0, 1, 1), Q(1, 1, 0) and R(1, 0, 1) (b) P (1, 0, 0), Q(2, 1, −1) and R(0, 1, −2)
(c) P (1, 2, 3), Q(2, 3, 1) and R(3, 1, 2) (d) P (−1, −1, −1), Q(1, −1, −1) and R(−1, 1, −1)
√ √ √
ans (a) 3/2 (b) 14/2 (c) 27/2 (d) 2
Partial Derivatives
∂f ∂f
(x0 , y0 ) = fx (x0 , y0 ), and (x0 , y0 ) = fy (x0 , y0 ).
∂x ∂y
In partial derivative, when we differentiate the function with respect to any of independent variable, other
independent variable(s) will be treated as constant(s).
∂f ∂f
Example 3.1.1. Find the value of and at the point (4, −5) if f (x, y) = x2 + 3xy + y − 1.
∂x ∂y
Solution
y
Example 3.1.2. Find fy if f (x, y) = y sin(xy) + (x + y)6 + .
y+1
Solution
Chapter 3. Partial Derivatives 26
Practice
Find all the first partial derivatives for the following functions
1. f (x, y) = 2x2 − 3y − 4. ans fx = 4x, fy = −3
1 x
2. f (x, y) = x/y. ans fx = , fy = − 2 .
y y
p x y
3. f (x, y) = x2 + y 2 . ans fx = p , fy = p .
x2 + y 2 x2 + y 2
exy
4. f (x, y) = exy ln(y). ans fx = yexy ln(y), fy = + xexy ln(y).
y
2y − x
5. f (x, y) = , (−1, 1). ans fx = −4, fy = −1.
x+y+1
∂2z ∂2f
∂ ∂f
= (x, y) = (x, y) = [fy (x, y)]y = fyy (x, y).
∂y 2 ∂y 2 ∂y ∂y
∂2z ∂2f
∂ ∂f
= (x, y) = (x, y) = [fx (x, y)]y = fxy (x, y).
∂y∂x ∂y∂x ∂y ∂x
Example 3.2.1. Find fxx , fyy , fxy and fyx for f (x, y) = x3 + x2 y 3 − 2y 2 .
Solution
Example 3.2.2. If f (x, y) = ex cos(y), verify that fxy = fyx . (Jun 2018-3 marks)
Solution
dz
Example 3.3.1. If z = x2 y + 3xy 4 , where x = sin(2t) and y = cos(t), find when t = 0.
dt
Solution
Suppose that z = f (x, y) is a differentiable function of x and y, where x = g(s, t) and y = h(s, t) are
differentiable functions of s and t, then
∂z ∂z ∂x ∂z ∂y ∂z ∂z ∂x ∂z ∂y
= + , = + .
∂s ∂x ∂s ∂y ∂s ∂t ∂x ∂t ∂y ∂t
∂z
Example 3.3.2. If z = ex ln(y), where x = st2 and y = s2 t. Find and ∂z/∂t.
∂s
Solution
∂z 2
Example 3.3.3. If z = ln(x2 + y 2 ), x = r cos(t) and y = r sin(t). Show that = .
∂r r
Solution
Practice
dz ∂z ∂z
Use the Chain Rule to find , and .
dt ∂s ∂t
1. z(x, y) = xy − x y, x = t + 1, y = t2 − 1
3 2 2
dz
ans = 2t(y 3 − 2xy + 3xy 2 − x2 )
dt √
2. z(x, y) = sin(x) cos(y), x = t, y = 1t
dz 1 1
ans = √ cos(x) cos(y) + 2 sin(x) sin(y)
dt 2 t t
3. z(x, y) = (x − y)5 , x = s2 t, y = st2
∂z ∂z
ans = 5(x − y)4 (2st − t2 ), = 5(x − y)4 (s2 − 2st).
∂s ∂t
4. z(x, y) = ln(3x + 2y), x = s sin(t), y = t cos(s)
∂z 3 sin(t) − 2t sin(s) ∂z 3s cos(t) + 2 cos(s)
ans = , = .
∂s 3x + 2y ∂t 3x + 2y
Alternatively, we can use Implicit Function Theorem to do the differentiation. The theorem state
that if z = f (x, y) is differentiable and F (x, y, z) = 0 then
∂z ∂F ∂F Fx ∂z ∂F ∂F Fy
zx = =− / =− , zy = =− / =− .
∂x ∂x ∂z Fz ∂y ∂y ∂z Fz
∂z ∂z
Example 3.4.2. Use Implicit Function Theorem to find and for the equation in example 3.4.1.
∂x ∂y
Solution
∂z
Example 3.4.3. If e1+z + xy 2 + z = 1, find .
∂x
Solution
Practice Let z = f (x, y). Use ordinary implicit differentiation and Implicit Function Theorem to find
∂z/∂x and ∂z/∂y for the following implicit equations
x −2y
1. x2 + 2y 2 + 3z 2 = 1. ans zx = − , zy = .
yz 3z xz 3z
z
2. e = xyz. ans zx = x , zy = z .
e − xy e − xy
1 + ln(x) −z
3. yz + x ln x = z 2 . ans zx = − , zy = .
y − 2z y − 2z
e cos(x) − 6(y + z)(xz + xy)5
x
y
e sin(x) − 6x(xz + xy)5
y 6
4. e sin(x) = (xz + xy) . ans zx = , zy = .
6x(xz + xy)5 6x(xz + xy)5
Practice Find all the second partial derivatives.
1. f (x, y) = x + y + xy.
ans fx = 1 + y, fxx = 0, fy = 1 + x, fyy = 0, fxy = 1, fyx = 1.
2. g(x, y) = x2 y + cos(y) + y sin(x).
ans gx = 2xy + y cos(x), gxx = 2y − y sin(x),
gy = x2 − sin(y) + sin(x), gyy = − cos(y), gxy = 2x + cos(x), gyx = 2x + cos(x).
3. r(x, y) = ln(x + y).
1 1 1 1 1 1
ans rx = , rxx = − , ry = , ryy = − , rxy = − , ryx = − .
x+y (x + y)2 x+y (x + y)2 (x + y)2 (x + y)2
4. w(x, y) = x sin(xy).
ans wx = xy cos(xy) + sin(xy), wxx = −xy 2 sin(xy) + 2y cos(xy), wy = x2 cos(xy),
wyy = −x3 sin(xy), wxy = −x2 y sin(xy) + 2x cos(xy), wyx = −x2 y sin(xy) + 2x cos(xy)..
then
(a) f has a local maximum at (a, b) if fxx < 0 and D > 0 at (a, b).
(b) f has a local minimum at (a, b) if fxx > 0 and D > 0 at (a, b).
(c) f has a saddle point at (a, b) if D < 0.
(d) The test in inconclusive if D = 0.
f (x, y) = xy − x2 − y 2 − 2x − 2y + 4.
Solution
Example 3.5.2. Find all the critical points of the function f (x, y) = x3 + y 3 + 3x2 − 3y 2 − 8 and classify
each as relative maxima, relative minima and saddle point.
Solution
Practice
Find the local maximum, minimum or saddle point(s) of the functions.
1. f (x, y) = 9 − 2x + 4y − x2 − 4y 2 . ans max −1, 21
2. f (x, y) = y 3 + 3x2 y − 6x2 − 6y 2 + 2.
ans max(0,0), min
(0,4), saddle
(2,2), saddle (-2,2)
1 1 1 1
3. f (x, y) = x2 + y 4 + 2xy. ans min √ , − √ , min − √ , √ , saddle (0,0).
2 2 2 2
4. f (x, y) = x3 − 3x + 3xy 2 . ans max (-1,0), min (1,0), saddle (0,1), saddle (0,-1).
Double Integrals
Solution
ZZ
Example 4.1.2. Evaluate y sin(xy) dA where R = [1, 2] × [0, π].
R
Solution
ZZ
Example 4.1.3. Evaluate the double integral (x − 3y 2 ) dA where R = {(x, y) | 0 ⩽ x ⩽ 2 1 ⩽ y ⩽ 2}.
R
Solution
Chapter 4. Double Integrals 32
Exercise
CalculateZtheZfollowing integrals.
4 2 Z 1 Z 2
1. (6x2 y − 2x) dydx ans: 222 2. (x + e−y ) dxdy ans: 2.5 − e−1
Z1 4 Z0 2 Z0 1 Z1 2
1. (6x2 y − 2x) dydx ans: 222 2. (x + e−y ) dxdy ans: 2.5 − e−1
1 0 0 1
In example 4.2.1, it is hard to integrate the function by respecting to the x, but it seems to be easy for
y. So, reversing or switching the integration combination order, from dxdy to dydx would be the best
way to avoid the tedious calculation.
ZZ
Example 4.2.2. Evaluate (x + 2y) dA where R is the region bounded by y = 2x2 and y = 1 + x2 .
R
Solution
Practice
Calculate the following integrals.
Z 5Z x
868
1. (8x − 2y) dydx ans:
1 0 3
Z 1Z y
3 1
2. (xey ) dxdy ans: (e − 1)
0 0 6
Solution
Z 1 Z √1−y2
Example 4.3.2. Use polar coordinate to evaluate xy 2 dxdy.
0 0
Solution
Practice
ZZ
1. Evaluate x2 y dA, where R is the top half of the disk with center the origin and radius 5. (ans:
R
1250/3)
√
Z 1 Z 1−x2 p
2. Use polar coordinate to evaluate x2 + y 2 dydx.(ans: π/6)
0 0
Example 5.1.1. Find the volume of the solid that lies under the paraboloid z = x2 + y 2 and above the
region R in the xy-plane bounded by the line y = 2x and the parabola y = x2 .
Solution
Chapter 5. Applications of Double Integrals 36
Practice
1. Find the volume under the plane 3x + 2y − z = 0 and above the region anclosed by the parabolas
y = x2 and x = y 2 . ans: 3/4
2. Find the volume under the surface z = xy and above the triangle with vertices (1, 1), (4, 1) and
(1, 2). ans: 31/8
Example 5.2.1. Find the mass and center of mass of a triangular lamina with vertices (0, 0), (1, 0) and
(0, 2) if the density function is ρ(x, y) = 1 + 3x + y.
Solution
In the special case of homogeneous lamina, the center of mass is the centroid of the region R of
a lamina in which ρ(x, y) = 1. Therefore,
ZZ ZZ
1 1
x̄ = x dA ȳ = y dA.
m m
R R
Example 5.2.2. Consider a thin lamina bounded by a closd region R as shown in figure below. Find
the centroid if its mass, m = 0.39.
y
y=2
R
y = ex
(0, 1)
Solution
Practice
1. Find the mass and center of mass of a lamina if the density is ρ(x, y) = x + y and is bounded by
√
13 190 6
the x-axis, the line x = 1 and the curve y = x. (ans: m = , center of mass , )
20 273 13
2. A lamina with a constant density k bounded by the parabola
y = 3x2 and the line y = 3 has a
8k
mass of 4k. Find the center of mass of the lamina. (ans: 0, )
5
Example 5.3.1. Find the surface area of the part of the surface z = x2 +2y that lies above the triangular
region R in the xy-plane with vertices (0, 0), (1, 0) and (1, 1).
Solution
Example 5.3.2. Find the surface area of the cylinder z = 9 − y 2 that is above the triangle bounded by
the lines y = x, y = −x and y = 3.
Solution
Practice
√ the area of surface of 5x + 3y − z + 6 = 0 that lies above the rectangle [1, 4] × [2, 6]. (ans:
1. Find
12 35)
√
2. Find the surface area if the part of the plane 3x + 2y + z = 6 lies in the first octant. (ans: 3 14)
p
3. Find the area of the surface z = 4x2 + 4y 2 that lies
√ above the region in the first quadrant bounded
by the parabola y = x2 and the line y = x. (ans: 5/6)
Numerical Methods
b−a
where h = and n is the subintervals of equal length [a, b] .
n
Z 2
1
Example 6.1.1. Use the Trapezoidal Rule with n = 5 to approximate the integral dx.
1 x
Solution
Z 2
1
Example 6.2.1. Use the Simpson’s Rule with n = 10 to approximate the integral dx.
1 x
Solution
Z 5
cos(2x)
Example 6.2.2. Evaluate dx with 8 subintervals by using the Trapezoidal Rule and Simp-
1 x
son’s Rule. Give the answer correct to four decimal places.
Solution
Practice
Use the Trapezoidal Rule and Simpson’s Rule to approximate the given integral with the specific value
of n. (Round down the answer to four decimal places)
Z 2 Z 4
1. xdx, n = 4. 2. (x + 1)dx, n = 6.
1 0
Z 2 p Z 4
3. x3 − 1dx, n = 10. 4. ln(x)dx, n = 6.
1 1
4 4
√
Z Z
5. x3 sin(x)dx, n = 8. 6. y cos(y)dy, n = 8.
0 0
1 4
x2
Z Z
7. dx, n = 10. 8. ln(1 + ex )dx, n = 8.
0 1 + x4 0
dy
Example 6.3.2. Consider the differential equation = sin(x + y) with initial condition y(0) = 2 and
dx
stepsize h = 0.1. If x10 = 1.0 and y10 = y(0.1) = 2.3375, estimate the value of y11 = y(1.1) using the
Runge-Kutta Fourth order method. Give the answer to four decimal places.
Solution
Practice
dy sin(x) − xy 2
1. If = and y(0) = 5, use the Fourth-Order Runge-Kutta method with a step size
dx 3
h = 0.3 to approximate y when x = 0.3. Give the answer correct to 5 decimal places. (ans: 4.66485)
2. In a chemical reaction, the amount y grams of a substance after t hours is modeled
dy
= e−2t − 2y, y(0) = 0.
dt
Use the Fourth-Order Runge-Kutta method with the step size h = 2 to estimate y(2). (ans: -3.4802)
3. Consider the differential equation y ′ = sin(x + y) with initial condition y(0) = 2 and step size
h = 0.1. If x10 = 1 and y10 = 2.3375, estimate the value of y11 = y(1.1) by using the Fourth-Order
Runge-Kutta method. Give the answer correct to four decimal places. (ans: 2.3142)
Fourier Series
This chapter provides an introduction of odd and even functions. Then we will learn how to obtain the
Fourier series of periodic functions.
(ii) A fucntion y = f (x) is odd when for each x in the domain of f such that f (−x) = −f (x).
Example 7.1.1. √
Determine whether the given function is even, odd or neither.
(a) f (x) = 2 + x2 (b) g(x) = x1/3 − sin(x) (c) k(x) = e2x
Solution
2x
Example 7.1.2. State whether the function f (x) = 2 − is even, odd or neither even nor odd.
π
Solution
Chapter 7. Fourier Series 44
Example 7.2.1. Compute the Fourier series for f (x) = x, 0 < x < π.
Solution
Example 7.2.2. Let f (x) be a periodic function with period 2π. Find the Fourier series expansion for
f (x) until the first three non-zero terms.
0, −π < x < 0,
f (x) =
π − x, 0 < x < π.
Solution
Example 7.2.3. Sketch the periodic extension of f (x) = x in Example 7.2.1 for −π < x < 2π.
Solution
Practice
1. Find the Fourier series for the function
0, −π < x < 0,
f (x) =
1, 0 ≤ x < π.
∞
1 1 X 1 − cos(nπ)
ans:f (x) = + sin(nx)
2 π n=1 n
3. Find the Fourier series for the function f (x) = x + π, −π < x < π.
∞
X − cos(nπ)
ans:f (x) = π + 2 sin(nx)
n=1
n