0 NS Topic 1
0 NS Topic 1
Introduction
Mathematics is basically a language and science and engineering do not seem possible without them, as
essential tools for models to solve actual real-world problems. It must therefore be strongly imprinted upon every
student that some knowledge of these mathematical principles and concepts should precede even further study
into either calculus and/or linear algebra. Key topics include the physical meaning of derivatives and integrals,
Taylor series expansion, matrix, and vector definitions along with matrix algebra, and properties of matrices such
as transpose, determinant, and rank.
Motivation
The motivation behind studying these mathematical foundations is based on their practical applications
across various fields. With derivatives and integrals, one can now come to analyze rates of change and areas
under curves, vitally important concepts in physics, engineering, and economics. The expansion of functions
through Taylor series allows the use of polynomials in the approximation of a complex function, which eases
computation and analysis. Furthermore, applying knowledge of matrix algebra is important in data science,
computer graphics, and systems of equations. This understanding would help the students develop critical thinking
that will be very useful in problem-solving scenarios in various disciplines. Educational research claims that intrinsic
motivation, for example, having fun being able to understand mathematical ideas, greatly contributes to the
maintenance of interest and engagement with mathematics.
Concepts
Integrals measure the accumulation of quantities, such as calculating the area under a curve or total
distance traveled over time.
• The integral of a function can be thought of as the area under its curve when graphed.
• It allows us to calculate the total area adding up an infinite number of tiny sections (blocks) under
the curve.
• Area of each block is the product of width and height.
• Suppose you wanted to determine the "balance point" of an object, such as a seesaw. To do
this, you must consider all the tiny parts of the object and how heavy they are, as well as how
far each piece is from the middle. This you have to do by adding all those small parts together,
but some parts are far and some are close, so you have to be very careful and add them all
together in just the right way. Scientists make use of this concept in lots of problems in order to
arrive at answers like how fast things are moving or where the center of an object is.
1
Sample Problems:
1. If q(t) is the amount of electric charge measured in coulombs at time t seconds, where q(t) = 5t2 + 3t, calculate
how much electric current that is the derivative of charge with respect to time is flowing at t = 2 seconds.
Solution:
To find the electric current, calculate the derivative dq/dt.
Differentiate q(t):dq/dt = d/dt(5t2+3t) = 10t + 3
Evaluate the electric current at t = 2: dq/dt = 10(2) + 3 = 23 A
2. Calculate the speed of the car at t = 3 seconds, given that s(t) represents the distance traveled by the car in
meters after t seconds, and that s(t) = 4t³ − 6t² + 2t.
Solution:
To find the speed, we need to calculate the derivative ds/dt.
Differentiate ds/dt = d/dt (4t³ − 6t² + 2t) = 12t2 − 12t + 2
Evaluate the speed of the car at t = 3:ds/dt = 12(3)2−12(3)+2 = 74 m/s
3. A ball is dropped from a height, and its height above the ground in meters after t seconds is given by the
equation h(t)=100−5t2. Calculate the instantaneous velocity when the ball hits the ground.
Solution:
Determine when the ball hits the ground by setting h(t)=0.
Solve for t: 0 = 100−5t2
5t2 = 100
t = 4.472 s
Evaluate at t = 4.472 s
v(4.47) = −10(4.47)
v(4.47) = − 44.7 m/s
4. A certain species of bacteria grows according to the model P(t)=P0ekt, where P0 = 1000, and k = 0.03. Find the
rate of growth (derivative of population with respect to time) at t = 10.
Solution:
The population function is given by: P(t)=1000e0.03t
Differentiate P(t):,P′(t)=P0eudu = P0kekt
P′(t) = 1000(0.03)e0.03t
Evaluate growth rate at t=10
P′(t) = 1000(0.03)e0.03(10)
P′(t) = 40.496 bacteria per hour.
5. The temperature of a substance over time can be modeled by the function T(t) = −4t2 + 20t + 15, where T(t) is
in degrees Celsius and t is in minutes. Find the rate of temperature change at t = 5.
Solution:
Differentiate T(t): T(t) = −4t2 + 20t + 15
T'(t) = −8t +20
Evaluate the rate temperature change at t = 5:
T'(5) = −8(5)+20
T'(5) = -20 °C/min (indicating it is cooling down)
2
Taylor Series Expansion
Taylor series expansion of a function is a way to find the value of a function near a known point; that is, a
point where the value of the function is known. The function is represented by a sum of terms of a convergent
series. In some cases (if the function is a polynomial), the Taylor series can give the exact value of the function.
More commonly, however, the value that is desired requires a sum of an infinite number of terms. If fewer terms
are used then the function obtained from the Taylor series gives only an approximation.
Imagine you are standing at the edge of a small hill, and you want to know how steep it is as you walk a
little bit away from where you are. You already know how steep the hill is exactly at your spot. The Taylor series
is like a magic tool that helps you guess how steep the hill is at other points close by. It takes the steepness right
where you are standing and adds up a few guesses to get the steepness for nearby spots. If you add just a little
bit, your guess might be a little off. But if you keep adding more and more guesses, the answer gets more and
more accurate. In the best case, if you keep adding forever, you will know exactly how steep the hill is everywhere!
So, the Taylor series helps you guess the value of something at a new spot, using what you already know at a
starting point.
A useful way to gain insight into the Taylor series is to build it term by term. For example, the first term in
the series is . This relationship, called the zero-order approximation, indicates that the value of f
at the new point is the same as its value at the old point. This result makes intuitive sense because if x i and xi+1 are
close to each other, it is likely that the new value is probably similar to the old value. Equation below provides a
perfect estimate if the function being approximated is, in fact, a constant. However, if the function changes at all
over the interval, additional terms of the Taylor series are required to provide a better estimate. For example, the
first-order approximation is developed by adding another term to yield
(eq. a.1)
The additional first-order term consists of a slope f’(xi) multiplied by the distance between xi and xi+1. Thus,
the expression is now in the form of a straight line and is capable of predicting an increase or decrease of the
function between xi and xi+1. Although Eq. (a.1) can predict a change, it is exact only for a straight-line, or linear,
trend. Therefore, a second-order term is added to the series to capture some of the curvature that the function
might exhibit:
(eq. a.2)
In a similar manner, additional terms can be included to develop the complete Taylor series expansion:
(eq. a.3)
Note that because Eq. (a.3) is an infinite series, an equal sign replaces the approximate sign that was
used in previous equations. A remainder term is included to account for all terms from n + 1 to infinity:
where the subscript n connotes that this is the remainder for the nth-order approximation and ξ is a value of x that
lies somewhere between xi and xi+1. The introduction of the ξ is so important that we will devote an entire section
to its derivation. For the time being, it is sufficient to recognize that there is such a value that provides an exact
determination of the error. It is often convenient to simplify the Taylor series by defining a step size h = xi+1 - xi and
expressing as,
3
Where the remainder term is now
Summary
Sample Problem 1:
Approximate the function y = sin (x) by using Taylor series expansion about x = 0, using two, four, and six terms.
𝜋 𝜋
a) In each case, calculate the approximate value of the function at x = , and at x = .
12 2
b) Using MATLAB, plot the function and the three approximations for 0 ≤ x ≤ π.
Solution:
The function: y = sin (x) At x = 0, the values are: y = 0
The first derivatives of the function y = sin (x) are: At x = 0, the values are:
y’ = cos (x) y’ = 1
y” = - sin (x) y” = 0
y(3) = - cos (x) y(3) = - 1
y(4) = sin (x) y(4) = 0
y(5) = cos (x) y(5) = 1
1 1 1 1 4
f(x) = f(𝑥0 ) + f’(𝑥0 )(x-𝑥0 ) + f’’(𝑥0 )(x-𝑥0 )2 + f’’’(𝑥0 )(x-𝑥0 )3 + f (𝑥0 )(x-𝑥0 )4 +…
1! 2! 3! 4!
𝑥3 𝑥5
y(x) = 0 + x + 0 - +0+
3! 5!
𝜋 𝜋
a) the exact value of the function y = sin x at x = , y = sin ( 𝑥 180/𝜋) = 0.2588190451
12 12
𝜋
approximate values of the function at x = :
12
𝜋
two terms: y(x) = 0 + x = = 0.26180…
12
𝜋 3
𝑥3 𝜋 (12)
four terms: y(x) = 0 + x + 0 - = - = 0.25881…
3! 12 3!
3 𝜋 𝜋
𝑥3 𝑥5 𝜋 (12) (12)5
six terms: y(x) = 0 + x + 0 - +0+ = - + = 0.25882 …
3! 5! 12 3! 5!
𝜋 𝜋
a) the exact value of the function y = sin x at x = , y = sin ( 𝑥 180/𝜋) = 1
2 2
𝜋
approximate values of the function at x = :
2
4
𝜋
two terms: y(x) = 0 + x = = 1.57080…
2
𝜋
𝑥3 𝜋 ( 2 )3
four terms: y(x) = 0 + x + 0 - = - = 0.92482…
3! 2 3!
𝜋 𝜋
𝑥3 𝑥5 𝜋 ( 2 )3 ( 2 )5
six terms: y(x) = 0 + x + 0 - +0+ = - + = 1.00452…
3! 5! 2 3! 5!
b) Using a MATLAB program, listed in the following script file, the function and the three approximations were
calculated for the domain 0 ≤ x ≤ π. The program also plots the results.
The Maclaurin series is a way to express a function as an infinite sum of terms that are calculated from
the function’s derivatives at a single point (usually at a = 0). In simple terms, it’s like breaking down a complicated
function into an easy-to-use series of terms that tell you how the function behaves near a = 0. It’s a specific case
of the more general Taylor series, which can be expanded around any point, but the Maclaurin series specifically
uses a = 0. A Maclaurin series is simply a Taylor series with a = 0
For example, the Maclaurin series for ex (the exponential function) looks like this:
𝐱 𝐱𝟐 𝐱𝟑 𝐱𝟒
ex = 1 + + + + +…
𝟏! 𝟐! 𝟑! 𝟒!
Sample Problem 2: Given a function f(x)=ex, find its Taylor series expansion around x = 0 (Maclaurin series) up
to the third degree.
Solution:
Calculate derivatives at x = 0:
f(0) = e0 = 1
f′(x) = ex ⇒ f′(0)=1
f′′(x) = ex ⇒ f′′(0)=1
5
f′′′(x) = ex ⇒ f′′′(0)=1
x2 x3
f(x) ≈ 1 + x + +
2! 3!
𝐱𝟐 𝐱𝟑
f(x) = 1 + x + +
𝟐 𝟔
Definition of matrix and vector; Matrix Algebra-Summation, Subtraction and Multiplication of Matrices
A matrix is generally a 2-dimensional array of numbers arranged in rows and columns. A matrix is a
rectangular collection of variables or scalars contained within a set of square [ ] or round ( ) brackets. A matrix
consists of 𝑚 rows and 𝑛 columns. Matrices are used for representing and manipulating data, solving systems of
equations, and applying transformations in fields like computer graphics, physics, and economics.
A vector is a special case of a matrix with a single row or column. A vector is a matrix with either: one row
and multiple columns (a row vector), or one column and multiple rows (a column vector).
Row Vector (1 x n Matrix) is a matrix with 1 row and multiple column: . This is a 1x3 matrix.
Column Vector (n x 1 Matrix) is a matrix with 1 column and multiple rows: . This is a 3x1 matrix. All
vectors are matrices, but not all matrices are vectors. A matrix typically has more than one row and column.
Classification of Matrices
1. Square Matrix where the number of rows, m is equal to the number of columns, n. In this example, A is a 3
x 3 square matrix.
2. Diagonal Matrix is a square matrix in which all elements outside the main diagonal are zero. In this
example, D is a diagonal matrix where the only non-zero values are on the diagonal.
3. Identity Matrix is a special type of diagonal matrix where all the diagonal elements are equal to 1. Here, I is
a 3×3 identity matrix.
6
4. Scalar Matrix is a diagonal matrix in which all the diagonal elements are the same non-zero constant. In this
example, S is a scalar matrix where every diagonal entry is equal to 4.
5. Triangular matrix can be either an upper triangular matrix (all entries below the main diagonal are zero) or a
lower triangular matrix (all entries above the main diagonal are zero).
7. Symmetric matrix is a square matrix in which [aij] = [aji]. For a symmetric matrix, the transpose of the matrix
is equal to the matrix itself:
[a] T = [a]
2. Addition and Subtraction of Matrices - Addition (or subtraction) of two matrices can be accomplished by
adding (or subtracting) the corresponding entries or two matrices only if they are of the same size. For matrix
addition and subtraction to be valid, the two matrices must have equal dimensions. Now, a 2x2 matrix
7
has two rows and two columns, but a 3x3 matrix has three rows and three columns, so they cannot be added to
each other. Both the matrices must be the same size for example, the same size for both 2x2 and 3x3 to
perform the addition of matrices.
3. Multiplication Matrices
Matrix multiplication combines two matrices to produce a new matrix, but it requires specific rules. For
two matrices to be multiplied, the number of columns in the first matrix must equal the number of rows in the second
matrix. The resulting matrix will have dimensions based on the rows of the first matrix and the columns of the
second. To calculate each element in the resulting matrix, take the dot product of a row from the first matrix and a
column from the second. As with vectors, division is not an allowed operation.
8
Sample Problem 3: Multiply:
2 −1
4 9 1 −3
Sample Problem no. 4: Multiply [ 8 3 ] [ ].
−5 2 4 6
6 7
2 −1 𝟏𝟑 𝟏𝟔 −𝟐 −𝟏𝟐
4 9 1 −3
[ 8 3 ] [ ] = [ 𝟏𝟕 𝟕𝟖 𝟐𝟎 −𝟔 ]
−5 2 4 6
6 7 −𝟏𝟏 𝟔𝟖 𝟑𝟒 𝟐𝟒
4. Inverse of a Matrix
Division is an operation that is not defined for matrices. However, an operation that is defined and serves
an equivalent purpose is the inverse of a matrix. A square matrix [a] is invertible provided there exists a square
matrix [ b] of the same size such that [a] [ b] = [ I ] , where [ I ] is the identity matrix. The matrix [b] is called the
inverse of [a] and written as [a]-1. Thus:
[a] [a]-1 = [a]-1 [a] = I
Sample Problem 4:
0.1 0.2 0 −1.2 3.2 −0.8
Show that the matrix [b] = [ 0.4 0.1 0.2 ] is the inverse of the matrix [a] = [ 5.6 −1.6 0.4 ]
0.2 0.1 0.8 −0.4 −0.6 1.4
Solution:
To show that the matrix [ b] is the inverse of the matrix [a] , the two matrices are multiplied.
𝟏 𝟎 𝟎
[a] [b] = [ 𝟎 𝟏 𝟎 ] (Identity matrix because the diagonal elements are all 1 s)
𝟎 𝟎 𝟏
9
Transpose, Determinant and Rank of a Matrix
The transpose of a matrix is obtained by flipping it over its diagonal. The transpose of a matrix is
obtained by interchanging its rows and columns. If you have a matrix A of size m×n, its transpose, denoted as AT,
will be of size n×m. For example, for the matrix:
the transpose is
The determinant of a matrix provides information about the matrix's invertibility; if it is zero, the matrix does
not have an inverse. The determinant is a scalar value that can be computed from a square matrix and provides
important information about the matrix, such as whether it is invertible. The determinant is a number. It is the
sum of all possible products formed by taking one element from each row and each column and attaching the
proper sign. For a 2×2 matrix B:
the determinant is calculated as det(B) = ad − bc. For example, for the matrix B
Properties of Determinants
1. The determinant is zero if a matrix has a row or column of zeros.
1 3 0 1 3 2
[2 5 0]=0 [0 0 0]=0
4 8 0 4 8 5
3. If a matrix is diagonal, the determinant is equal to the product of the diagonal elements.
3 0 0
[ 0 8 0 ] = (3) (8) (2) = 48
0 0 2
4. The value of the determinant is not changed if corresponding rows and columns are interchanged.
1 3 9 1 2 4
[2 5 7] = [3 5 6]=0
4 6 8 9 7 8
10
The rank of a matrix refers to the maximum number of linearly independent row or column vectors in the
matrix. The rank of a matrix cannot exceed the number of its rows or columns.
Gaussian elimination is a method for solving systems of linear equations and finding the rank of a matrix. It
involves performing row operations to convert the matrix into row echelon form (REF) or reduced row echelon
form (RREF). These forms make it easier to analyze the linear independence of rows or columns and determine
the rank.
The objective is to simplify the matrix into a form where you can clearly identify the number of non-zero rows,
which directly gives the rank of the matrix.
Step 2: Use row operations to create zeros below the leading 1s (pivots). The first step of Gaussian elimination is
to make the elements below the pivot in the first column zero. The pivot is typically the first non-zero element in a
column, and we will use the row operations to clear the entries below it. For example, if the first column has non-
zero elements in rows 2 and 3, we will subtract multiples of row 1 from rows 2 and 3 to eliminate those elements.
First step (Pivot in column 1): We want the first element of row 1 to be a 1 (it already is), and we want to make
the entry below it (in the second row) zero.
1 2
Perform R2→R2−3R1 = [ ]
0 −2
Second step (Pivot in column 2): Now, make the second pivot (the element in row 2, column 2) equal to 1 by
dividing row 2 by -2:
1 2
[ ]
0 1
Result (Row echelon form): We have successfully made the matrix upper triangular with leading 1s in the pivots.
The rank of this 2x2 matrix is 2, since there are two non-zero rows.
1 2 3
Example 2: 3x3 matrix. Consider the 3x3 matrix: [ 4 5 6]
7 8 9
First step (Pivot in column 1): We want to eliminate the elements below the first element (which is 1). Perform
the following row operations:
R2→R2−4R1
R3→R3−7R1
11
After performing these operations, the matrix becomes:
1 2 3
[0 −3 −6 ]
0 −6 −12
Second step (Pivot in column 2): Make the second pivot (the element in row 2, column 2) equal to 1 by dividing
row 2 by -3:
1 2 3
[0 1 2 ]
0 −6 −12
Third step (Eliminate below the second pivot): Eliminate the element below the pivot in column 2 by performing
the row operation:
R3→R3+6R2
1 2 3
[0 1 2]
0 0 0
Result (Row echelon form): This matrix is now in row echelon form. There are 2 non-zero rows, so the rank of
this matrix is 2. You can further reduce it by performing: R1→R1−2R2 (reduced row echelon form (RREF) of the
matrix)
8 9
1. Solve for x = [ ]
2 5
2 −3 2
2. Solve for x in 3rd order matrix, x = [ 1 1 −4 ]
3 −2 1
Solution:
Step 1: copy the first two columns
2 −3 2 2 −3
x = [ 1 1 −4 I 1 1 ]
3 −2 1 3 −2
2 −3 2 2 −3
[1 1 −4 I 1 1 ] = (2)(1)(1) + (-3)(-4)(3) + (2)(1)(-2) = 34
3 −2 1 3 −2
2 −3 2 2 −3
[1 1 −4 I 1 1 ] = (3)(1)(2) + (-2)(-4)(2) + (1)(1)(-3) = 19
3 −2 1 3 −2
12
3. Calculate the determinant of the matrix, A =
2 2 1 3 1 -1 5 1 -1 5 1 1 5 1 1 -1
1 1 -1 5 = 2 -2 3 1 - 2 2 3 1 + 1 2 -2 1 - 3 2 -2 3
2 -2 3 1 0 2 1 3 2 1 3 0 1 3 0 2
3 0 2 1 Note: the signs alternate
Repeat the first two columns (see below) then proceed with the Lower
minus Upper approach.
1 -1 5 1 -1
= 2 -2 3 1 -2 3 = [(1.3.1)+(-1.1.0)+(5.-2.2)] - [(0.3.5)+(2.1.1)+(1.-2.-1)]
0 2 1 0 2 = -21
-
1 -1 5 1 -1
[(1.3.1)+(-1.1.3)+(5.2.2)] - [(3.3.5)+(2.1.1)+(1.2.-
= 2 2 3 1 2 3 =
1)]
3 2 1 3 2 = -25
+
1 1 5 1 1
[(1.-2.1)+(1.1.3)+(5.2.0)] - [(3.-
= 1 2 -2 1 2 -2 =
2.5)+(0.1.1)+(1.2.1)]
3 0 1 3 0 = 29
-
1 1 -1 1 1
= 3 2 -2 3 2 -2 = [(1.-2.2)+(1.3.3)+(-1.2.0)] - [(3.-2.-1)+(0.3.1)+(2.2.1)]
3 0 2 3 0 = -5
13
ACTIVITY SHEET NO. 1 Topic: ________________________________________________
Solve the following problems and write your solutions on a separate sheet of paper. Each problem is worth five (5)
points.
from xi = 0 with h = 1. That is, predict the function’s value at x i+1 = 1 and determine the true value.
2. Use of Taylor Series Expansion to Approximate a Function with an Infinite Number of Derivatives
In matrix form, use Taylor series expansions with n = 0 to 6 to approximate f(x) = cos x at xi+1 = π/3 on
the basis of the value of f(x) and its derivatives at xi = π/4. Note that this means that h = π/3 - π/4 = π/12, neglect
error computation.
2 2
3. Use the chain rule to find the second derivative of f(x) = sin (𝑒 𝑥 ). (Hint: define u(x) = (𝑒 𝑥 ) and then apply the
chain rule.)
4. Given the function f(x, y, z) = (sin x)(cos y) (ln z), find the total derivative with respect to x, df/dx at the point (1,
2, 3).
5. Given the function u(x,y) = x2y – y2, where x = sin t and y = et, find du/dt when t = 0.
A= B=
4 2 4
7. Find the rank of the matrix: [ 2 4 2 ].
0 1 0
−6 6 4 3 −7 4
8. Add the following matrices: A = [ 2 3 −8 ] and B = [ −2 8 −1 ].
−4 −5 4 2 −6 3
14
−6 6 4 3 −7 4
9. Subtract the following matrices: A = [ 2 3 −8 ] and B = [ −2 8 −1 ].
−4 −5 4 2 −6 3
11. Multiply:
2 8
-1 -3 -2 -5 2 8
3 4 3 4 -6 5
4 6
6 -7
15