You are on page 1of 47

LECTURE NOTE

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

5 Applications of Double Integrals 35


5.1 Area of the Plane Region and Volume of the Solid . . . . . . . . . . . . . . . . . . . . . . 35
5.2 Moment and Center of Mass of a Lamina . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.3 Surface Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

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

Prepared by Najib and Iskandar


Chapter 1

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

1.1.1 Size of a Matrix


The size (or order) of a matrix is denoted as M × N (read ”M by N”), where M is the number of rows
and N is the number of columns.
Example 1.1.1. What is the size (or order) of the following matrices.
 
  1
  3 1 4 0
2 1   2
(a) (b) 4 9 8 0 (c) 1 2 4 0 (d)  
6 3 7
0 3 7 2
9
Solution
(a) 2 × 2 (b) 3×4 (c) 1×4 (d) 4×1

1.1.2 Row Echelon form


A matrix is said to be in Row Echelon form if the matrix meets the following criteria:
(i) the first non-zeros element, the leading entry, in each row is 1 and all elements below the leading 1
are zero.
(ii) the leading 1 in any row occurs to the right of any leading 1 above.
(iii) rows of all zeros are at the bottom of a matrix.
   
    1 1 −3 5 1 1 −3 6
1 2 1 2 4 −3 1
(a) (b) (c) 0 1 −1 15 (d) 0 1 2 0
0 1 0 0 0 1 6
0 0 1 12 0 0 0 0

1.1.3 Reduced Row Echelon form


A matrix is said to be in Reduced Row Echelon form if the matrix meets the following criteria:
(i) the matrix satisfies the criteria for a Row Echelon form.
(ii) the leading entry in each row is the only non-zero entry in its column.
 
  1 2 0 0  
1 2 0 0 0 1 0 0 2
0 1 0 
(a) 0 0 1 0 (b)  0 (c) 0 1 0 1
0 0 1
0 0 0 1 0 0 1 4
0 0 0 0

1.1.4 Elementary Row Operations


Elementary Row Operations (ERO) are operations that can be used to write a matrix into a new row-
equivalent matrix as in Row Echelon form or Reduced Row Echelon form. The operations are as follows.

(a) Interchange rows of the original matrix.


   
0 1 3 1 8 −4
1 8 −4 −→ 0 1 3
4 7 6 4 7 6

Prepared by Najib and Iskandar


Chapter 1. Matrices 5

(b) Multiply a row of the original matrix by a nonzero constant.


   
0 1 3 1R 0 1 3
2 3
1 8 −4 −→ 1 8 −4
4 7 6 2 72 3

(c) Add a multiple of a row to another row.


   
1 8 −4 1 8 −4
−2R1
2 1 5  R2−→ 0 −15 13 
4 7 6 4 7 6
 
1 −2 3
Example 1.1.2. Write −1 3 0 into Row Echelon form by using the ERO.
2 −5 5
Solution

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

1.1.5 Rank of a Matrix


Rank of a matrix is a maximum number of a linearly independent column vectors or linearly independent
row vectors in a matrix. For simple understanding, we can find the rank of a matrix by transforming
the matrix into row echelon form by applying the elementary row operations (ERO) . The number of
non-zero row(s) is the rank of the matrix.
Example 1.1.3. Find rank of the matrix A, rank(A)
 
3 2 4
A =  1 5 3
−1 8 2
Solution

Example 1.1.4. Find the value of k if the rank of M is 2.


 
−2 1 4
M =  0 −1 5
−2 0 k

Prepared by Najib and Iskandar


Chapter 1. Matrices 6

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:

1.1.6 Transpose of a Matrix


The transpose of a matrix is an operator which flips a matrix over its diagonal by switching the row and
column indices of the matrix. The transpose of A is denoted as AT .
 
2 1 5
A = 6 3 7 then AT =
3 9 10

1.1.7 Symmetry of a Matrix


A matrix is said to be symmetry if a square matrix is equal to its transpose such that [aij ] = [aij ]T and
is said to be a skew-symmetry if the matrix is equal to its negative transpose such that [aij ] = −[aij ]T .
   
1 7 3 1 7 3
A = 7 4 −5 and AT = 7 4 −5 : A = AT (symmetry)
3 −5 6  3 −5 6 
0 2 −1 0 −2 1
B = −2 0 −4 and −B T = −  2 0 4 : B = −B T (skew-symmetry)
1 4 0 −1 −4 0

1.2 Operations on Matrices


In this section, we will discuss the equality, addition and scalar multiplication of matrices.

1.2.1 Equality of Matrices


Two matrices A = [aij ] and B = [bij ] are equal when they have the same order.
Example 1.2.1. Solve for a11 , a12 , a21 and a22 for the following matrix equation.
   
a11 a12 2 −1
=
a21 a22 −3 0

Because the size of matrices are equal of 2 × 2 then a11 = 2, a12 = −1, a21 = −3 and a22 = 0.

Prepared by Najib and Iskandar


Chapter 1. Matrices 7

1.2.2 Matrix Addition


If A = [aij ] and B = [bij ] are matrices of order m × n, then their sum is the m × n matrix given by
A + B = [aij + bij ] .
The sum of two matrices of different orders is undefined.
Example 1.2.2. Find the sum of A and B.
   
3 7 5 2 −1 1
A = 1 5 9 and B = −3 0 6
2 5 3 8 7 5
Solution

1.2.3 Scalar Multiplication


If A = [aij ] is an m × n and c is a scalar, then the scalar multiple of A by c is the m × n given by
cA = [caij ] .

 
3 7 5
2 1 5 9 =
2 5 3

1.2.4 Matrix Multiplication


If A = [aij ] is an m × n matrix and B = [bij ] is a n × p matrix, then the product A × B is an n × p matrix
such as
AB = [cij ] .
where cij = ai1 b1j + ai2 b2j + . . . ain bnj .
Example 1.2.3. Find the product AB if
 
−1 3  
−3 2
A= 4 −2 , B =
−4 1
5 0
Solution

Squaring a Matrix
Example 1.2.4. Find the product A2 if
 
3 −1
A=
1 2
Solution

Prepared by Najib and Iskandar


Chapter 1. Matrices 8

Solving Matrix Equation


Example 1.2.5. Solve for X in the equation 3X + A = B if
   
1 −2 −3 4
A= ,B =
0 3 2 1

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

(a) find AB and A2 .


(b) solve X − 2B = 0.
     
2 −1 3 6 −4 0 2
2. Consider the following matrices: A =  0 1 4 , B = 0 0  and C = 5 4 . Compute
−2 3 1 2 3 1 −1
2 T
A − BC .
 
  6 −8 −5
  12 8
Answer: 1(a). AB= 14 19 1(b). X= 2.  −8 13 8
4 22
−12 −14 8

Prepared by Najib and Iskandar


Chapter 1. Matrices 9

1.3 Inverse of a Matrix


Let A be an n × n matrix and let In be the n × n identity matrix. If there exists a matrix A−1 such that

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

Finding Inverse of a Matrix


Let A be a square matrix of order n × n.
1. Write the n × n matrix that consists of the given matrix A on the left and the n × n identity matrix
I on the right to obtain
.
h i
A .. I

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

Prepared by Najib and Iskandar


Chapter 1. Matrices 10

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

1.4 Solving System of Linear Equations


In this section, we will discuss the way to solve system of linear equations as a matrix. A matrix which is
derived from a system of linear equations is known as augmented matrix and an array of coefficients
of linear equations is known as coefficient matrix. Let say we have a system of linear equations

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.

1.4.1 Gaussian Elimination Method


Gaussian Elimination which is also known as Gauss Elimination with Back Substitution is a method
to solve linear equations by writing the coefficient parts into Row Echelon form.
Example 1.4.1. Use the Gaussian Elimination method to solve the system of equations

x+y+z = 0
3x + 5y + 4z = 5
3x + 6y + 5z = 2

Prepared by Najib and Iskandar


Chapter 1. Matrices 11

Solution

1.4.2 Gauss-Jordan Elimination Method


In this method, the coefficient parts will be written to Reduced Row Echelon form.

Example 1.4.2. Use the Gauss-Jordan Elimination method to solve the system of equations in example
1.4.1.
Solution

Prepared by Najib and Iskandar


Chapter 1. Matrices 12

1.4.3 Inverse Matrix Method


If A is an invertible matrix, the system of linear equations represented by AX = B has a unique solution
given by X = A−1 B.
Example 1.4.3. Use the inverse matrix method to solve the system of equations in example 1.4.1.
Solution

Example 1.4.4. (no solution) Solve the system of linear equations

x − y + 2z = 4
x+z = 6
2x − 3y + 5z = 4
3x + 2y − z = 1

Solution

Prepared by Najib and Iskandar


Chapter 1. Matrices 13

Example 1.4.5. (many solutions) Solve the system of linear equations

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

(i) has infinitely many solutions.


(ii) is inconsistent.
Solution

Prepared by Najib and Iskandar


Chapter 1. Matrices 14

1.5 Application of Matrix


In this section, we will study the applications of matrix in various fields such as in chemical balancing
problem.
Example 1.5.1. Balance the following equation

C5H12O + O2 CO2 + H2O


Solution
Assume the equation as follows

(C5H12O)X1 + (O2)X2 − (CO2)X3 − (H2O)X4 = 0. (1.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

with the back substitution


1 15 5
X1 − X4 = 0; X2 − X4 = 0; X3 − X4 = 0;
6 12 6
1 15 5
X1 = X4 . X2 = X4 . X3 = X4 .
6 12 6
In this situation, X4 is a free variable. Assume X4 = 12 then X1 = 2, X2 = 15 and X3 = 10. Therefore,
the balanced equation is
2 C5H12O + 15 O2 10 CO2 + 12 H2O

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

(4 Al)X1 + (3 O2)X2 − (2 Al2O3)X3 = 0. (1.2)


then,
.. ..
   
4 0 −4 . 0 14 R1 1 0 −1 . 0
.. −→ ..
1
0 6 −6 . 0 6 R2 0 1 −1 . 0

with the back substitution


X2 − X3 = 0; X1 − X3 = 0;
X2 = X3 X1 = X3 ;

Prepared by Najib and Iskandar


Chapter 1. Matrices 15

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)

(a) 2A + B T (b) A + D (c) BC (d) CD (e) AD


(f) A2 (g) ED (h) DT F
     
6 12 39 54 23 30
(a) (b) not possible (c) (d) (e) not possible
13 1   53 78 41 27
ans:   23
7 −6 27
 
(f) (g) (h) 25 9 22
−9 22
37
6. Show that B is the inverse of A.    
    2 −17 11 1 1 2
2 1 3 −1
(a) A = B= (b) A = −1 11 −7 B = 2 4 −3
5 3 −5 2
0 3 −2 3 6 −5
7. Use matrices to solve the system of linear equations (if possible). Use Gaussian elimination, Gauss-
Jordan elimination and inverse methods.
(c) 2x + y + 2z = 4
(a) 5x + 4y = 2; (b) − x + 2y = 3
2x + 2y = 5
−x + y = −22 2x − 4y = 6
2x − y + 6z = 2

ans: (a) x = 10, y = −12 (b) inconsistent (c) x = −2a + 23 , y = 2a + 1, z = a

Prepared by Najib and Iskandar


Chapter 2

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

2.1.1 Component Form, Magnitude and Direction of a Vector


The component form of a vector with initial point A(x1 , y1 ) and terminal point B(x2 , y2 ) is given by
−−→
AB = ⟨x2 − x1 , y2 − y1 ⟩ = ⟨u1 , u2 ⟩ = u1⃗i + u2⃗j = ⃗u.
| {z }
standard basis form

(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

2.1.2 Unit Vector


An unit vector is a vector which has the magnitude of 1. Let m ⃗ be a unit vector which is in direction to
vector ⃗u, then  
⃗u 1
m
⃗ = = ⃗u.
|⃗u| |⃗u|
 
⃗u 1
⃗ =−
For the opposite direction, m =− ⃗u.
|⃗u| |⃗u|
Example 2.1.2. Find a unit vector in the direction of ⃗u = ⟨2, 5⟩ and verify that the result has a
magnitude of 1.

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

Direction Cosines and Direction Angles


y



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

Prepared by Najib and Iskandar


Chapter 2. Vectors 18

2.2 Basic Operations on Vectors


In this part, we will discuss the definitions of addition and multiplication of vectors and the related
properties.

Definitions of vector addition and scalar multiplication


Let ⃗u = ⟨u1 , u2 ⟩ and ⃗v = ⟨v1 , v2 ⟩ be vectors and let k be the scalar (real number), then the sum of ⃗u and
⃗v is a vector
⃗u + ⃗v = ⟨u1 , u2 ⟩ + ⟨v1 , v2 ⟩ = ⟨u1 + v1 , u2 + v2 ⟩;
and the scalar multiple of k times ⃗u is a vector

k⃗u = k⟨u1 , u2 ⟩ = ⟨ku1 , ku2 ⟩.

Example 2.2.1. Let ⃗u = ⟨2, 3⟩ and ⃗v = ⟨4, 6⟩. Find 2⃗u, ⃗u + ⃗v and ⃗u − 2⃗v .
Solution

Let ⃗u, ⃗v and w


⃗ be vectors and let c and d be scalars, then the properties of vector additional and
scalar multiplication are as follows
1. ⃗u + ⃗v = ⃗v + ⃗u 2. (⃗u + ⃗v ) + w
⃗ = ⃗u + (⃗v + w)
⃗ 3. ⃗u + ⃗0 = ⃗u
4. ⃗ = ⃗0
⃗u + −u) 5. c(d⃗u) = (cd)⃗u 6. (c + d)⃗u = c⃗u + d⃗u
7. c(⃗u + ⃗v ) = c⃗u + c⃗v 8. 1(⃗u) = ⃗u, 0(⃗u) = ⃗0 9. |c⃗u| = |c||⃗u|
Practice
−−→
1. Find P Q where P = (1, 3) and Q = (2, −1). ans ⟨1, −4⟩
2. The vector from the point A = (2, 3) to the origin. ans ⟨−2, −3⟩
−−→
3. The vector OP where O is the origin and P is the midpoint of segment RS where R = (2, −1) and
S = (−4, 3). ans ⟨−1, 1⟩
−−→ −−→
4. The sum of AB and CD, where A = (1, −1), B(2, 0), C(−1, 3) and D(−2, 2). ans ⟨0, 0⟩
5. If ⃗u = ⟨3, −2⟩ and ⃗v = ⟨−2, 5⟩, Find the component form, magnitude and direction of vector for
the following problems.

(a) 3⃗u ans ⟨9, −6⟩, (9⃗i − 6⃗j),
√ 117,o 326
o

(b) ⃗u + ⃗v ans ⟨1, 3⟩, (⃗i + 3⃗j), 10, 72√


(c) 2⃗u − 3⃗v ans ⟨12, −19⟩, (12⃗i − 19⃗j),√ 505, 302
o

(d) ⃗v − 2⃗u ans ⟨−8, 9⟩, (−8⃗i + 9⃗j), 145, 132 o

6. Find a unit vector in the direction of the given vector.


⃗i 2⃗j
(a) ⃗u = ⟨3, 0⟩ ans ⟨1, 0⟩ (b) ⃗ = ⃗i − 2⃗j
w ans √ − √
5 5

Prepared by Najib and Iskandar


Chapter 2. Vectors 19

√  
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

2.3 Dot Product of Two Vectors


The third vector operation is the dot product or also known as inner product or scalar product. The dot
product yields scalar. For the definition, let ⃗u = ⟨u1 , u2 ⟩ and ⃗v = ⟨v1 , v2 ⟩, the dot product of vectors ⃗u
and ⃗v is
⃗u · ⃗v = u1 v1 + u2 v2 .
Example 2.3.1. Find ⃗u · ⃗v if
(a) ⃗u = ⟨2, 3⟩ and ⃗v = ⟨4, 6⟩, (b) ⃗u = 3⃗i + 4⃗j + 6⃗k and ⃗v = 2⃗i + 6⃗j.
Solution

2.3.1 Properties of the Dot Product


Let ⃗u, ⃗v and w⃗ are vectors in the plane or in space and let c be a scalar.
1. ⃗u · ⃗v = ⃗v · ⃗u 2. (⃗0 · ⃗v ) = 0 3. ⃗u · (⃗v + w)
⃗ = ⃗u · ⃗v + ⃗u · w

4. ⃗u · ⃗u = |⃗u|2 5. c(⃗u · ⃗v ) = c⃗u · ⃗v = ⃗u · c⃗v
Example 2.3.2. Use the properties of dot product to find the magnitude of ⃗u = ⟨−3, 1⟩.
Solution

2.3.2 Angle Between Two Vectors


y
If θ is the angle between two nonzero vectors ⃗u and ⃗v ,
then
⃗u.⃗v
cos(θ) = ;
|⃗u||⃗v |
 
−1 ⃗u.⃗v


u θ = cos .
|⃗u||⃗v |



v ⃗u and ⃗v are orthogonal or perpendicular if
θ
⃗u.⃗v = 0.
x

Prepared by Najib and Iskandar


Chapter 2. Vectors 20

Example 2.3.3. Find the θ between ⃗u = ⟨4, 3⟩ and ⃗u = ⟨3, 5⟩.


Solution

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

2.3.3 Application of Dot Product: Vector Projection


Let ⃗u and ⃗v be nonzero vectors. The vector projection
of ⃗u onto ⃗v is


 
u ⃗u · ⃗v ⃗v
proj⃗v ⃗u = ;
|⃗v | |⃗v |
 
⃗u · ⃗v
= ⃗v .
proj⃗v ⃗u ⃗v |⃗v |2

Example 2.3.7. Find the vector projection ⃗u = ⟨3, −5⟩ onto ⃗v = ⟨6, 2⟩.

Solution

Prepared by Najib and Iskandar


Chapter 2. Vectors 21

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

2.4 Cross Product of Two Vectors


The other type of vector multiplication is cross product or also known as outer product. We only discuss
this method in ℜ3 and the definition as follows
If ⃗u = a1⃗i + a2⃗j + a3⃗k and ⃗v = b1⃗i + b2⃗j + b3⃗k then the cross product,
⃗u × ⃗v written as ⃗u × ⃗v is a vector
⃗i ⃗j ⃗k


⃗u × ⃗v = a1 a2 a3
b1 b2 b3

⃗v a2 a3 a1 a3 a1 a2
= ⃗
i− ⃗
j+ ⃗k
⃗u b2 b3 b1 b3 b1 b2
= (a2 b3 − a3 b2 )⃗i − (a1 b3 − a3 b1 )⃗j + (a1 b2 − a2 b1 )⃗k.
Note that, ⃗u × ⃗v is perpendicular to both ⃗u and ⃗v , and
⃗i ⃗j ⃗k ⃗i ⃗j ⃗k


⃗u × ⃗v = a1 a2 a3 = − b1 b2 b3 = −(⃗v × ⃗u) opposite direction.
b1 b2 b3 a1 a2 a3

Example 2.4.1. Find ⃗u × ⃗v where ⃗u = 2⃗i − ⃗j + 3⃗k and ⃗v = 7⃗j − 4⃗k. Verify the answer.
Solution

Prepared by Najib and Iskandar


Chapter 2. Vectors 22

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

2.4.1 Properties of Cross Product


⃗ are vectors in ℜ3 and s and t are scalars, then
Let ⃗u, ⃗v and w
1. s⃗v × tw⃗ = st(⃗v × w)
⃗ 2. ⃗v × w⃗ = −(w ⃗ × ⃗v ) 3. ⃗v × ⃗0 = ⃗0 × ⃗v = ⃗0
4. ⃗u × (⃗v × w)
⃗ = (⃗u × ⃗v ) + (⃗u × w)
⃗ 5. (⃗u + ⃗v ) × w
⃗ = (⃗u × w)
⃗ + (⃗v × w)

Two nonzero vectors ⃗u and ⃗v are parallel if and only if

⃗u × ⃗v = ⃗0 =⇒ |⃗u × ⃗v | = 0.

2.4.2 Application of Cross Product: Area of Parallelogram and Triangle


The area of parallelogram and triangles is measured by multiplying its base and height. A triangle is a
closed polygon bounded by three line segments, while a parallelogram is a closed polygon bounded by
four line segments such that the opposite sides are the same in length and are parallel to each other. The
triangle and the parallelogram are 2-dimensional figures. The area is occupied by a 2-dimensional figure
in space. So, both a triangle and a parallelogram occupy some space, and hence they have areas.
Area of parallellogram, A Area of triangle, At
p

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

Prepared by Najib and Iskandar


Chapter 2. Vectors 23

Example 2.4.5. Find the value of t if A ⃗ = ⟨t2 − 3t, −1, 2t − 1⟩ and B


⃗ = ⟨1, 2t + 3, 1⟩ are orthogonal.
⃗ ⃗
Find the area of the triangle whose adjacent sides are A and B for t < 0.
Solution

2.5 Triple Scalar Product


If the cross product is to find area of parallelogram, then the triple scalar product is used to compute
the volume of parallelepiped in ℜ3 .
Let ⃗u, ⃗v and w⃗ are three nonzero vectors that are not lie on the same plane, If ⃗u = a1⃗i + a2⃗j + a3⃗k,
⃗v = b1⃗i + b2⃗j + b3⃗k and w
⃗ = c1⃗i + c2⃗j + c3⃗k, then the triple scalar product can be found by evaluating
the determinant
a1 a2 a3

(⃗u × ⃗v ) · w
⃗ = b1 b2 b3 .
c1 c2 c3

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)

Prepared by Najib and Iskandar


Chapter 2. Vectors 24

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

7. Find the volume of parallelepiped determined by vectors ⃗u, ⃗v and w.


⃗ Are they coplanar?
⃗ ⃗ ⃗ ⃗ ⃗ ⃗ = 5i (b) ⃗u = 2i + j − k, ⃗v = 3⃗i + ⃗k and w
(a) ⃗u = j + k, ⃗v = 2i + j + 2k and w ⃗ ⃗ ⃗ ⃗ ⃗ = ⃗j + ⃗k
ans (a) 5 (b) 8

Prepared by Najib and Iskandar


Chapter 3

Partial Derivatives

3.1 Partial Differentiation


In this section, we will learn how to differentiate a function of several independent variables. Let f (x, y)
be the function of two independent variables, then the first-order partial derivatives or first partial
derivatives with respect to x and y at point (x0 , y0 ) can be denoted as

∂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

3.2 Higher Partial Derivatives


Let z = f (x, y).
Second Partial Derivatives
∂2z ∂2f
 
∂ ∂f
= (x, y) = (x, y) = [fx (x, y)]x = fxx (x, y).
∂x2 ∂x2 ∂x ∂x

∂2z ∂2f
 
∂ ∂f
= (x, y) = (x, y) = [fy (x, y)]y = fyy (x, y).
∂y 2 ∂y 2 ∂y ∂y

Mixed Partial Derivatives


∂2z ∂2f
 
∂ ∂f
= (x, y) = (x, y) = [fy (x, y)]x = fyx (x, y).
∂x∂y ∂x∂y ∂x ∂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

3.3 Chain Rule


Suppose that z = f (x, y) is a differentiable function of x and y where x = g(t) and y = h(t) are both
differentiable functions of t, then z is a differentiable function of t,
dz ∂f dx ∂f dy
= + .
dt ∂x dt ∂y dt

Prepared by Najib and Iskandar


Chapter 3. Partial Derivatives 27

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

Prepared by Najib and Iskandar


Chapter 3. Partial Derivatives 28

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

3.4 Implicit Differentiation


∂z ∂z
Example 3.4.1. Let z = f (x, y), find and for the equation yz 2 − ln(z) = x + y.
∂x ∂y
Solution

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

Prepared by Najib and Iskandar


Chapter 3. Partial Derivatives 29

∂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)..

3.5 Relative Maxima and Minima of Functions of Two Variables


In this section, we will learn how to find critical values and its type of multi-variable function.
Second Derivative Test for Local Extreme Values
Suppose that f (x, y) and its first and second partial derivatives are continuous throughout a disk centered
at (a, b) and that fx (a, b) = fy (a, b) = 0, and the discriminant or Hessian of f , D is

D = fxx (x, y)fyy (x, y) − [fxy (x, y)]2 .

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.

Prepared by Najib and Iskandar


Chapter 3. Partial Derivatives 30

Example 3.5.1. Find the local extreme values of the function

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).

Prepared by Najib and Iskandar


Chapter 4

Double Integrals

4.1 Double Integration Over Rectangular Region


The double integration over rectangular region is given by
ZZ Z d Z b Z b Z d
V = f (x, y) dA = f (x, y) dxdy = f (x, y) dydx.
c a a c
R

f (x, y) is continuous over the rectangular region R such that a ⩽ x ⩽ b and c ⩽ y ⩽ d.


Z 3Z 2
Example 4.1.1. Evaluate (1 + 8xy) dydx.
0 1

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

4.2 Double Integration Over General Region


In this part, we will discuss the double integration over the general region instead of the rectangular
region as in the previous discussion. For the definition of the case, if f is continuous on a region R such
that ZZ Z Z b g2 (x)
(a) R = {(x, y) | a ⩽ x ⩽ b, g1 (x) ⩽ y ⩽ g2 (x)} then f (x, y) dA = f (x, y) dydx.
Z ZR Za d Zg1h(x)
2 (y)

(b) R = {(x, y) | h1 (y) ⩽ x ⩽ h2 (y), c ⩽ y ⩽ d} then f (x, y) dA = f (x, y) dxdy.


R c h1 (y)
Z 1 Z 1
Example 4.2.1. Sketch the region of integration x2 exy dxdy and evaluate the integral by reversing
0 y
the order of integration.
Solution

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

Prepared by Najib and Iskandar


Chapter 4. Double Integrals 33

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

4.3 Double Integration in Polar Coordinates


If z = f (x, y) is continuous on a polar rectangle R given by 0 ⩽ a ⩽ r ⩽ b, α ⩽ θ ⩽ β, where
0 ⩽ β − α ⩽ 2π then
ZZ Z βZ b
f (x, y) dA = f (r cos(θ), r sin(θ))rdrdθ.
α a
R

which r is a radius of a circle.


RR 2
Example 4.3.1. Evaluate (x + y 2 + 1)dA where R is the region inside the circle x2 + y 2 = 4.
R

Solution

Z 1 Z √1−y2
Example 4.3.2. Use polar coordinate to evaluate xy 2 dxdy.
0 0

Solution

Prepared by Najib and Iskandar


Chapter 4. Double Integrals 34

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

Prepared by Najib and Iskandar


Chapter 5

Applications of Double Integrals

5.1 Area of the Plane Region and Volume of the Solid


Let V is a volume of a solid bounded above by the surface f (x, y) and below by the region R. If f is
continuous on a region R such that
ZZ Z b Z g2 (x)
(a) R = {(x, y) | a ⩽ x ⩽ b, g1 (x) ⩽ y ⩽ g2 (x)} then V = f (x, y) dA = f (x, y) dydx.
R a g1 (x)
ZZ Z d Z h2 (y)
(b) R = {(x, y) | h1 (y) ⩽ x ⩽ h2 (y), c ⩽ y ⩽ d} then V = f (x, y) dA = f (x, y) dxdy.
R c h1 (y)

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

5.2 Moment and Center of Mass of a Lamina


The coordinate (x̄, ȳ) of the center of mass of a lamina (sometimes is called the center of gravity of a
lamina) occupying the region R and having density function ρ(x, y) are
ZZ ZZ
My 1 Mx 1
x̄ = = xρ(x, y) dA ȳ = = yρ(x, y) dA
m m m m
R R
ZZ
where m is the mass of the lamina of the region R and is given by m = ρ(x, y) dA.
R
My is the first moment of the lamina about the y-axis and Mx is the first moment of the lamina
about the x-axis.

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

Prepared by Najib and Iskandar


Chapter 5. Applications of Double Integrals 37

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

Prepared by Najib and Iskandar


Chapter 5. Applications of Double Integrals 38

5.3 Surface Area


The area of the surface z = f (x, y) where fx and fy are continuous, is
ZZ q
A(S) = 1 + [fx (x, y)]2 + [fy (x, y)]2 dA.
R

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)

Prepared by Najib and Iskandar


Chapter 6

Numerical Methods

6.1 Trapezoidal Rule


For the definition of the Trapezoidal Rule, let
Z b
h
f (x)dx ≈ Tn = [f (x0 ) + 2f (x1 ) + . . . + 2f (xn−1 ) + f (xn )]
a 2

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

6.2 Simpson’s Rule


For the definition of Simpson’s Rule 1 , let
Z b
f (x)dx ≈ Sn
a
h
= [f (x0 ) + 4f (x1 ) + 2f (x2 ) + 4f (x3 ) + . . . + 2f (xn−2 ) + 4f (xn−1 ) + f (xn )]
3
b−a
where h = and n is the even subintervals.
n
1 Thomas Simpson is an English mathematician in the 18th century.
Chapter 6. Numerical Methods 40

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

Prepared by Najib and Iskandar


Chapter 6. Numerical Methods 41

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

6.3 Fourth Order Runge-Kutta


A Fourth Order Runge-Kutta method (abbreviated as RK4) is a numerical method which is used to find
the approximate solution to a first-order initial value problem
dy
y′ = = f (x, y) , y (xn ) = yn .
dx
The algorithm summarized for the solution of first-order initial value problem by using the RK4
method is stated as
h
yn+1 = yn + (k1 + 2k2 + 2k3 + k4 ) ;
6

k1 = f (xn , yn ); k2 = f (xn + 21 h, yn + 12 hk1 );


k3 = f (xn + 12 h, yn + 21 hk2 ); k4 = f (xn + h, yn + hk3 ).

which h = xn+1 − xn is the step size.


Example 6.3.1. Use the RK4 method with h = 0.1 to obtain an approximation to y(1.1) for the solution
of y ′ = 2xy, y(1) = 1. Give the answer correct to 4 decimal places.
Solution

Prepared by Najib and Iskandar


Chapter 6. Numerical Methods 42

We can verify the solution of y ′ = 2xy, y(1) = 1 algebraically.

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)

Prepared by Najib and Iskandar


Chapter 7

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.

7.1 Odd and Even Functions


A function is said to be even when its graph is symmetric with respect to the y-axis and odd when its
graph is symmetric with respect to the origin. Generally,
(i) A fucntion y = f (x) is even when for each x in the domain of f such that f (−x) = f (x).

(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

7.2 Fourier Series


A Fourier series is an expansion of a periodic function in terms of an infinite sum of sine and cosine
functions.
Definition: Let f be a function defined on the interval [−T, T ], the Fourier series of f is the trigono-
metric series which is given by
∞ ∞
1 X  nπx  X  nπx 
f (x) = a0 + an cos + bn sin ; (7.1)
2 n=1
T n=1
T
which
Z T
1
a0 = f (x)dx; (7.2)
T −T
Z T
1  nπx 
an = f (x) cos dx; n = 0, 1, 2, ... (7.3)
T −T T
Z T
1  nπx 
bn = f (x) sin dx; n = 1, 2, ... (7.4)
T −T T

a0 is a constant coefficient, an is a Fourier Cosine coefficient and bn is a Fourier Sine coefficient.

Example 7.2.1. Compute the Fourier series for f (x) = x, 0 < x < π.
Solution

Prepared by Najib and Iskandar


Chapter 7. Fourier Series 45

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

Prepared by Najib and Iskandar


Chapter 7. Fourier Series 46

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

2. Find the Fourier series for the function



1, −1 < x < 0,
f (x) =
x, 0 ≤ x < 1.
∞ ∞
3 X cos(nπ) − 1 X 1
ans:f (x) = + 2 2
cos(nπx) − sin(nπx)
4 n=1 n π n=1

3. Find the Fourier series for the function f (x) = x + π, −π < x < π.

X − cos(nπ)
ans:f (x) = π + 2 sin(nx)
n=1
n

Prepared by Najib and Iskandar

You might also like