0% found this document useful (0 votes)
79 views90 pages

EXC2910 Lecture Notes

Uploaded by

williampham03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views90 pages

EXC2910 Lecture Notes

Uploaded by

williampham03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 90

EXC2910 THE FIRST SEMESTER

FABIAN A. HARANG

Contents

1. List of symbols 2
2. The numbers and sets 3
3. Basic rules of algebra 5
4. Linear equations 11
5. Quadratic equations 14
6. Systems of linear equations 18
7. Inequalities 20
8. Functions 24
9. Quadratic functions 29
10. Polynomials 33
11. Limits and Asymptotes 39
12. Differentiation 42
13. Rules of differentiation 44
14. Tangent line 47
15. Function Analysis 49
16. Financial Analysis 54
17. Annuities 61
18. Two variable functions 65
19. Optimization under constraints: The Lagrange method 73
20. Integration 77
21. Introduction to linear algebra: Gauss Elimination 86

1
EXC2910 THE FIRST SEMESTER 2

1. List of symbols

This list will be extended throughout the semester.


• =⇒ "implies": a =⇒ b (a implies b)
• ∈ "contained in": n ∈ A (n is contained in the set A).
• Z "integers": ..., −2, 1, 0, 1, 2, ...
• Q "rational numbers": any number of the form ab where a and b are integers.
• R "real numbers": any number (rational, irrational, integer) between −∞
and +∞.
EXC2910 THE FIRST SEMESTER 3

2. The numbers and sets

Numbers are the basic building block of mathematics. We use them to quantify
various objects of interest and they allow us to compare different quantities due to
their natural order. In these notes we will only work with what is called the real
numbers; pretty much any number that you are able to think of. We typically divide
this class of numbers into three collections: The integers, the rational numbers and
the irrational numbers. Let us discuss these three separately before we see how they
are all contained in the real numbers.

2.1. Natural numbers. The integers are the numbers of the form: 0, 1, 2, 3, 4....
(often called positive integers), but also negative numbers of the form −1, −2, −3, −4....
(negative integers). Clearly there are infinitely many integers; try counting them!
A collections of numbers Is typically called a set. We therefore use the brackets
{·} to denote a set. For example, the collection of numbers given by 1, 2 and 3 can be
written as the set {1, 2, 3}. Similarly the collection of numbers 1, −102, 247 and −3
can be denoted by {1, −102, 247, −3}. When talking about collections of numbers
which are of infinite size, we typically include only three or four numbers from the
collection, and then write ... after, allowing the reader to understand that there
are infinitely more of the numbers, and they follow the pattern from the first three
or four numbers. For example, to denote all the positive integers we may write
{1, 2, 3, 4, ...}. The negative integers can then be written as {..., −4, −3, −2, −1}.
Note that we always preserve the order, and thus the triple ... here comes before the
first number.
The collection of all integers is denoted by Z. This can be written mathematically
as
Z := {..., −3, −2, −1, 0, 1, 2, 3, ...}. (2.1)

Here, the symbol Z is used to represent the collection of numbers. So we can say
for example that a number n is contained in (in the collection) Z, meaning that
the number n is an integer. To simplify this further with mathematical notation
we write n ∈ Z. The symbol ∈ means that whatever is on the left hand side is
contained in whatever is on the right hand side.
The collection of integers can again be divided into two sub-collections: All the
numbers that can be divided by the number 2 (and leaving no remainder) and the
numbers that can’t. We call these two collections even and odd numbers respectively.
More concretely we have

even = {2, 4, 6, 8, 10, 12, ...}


(2.2)
odd = {1, 3, 5, 7, 9, 11, ...}
EXC2910 THE FIRST SEMESTER 4

It is readily seen that any even number can be divided by 2: for example 2/2 = 1,
4/2 = 2, 6/2 = 3 and so on. Similarly, for the odd numbers we see that if we divide
by 2 we get a remainder (i.e. a decimal number): 1/2 = 0.5, 3/2 = 1.5, 5/2 = 2.5
and so on. More generally, we can say that any even number is any number of the
form 2k where k is an integer (see definition above). An odd number can therefore
be written as any number of the form 2k + 1 where k again is an integer.

2.2. Rational numbers. The rational numbers is the next sub-collection of num-
bers that we will consider. Even though the collection of integers is infinitely large
(as there is infinitely many integers), the collection of rational numbers is much
bigger! Let us first define this class, and then we will see why. The set of rational
numbers is denoted by Q and consists of all numbers which can be written as a
fraction between two integers. That is, any rational number k can be written as
k = ab where a and b are integers. Therefore, 13 is a rational number, since 1 and 3
are integers. Similarly, − 12 , 52 , 25 and 5678
1234
are all rational numbers. Note also that
any integer is also a rational number. Indeed, if k is an integers contained in the
collection Z then k = k1 and so it is also a rational number.
To write this mathematically, we have that the rational numbers Q are defined
by
a
Q := {k = : a, b ∈ Z}. (2.3)
b
We read this definition as " all numbers k which is given as a fraction ab , where a
and b are integers (i.e. contained in Z)".
Note in particular that between any two integers, we can find infinitely many
rational numbers! Indeed, let us look for rational numbers between 0 and 1. For
example the numbers 12 , 31 , 14 and so on are all contained between 0 and 1.

2.3. Real numbers. Simply put, the real numbers is the collection of "all numbers
between −∞ and +∞". This is not a very rigorous account. We can rather think
of the real numbers as a continuous line: The real numbers clearly contains all

Figure 2.1. The real numbers as a continuous line.

the integers and all the rational numbers, but they also contain all the so called
irrational numbers. These are numbers that cannot be written as a fraction between
two integers (i.e. of the form ab for two integers a and b).
EXC2910 THE FIRST SEMESTER 5

3. Basic rules of algebra

The basic rules of algebra is about understanding abstract relations between num-
bers. The basic building blocks of algebra is addition, subtraction, multiplication
and division. While we will assume good knowledge of these four fundamental op-
erations here, but we will recall the order of which these operations must happen
when faced with what we call an algebraic expression.

3.1. Order of operations. In combination with the four basic operations: +, −, ·, ÷


we typically involve parenthesis in order to separate various calculations from each
other. For example if we have three real numbers a, b, c and we want to add a and
b together and then multiply the number that we get with the number c, then we
write (a + b) · c. The parenthesis is written around the operation a + b. This means
that the operation of multiplication should be done for the number a + b and not for
only a or only b. To illustrate this suppose a = 2, b = 3 and c = 4. Then (2 + 3) · 4
means that we multiply 2 + 3 = 5 with 4. This is therefore (2 + 3) · 4 = 5 · 4 = 20. A
very common mistake in mathematics is to ignore or forget about the parenthesis,
and simply multiply the c with either a or b. This would give the wrong answer;
this is not the answer that was intended to get when writing the expression.
Working with parenthesis we can (and often should) remove the parenthesis or
simplify the expression. This means that for an expression of the form (a + b) · c we
can multiply c with both a and b separately and then add them together, i.e.

(a + b) · c = a · b + b · c.

Note that in the specific example above: (2 + 3) · 4 = 2 · 4 + 3 · 4 = 8 + 12 = 20


and so this is true.
In general we need to follow the following rules for the operations: Let a, b, c be
real numbers
• Commutative property of multiplication and addition

a · b = b · a and a + b = b + a

• Associative property of multiplication and addition

(a · b) · c = a · (b · c) and (a + b) + c = a + (b + c).

• Distributive property

(a + b) · c = a · c + b · c.

Remark 3.1. In the sequel, as is usual in mathematics, we will simply write ab to


denote the product a · b.
EXC2910 THE FIRST SEMESTER 6

3.2. Fractions. A fraction is simply a formal way of representing the operation of


division. More precisely, for two real numbers a and b we say that ab is a fraction. We
typically read this as a over b, and the number on top (a) is called the numerator and
the number on the bottom (b) is called the denominator. As mentioned, a fraction
represents division; ab is the same as a ÷ b. However, writing it as a fraction allows
us to simply understand further mathematical manipulations. Let us write up a few
rules for how to deal with fractions:

Rules of fraction. Let a, b, c, d be real numbers. Then the following rules holds:
• negative fractions
a −a a
− = = .
b b −b
• Addition with common denominator
a c a+c
+ = .
b b b
• multiplication of fractions
a c ac
· = .
b d bd
• Division of fractions
a c a d ad
÷ = · = .
b d b c bc
Remark 3.2. Note that the addition rule also implies the following rule for subtrac-
tion of fractions with a common denominator. Indeed, since the rule holds for any
real numbers a and b, note that −a is also a real number, and thus by the addition
rule we have that
a c a (−c) a + (−c) a−c
− = + = = .
b b b b b b
3.3. Integer powers. Working with numbers, we typically encounter expressions
where a number is multiplied by itself several times. We call this to take a power of
a number. More concretely, we have the following definition:

Definition 3.3. let n be an integer, and let a be an integer. We then define


an = a
| · .{z
. . · a} .
n−times

We say that an is the n-th power of a.

The following proposition provides us with some basic rules for powers of numbers

Proposition 3.4 (Rules of integer powers). Let n and s be integers, and a and b be
real numbers. Then the following holds:
i. an as = an+s
ii. (an )s = ans .
EXC2910 THE FIRST SEMESTER 7

iii. a−1 = a1
iv. if a ̸= 0 then a0 = 1 (00 is undefined).
v. (ab)n = an bn
vi. ab = a · 1b .

To illustrate these rules, we provide the following example.


Example: Working with specific numbers for a, n and s we can represent numbers
as powers. For example, we see that

9 = 3 · 3 = 31 · 31 = 32 = 9 (3.1)

Furthermore, we have that 81 = 92 but since 9 = 32 we have that 81 = (32 )2 . It


follows by the second rule that 81 = 32+2 = 34 .
Example: The third rule is something that is used very frequently but also com-
monly forgotten. Note in particular that a−n = a1n . Indeed, from the second rule,
using that s = −1 we have that
1 1
a−n = (a−1 )n = ( )n = n ,
a a
where in the last step we used the rule for multiplication of fractions. Furthermore,
note that if we multiply an by a−n we get 1! That is, an · a−n = 1. This follows
directly from the first rule of integer powers.

3.4. Economic application: Growth. In finance and economics we are typically


concerned with year-on-year growth. We talk about the annual GDP growth, the
annual interest rate in the bank, or the growth in a certain stock over the last year.
In order to compute the growth of an economy after n years we need to work with
powers of numbers. Let us illustrate this with an example:
Example: Compounded interest: Suppose you save M0 kroner in the bank
(here M0 is simply a positive number) at annual interest rate r. Then after 1 year
your account would consist of the original M0 kroner you saved in addition to r%
of the same money. Let M1 be the amount of money you have in the bank after
1 year. Then
r r
M1 = M0 + M0 · = M0 (1 + ).
100 100
If you leave the money for another year, you will earn another r% of the money
that you had in your account at year 1. Thus, letting M2 denote the money you
have in the bank at end of year two, we have
r r
M2 = M1 + M1 · = M1 (1 + ),
100 100
inserting the expression we have for M1 we find
r r r 2
M2 = M0 (1 + )(1 + ) = M0 (1 + ).
100 100 100
EXC2910 THE FIRST SEMESTER 8

More generally, if we let Mn−1 denote the money we have in the bank after saving
for n − 1 years, we can derive a formula to figure out how much we will have in
the bank after n years. As before, we have
r r
Mn = Mn−1 + Mn−1 = Mn−1 (1 + ). (3.2)
100 100
By iterating backwards, one can show that
r n
Mn = M0 (1 + ) . (3.3)
100
We say that the interest rate is compounded, meaning that the next year we earn
interest both on the principle amount saved but also on all earlier interest rates
gained. This makes our savings grow at a so called exponential rate.

3.5. Factorization. A technique which will become very useful in our mathematical
analysis is known as factorization. The basic idea is to break down a number into
smaller factors. By doing so, we can understand in more detail what "this number is
made up of" and we can therefore see common factors in two numbers, which might
cancel out under for example division.
More precisely, suppose x is a real number, and that there exists two numbers
a and b such that x = a · b. Then a and b are two factors of x. When factorizing
a number, we typically want to continue this factorization until the factors only
consists of prime numbers (recall that a prime number is a number which is only
divisible by 1 and itself). For example, the number 21 can be factorized into 3 · 7
(both 3 and 7 are prime numbers). Another example is the number 16 which can
be decomposed into 4 · 4, where 4 and 4 are the two factors. However, 4 can be
factorized further into 2 · 2 and we therefore have that 16 = 2 · 2 · 2 · 2. Another
way of factorizing a number is to first "split" the number into two numbers added
together. For example, 32 = 14 + 18. Now 14 = 2 · 7 and 18 = 2 · 9 and therefore we
have 32 = 2 · 7 + 2 · 8. Observe that the factor 2 is common for both the numbers
that are added together, and so we can factorize this number outside a parenthesis
to see that
32 = 2 · 7 + 2 · 8 = 2 · (7 + 8).

Although this trick seems rather difficult in order to decompose 32 into 2·16, we will
see that for general algebraic expressions, factorization of this form will drastically
simplify our expressions.

Consider now an algebraic expression of the form 2x − 4x2 . We can write this in
terms of its factors
2x − 4x2 = 2 · x − 2 · 2 · x · x.
EXC2910 THE FIRST SEMESTER 9

We recognize that 2 · x is common in both of the terms, and so we can put this
outside a parenthesis, in order to see that

2x − 4x2 = 2 · x · 1 − 2 · 2 · x · x = 2x · (1 − 2x).

Note that we must leave a 1 in place where the first 2x stood. Try to verify that
this is true by multiplying out the parenthesis on the right hand side above.
Finding common factors in algebraic expressions will be very important in order
to reduce the complexity and to quickly be able to analyse such expressions.

3.6. Simplifying expressions. An algebraic expression is an expression involving


various mathematical operations of numbers represented by letters. For example

(a − b)(a + b) − a2 + b2 (3.4)

is an algebraic expression. Very often can we work with such an algebraic expression
in order to simplify it to make it easier to read and understand. For example, if we
open up the parenthesis above by multiplying we see that

(a − b)(a + b) = a(a + b) − b(a + b) = a2 + ab − ba − b2 = a2 − b2 .

Thus we have simplified the product of the two parenthesis. Inserting this compu-
tation back into Equation (3.4) we see that

(a − b)(a + b) − a2 + b2 = 0. (3.5)

The number 0 is certainly much simpler than (a − b)(a + b) − a2 + b2 , and so by


manipulating the numbers we found out that the two where the same. Using the
knowledge hat we have about the numbers, mathematical operations, fractions, and
powers, we are well equiped for simplifying abstract algebriac expressions.
Example: Simplify the following expression:
an b3 b−2
+ an−1 . (3.6)
b a
Solution: We begin to look at the fraction. Using the rules in Section 3.2 we see
that
an b3 b−2 1
= an b2 b−2 = an−1 . (3.7)
b a a
Now adding this to the second term an−1 we get
an b3 b−2
+ an−1 = an−1 + an−1 = 2an−1 . (3.8)
b a
The right hand side is now the simplified number. Note that the number b was
not really involved; it cancelled out.
EXC2910 THE FIRST SEMESTER 10

3.7. Quadratic identities. The quadratic identities are a collection of three for-
mulas relating to the expansion of the square of a sum or difference. Knowing these
identities by heart makes computations much faster, and it is highly recommended
to learn these identities and make sure that one understand how to derive them.

Proposition 3.5 (Quadratic identities). Let a, b ∈ R. Then the following holds:


(I) (a + b)2 = a2 + 2ab + b2
(II) (a − b)2 = a2 − 2ab + b2 (3.9)
(III) (a + b)(a − b) = a2 − b2 .

Exercise 3.6. Show that formula (I) − (III) holds. To this end, begin to look at
the parenthesis expression on the left hand side of the identities, and "open this up".

3.8. Exercises.

Exercise 3.7. Simplify the following expressions


(1) a2 + 2a2 − 3a2
(2) a−1 + 2a−1
2
(3) abc − 2a
c
+ 1c
n
(4) an (b2 − c2 ) + (ca 2 )2

Exercise 3.8. Using the rules for integer powers in combination with the rules for
fractions, show that for any integer n and s and real numbers a, b, c and d
4 −2
(1) (ab) a
b3 a2
=b
(2) ac
bc
= ab
(3) (a + b)2 = a2 + 2ab + b2
(4) (a − b)2 (a + b) = a3 + b3 − a2 b − b2 a + b3 .

Exercise 3.9. Suppose you invest 1000 NOK in a financial product that guarantees
you a return of 10% per year in the next 10 years. Show that after 10 years your
money has grown to 2594 NOK.

Exercise 3.10. Show that the formula in Equation (3.3) is true.


Hint: To this end, show first that it holds for M1 , and M2 . Then assume that
the formula holds for Mn and show that it must then also hold for Mn+1 .
EXC2910 THE FIRST SEMESTER 11

4. Linear equations

Linear equations are expressions of the type

3x − 5 = 2x + 2. (4.1)

Here x represents an unknown number which is such that the left hand side of the
= sign is equal to what is on the right hand side. The mathematical problem is
therefore to figure out what the unknown number x is. So, when asked to solve such
an equation, we mean that we are looking for a real number a which is such that
if we replace x in the equation by a, then what is on the left hand side is equal to
that on the right hand side. Let us illustrate this further: we could guess that the
solution to the above equation is 2 (this means that the number a = 2).But inserting
the number 2 in place of x in the above equation we see that we get

3 · 2 − 5 = 2 · 2 + 2 =⇒ 1 = 6 (4.2)

The conclusion on the right hand side is obviously not true; 1 ̸= 6 ("1 is not equal
to 6). Therefore 2 cannot be a solution to the equation.
On the other hand, let us try the solution 7. Inserting 7 in place of x in the
original equation we see that

3 · 7 − 5 = 2 · 7 + 2 =⇒ 21 − 5 = 14 + 2 =⇒ 16 = 16. (4.3)

Here we see that the left hand side of the equality sign is equal to the right hand
side! This means that 7 is a solution to the equation. We then typically say that
x = 7 is the solution. For now, we have only guessed at different solutions. This is
typically impossible in real world applications, and it is therefore useful to learn a
few methods in order to figure out the correct solution to the equation by simply
using the algebraic manipulations we have worked with in the previous section.
The important thing to remember when working with equations is the following
proposition:

Proposition 4.1. Given a linear equation of the form

ax + b = cx + d,

we are allowed to do the following operations:


(1) We can add a number or variable n to both sides of the equation, i.e.

ax + b + n = cx + d + n. (4.4)

(2) We can subtract a number or variable n to both sides of the equation, i.e.

ax + b − n = cx + d − n.
EXC2910 THE FIRST SEMESTER 12

(3) We can multiply both sides of the equation by a number n, i.e.

(ax + b)n = (cx + d)n.

(4) we can divide both sides of the equation by a number n (not equal to 0), i.e.
(ax + b) (cx + d)
= .
n n
4.1. An algorithm to solve linear equations. We will now present a simple
algorithm to solve linear equations. An algorithm is just a recipe containing useful
steps and rules to follow to reach the goal of solving a linear equation.
Algorithm: We are given an equation of the form

ax + b = cx + d, (4.5)

where a, b, c, d are real numbers, and x is the unknown variable.


Step 1: Collect all terms involving x on the left hand side. To do this use rule
number (1) and (2) of Proposition 4.1. In this case, we must subtract cx on both
sides of the equation, in order to get cx over to the right hand side:

ax + b − cx = cx + d − cx =⇒ ax − cx + b = d.

Step 2: Now we want to collect all the numbers which is not multiplied with x on
the right hand side. In our case, this means that we want the number b to move
to the right hand side. To do this, we subtract b on both sides of the equation
that we derived in Step 1, and we see that

ax − cx + b − b = d − b =⇒ (a − c)x = d − b.

Step 3: Recall that if a and c are numbers, then a − c is also a number, and
assume that a − c is not 0. On the left hand side we now have (a − c)x To get x
on its own, we need to divide by (a − c) on both sides of the equation, using (4)
in Proposition 4.1. We then find that
(a − c)x d−b d−b
= =⇒ x = .
(a − c) (a − c) a−c
d−b
Now we have found a solution to the equation, x = a−c
.

Exercise 4.2. Solve the following equations for x:


(1) 2x − 4 = 3x + 2
(2) −10x + 2 = 3x + 4
(3) 2(x − 4) + 3 = 2x(2 − 3)
(4) x3 + 12 = 2x − 1
1
(5) x−2 = 2x − 3
Be careful to show all computational steps in your answer.
EXC2910 THE FIRST SEMESTER 13

Exercise 4.3. Show that x = 4 is a solution and that 3 is not a solution to the
equation
4(x + 12) = 8x + 32 (4.6)
hint: Insert the number 4 or 3 in place of x in the equation, and see if the right
hand side is equal to the left hand side.
d−b
Exercise 4.4. Show that x = a−c
is a solution to the equation
ax + b = cx + d. (4.7)
d−b
Hint: Insert the number a−c in place of x in the equation, and then check that the
left hand side is equal to the right hand side.
EXC2910 THE FIRST SEMESTER 14

5. Quadratic equations

While the linear equations of last section have terms with an unknown x quadratic
equations also involve a second order term x2 . For example a quadratic equation
could take the form
2x2 − 4x + 10 = 0.
Just as for linear equations we treat x as an unknown number. Our goal is to figure
out what real number which is such that if we replace x by this number, then the
left hand side of the equation is equal to the right hand side (in this case 0). In
contrast to linear equations, quadratic equations will mostly have two solutions. We
are therefore not only looking for one real number solving the equation, but two!
This can be illustrated by the following quadratic equations:

x2 − 16 = 0.

To solve this, we must ask our self "what number is such that if we square that
number, we get 16?" Of course, a candidate is 4, since 42 = 16. But note that
another possibility is −4, since (−4)2 = 16. Thus this equation has two solutions,
and we denote them by x1 and x2 , i.e. x1 = 4 and x2 = −4.

Exercise 5.1. Find the two solutions to the following equations:


(1) 2x2 − 8 = 0
(2) −3x2 + 27 = 0
(3) −4x2 = −4

Generally, quadratic equations can be formulated as follows:

Definition 5.2. Let a, b, c ∈ R be fixed real numbers. A quadratic equation is the


given on the form
ax2 + bx + c = 0. (5.1)
A solution to the quadratic equations is a pair of numbers x1 and x2 which are such
that if we replace x in (5.1) by either x1 or x2 , the left hand side is equal to the
right hand side.

Remark 5.3. The numbers a, b and c provides a complete characterization of the


quadratic equation. For example, choose a = 1, b = 2 and c = −3 and we get the
following quadratic equation:

x2 + 2x − 3 = 0. (5.2)

They represent the numbers (often called coefficients) that we find in front of each
of the terms in the quadratic equation.
EXC2910 THE FIRST SEMESTER 15

Exercise 5.4. Solve the following equations without using the ABC formula in the
next section:
(1) 3x2 − 4x = 0
(2) −x2 + 2x = 0
(3) x2 + 4x + 4 = 0
(4) −x2 + 2x − 1 = 0
(5) −x2 + 2x − 26 = 0

5.1. ABC formula. A very useful formula is known as the ABC formula. It will
provide an explicit formula to solve quadratic equation in (5.1), where the solutions
are expressed in terms of the a, b and c coefficients in the abstract equation (thus
ABC formula).
We present the formula in the following proposition:

Proposition 5.5 (The ABC formula). Let a, b, c ∈ R be real numbers, and suppose
a ̸= 0. Let x1 and x2 be given by
√ √
−b + b2 − 4ac −b − b2 − 4ac
x1 = , x2 = . (5.3)
2a 2a
Then x1 and x2 are two solutions to the quadratic equation

ax2 + bx + c = 0.

Remark 5.6. More generally, one commonly use the notation ± to represent the plus
and minus part of the expression, and write

−b ± b2 − 4ac
x= . (5.4)
2a
Writing it in this way, it means that there are two solutions, and in one of the

solutions we add the term b2 − 4ac in the numerator, and in the other we subtract
the same term.

Example:: Let us solve the following quadratic equation by using the ABC for-
mula:
1
− x2 + 2x − 1 = 0.
2
We observe that for this equation, a = − 21 , b = 2 and c = −1. Inserting this into
the ABC formula, we get
q
−2 + 22 − 4(− 21 )(−1) √
x1 = 1 = 2 − 2.
2(− 2 )

Similarly, we can see that x2 = 2 + 2. And so we have two solutions.
EXC2910 THE FIRST SEMESTER 16

The two solutions provided by the ABC formula may seem very complicated.
However, it turns out that these expressions can easily tell us how many solutions
we can expect tot he problem.

Proposition 5.7 (analysis of the ABC formula). Let a, b, c ∈ R be real numbers


and consider the equation
ax2 + bx + c = 0. (5.5)
The the following statements are true:
• If a ̸= 0 and b2 −4ac > 0 then (5.5) has two real solutions x1 and x2 provided
by Proposition 5.5.
• If a ̸= 0 and b2 − 4ac = 0 then (5.5) has only one real solution x.
• If a ̸= 0 and b2 − 4ac < 0 then (5.5) has no real solutions.

Exercise 5.8. Use the ABC formula to first figure out how many real solutions we
have to the following equations, and then afterwards write down the solutions using
the formula.
(1) −x2 + 2x + 3 = 0
(2) 2x2 + 4x + 8 = 0
(3) −2x2 + 2x = −10
(4) − 2δ x2 + 2αx = β (for some given numbers α, δ, β).

5.2. Factorization of quadratic expressions. Consider now the general qua-


dratic expression
ax2 + bx + c.
For now, this is not an equation as there is no = sign, but it is simply an algebraic
expression. In applications it will be useful to factorize this expression into parts
which are multiplied by each other, similar to what was discussed in Section 3.5. It
turns out that solving the corresponding quadratic equation ax2 + bx + c = 0 will
provide us directly with such a factorization. This is summarized in the following
proposition.

Proposition 5.9. Let a, b, c be three real numbers, suppose x1 and x2 are two solu-
tions to the quadratic equation

ax2 + bx + c = 0.

Then we have that


ax2 + bx + c = a(x − x1 )(x − x2 ).

Remark 5.10. This proposition will prove to be very powerful in our analysis. It
tells us that if we know the two solutions of a quadratic equation, then we can
EXC2910 THE FIRST SEMESTER 17

factorize the corresponding quadratic algebraic expression into the multiplication of


two linear terms.

Let us illustrate the power of this proposition with the following example.
Example: Simplify the following fraction
x2 + x − 6
.
x+3
By factorizing the quadratic expression in the numerator x2 + x − 6 we might see
that cancellations will happen. Therefore, we first solve the quadratic equation
x2 + x − 6 = 0. By using the ABC formula, we see that

−1 ± 1 + 4 · 6
x= (5.6)
2·1
and therefore
x1 = 2, and x2 = −3. (5.7)
Applying Proposition 5.9 it follows that
x2 + x − 6 = (x − 2)(x + 3). (5.8)
Using this knowledge we see that
x2 + x − 6 (x − 2)(x + 3)
= = x − 2. (5.9)
x+3 x+3
And so by factorizing the quadratic expression, we have managed to get a cancella-
tion in the fraction, and we are left with a simple linear expression x − 2.
EXC2910 THE FIRST SEMESTER 18

6. Systems of linear equations

6.1. Two equations and two unknowns. In section 4 we learned how to solve
equations of the form
2x − 3 = 4x + 9. (6.1)
In this section we will take this type of equations one step further by introducing
one more unknown variable y. To this end, consider the equation
2x = y − 3. (6.2)
To solve this equations we try to find a pair of numbers (x∗ , y ∗ ) which is such that if
we replace x with x∗ and y with y ∗ then the right hand side is equal to the left hand
side. However, it is not difficult to see that there must be infinitely many pairs of
numbers (x∗ , y ∗ ) satisfying this equation. Indeed, note that if we choose for example
x∗ = 1 then y ∗ = 5 will be a solution. Similarly for x∗ = 2 then y ∗ = 7 is a solution.
By only having one equations we can think that this is too little information in order
to determine one unique solution in the case where we have two unknowns (i.e. x
and y).
Let us therefore introduce one more equation, so that we consider the system of
equations:
(I) 2x = y − 3
(6.3)
(II) − x + 3 = y.
Now we have two equations with two unknowns, where the labels (I) and (II)
denotes the two equations. To solve this system, we will follow a simple strategy:
First consider equation (I) and solve this for the unknown y. We see that y = 2x−3.
We then insert this information into equation (II), that is, we replace y in equation
(II) by 2x − 3 (as y must equal to this value). From equation (II) we then find that
−x + 3 = 2x − 3 =⇒ x = −6.
We have therefore found a value for x. Inserting this value (x = −6) back into the
original equation (I) we find
2(−6) = y − 3 =⇒ y = −9.
We have therefore found out that (x∗ , y ∗ ) = (−6, −9) is a solution to the system of
equations in (6.3). This solution is in fact unique, in the sense that there is no other
pair of numbers (x∗ , y ∗ ) that will solve this equation, the solution we have found is
the only one.
It turns out that in order to find a unique solution to a system of linear equations
we will require in general the same number of unknown variables as the number
of equations. In our latest example we had a system with two equations and two
unknowns, which allowed for a unique solution.
EXC2910 THE FIRST SEMESTER 19

In the following we will describe a general procedure in order to solve a system of


two equations with two unknowns by using the method of substitution.
Solving two equations with two unknowns: Consider the following (abstract)
system of two equations in two unknowns
(I) 2x =4y − 2 (6.4)
(II) − x =y + 3. (6.5)
Step 1: Assume that one of the variables (either x or y from either equation (I)
or (I)) is known, and solve it for the other unknown variable. For example, in (I)
we assume that y is known and solve for x. Dividing by 2 on both sides, we then
find that x = 2y − 1.
Step 2: Substitute the x variable in Equation (II) by the solution obtained for
(I) in step 1. In Equation (II) we then get that −(2y − 1) = y + 3. Rearranging
this equation, we can get a solution for y given by
2
y=− . (6.6)
3
Step 3: Now that we know the value of y we insert this back into (I) in order
to find the value for x. We then find that x = −4 13 − 1 = − 73 . The solution is
therefore given by (x∗ , y ∗ ) = (− 37 , − 23 ).

Exercise 6.1. Solve the following systems of equations:


System 1:
4x − 3y =2
(6.7)
−3x + y =1
System 2:
2x = − y + 1
(6.8)
−2x + y = − 1
System 3:
x − y =2
(6.9)
x − 2y =1
Exercise 6.2. Let a be a real number. Consider the system of equations given by
x − y =a
(6.10)
x − 2y =1.
Determine the value of a which is such that (x∗ , y ∗ ) = (9, 4) is the only solution to
the above system.
EXC2910 THE FIRST SEMESTER 20

7. Inequalities

With the real numbers comes a natural order of the elements contained in the
set of real numbers. For example, we have that 1 is smaller than 2. We then write
1 < 2 (this means in fact that 1 is strictly smaller than 2).
While equations investigates when two algebraic expressions are equal, inequalities
investigate when one algebraic expression is either larger or smaller than some other
algebraic expression. Let us first recall the four different symbols we will use: let a
and b be two unknown numbers
• if a < b then "a is strictly less than b" (meaning that a is not equal to b)
• if a > b then "a is strictly larger than b" (meaning that a is not equal to b)
• if a ≤ b then "a is less or equal to b" (meaning that a may be equal to b)
• if a ≥ b then "a is greater or equal to b" (meaning that a may be equal to b)
Suppose I have two different unknown quantities: 2x − 4 and 6x + 2, and I am
interested in knowing the answer to the following questions "for what values of x
will 2x − 4 < 6x + 2? ". To answer this problem, we can treat the inequality in
much the same way as we treat equations; we may add, subtract, multiply or divide
by numbers on each side of the inequality. To solve the above problem, we want to
get x alone on the left hand side, and the known numbers on the right hand side.
We add 4 and subtract 6x to both sides, and see that

2x − 4 < 6x + 2 ⇐⇒ 2x − 6x < 2 + 4 ⇐⇒ −4x < 6.

Now we have isolated the x terms on the left hand side and we have a number
on the right hand side. But we must now be careful. Because in contrast to the
methodology for solving equations, something special happens with inequalities if
we multiply or divide both sides by a negative number. We summarize this in the
following rule
Rule: Suppose that −a ≤ b (respectively a < b). Then multiplying both sides
by the negative number −c we get ca ≥ −cb (respectively ca > −cb). Equivalently,
if we divide by −c we get ac ≥ − cb (respectively ac > − cb ).
This rule tells us that if we multiply by −1 (or any negative number) then we
must switch the inequality sign.
Going back to our example we divide by −4 on each side and see that
6 3
− 4x < 6 ⇐⇒ x > − ⇐⇒ x > − . (7.1)
4 2
Thus the solution to the inequality is given by all x greater than − 32 , i.e. x > − 32 .
This means in particular that if we choose any number greater than − 32 and replace
x in the inequality 2x − 4 < 6x + 2, then the left hand side will be smaller than the
right hand side, and we say that the inequality holds.
EXC2910 THE FIRST SEMESTER 21

Let us work through one more elementary example:


Example: Solve the inequality

− 5x + 3 < −8x. (7.2)

Here we subtract 3 and add 8x on both sides to see that

− 5x + 3 < −8x ⇐⇒ −5x + 8x < −3 ⇐⇒ 3x < −3. (7.3)

Dividing both sides by 3 we see that x < −3 which is then the solution to the
inequality.

Exercise 7.1. Solve the following inequalities


(1) 2x − 3 + 5x < 2x
(2) −3 > 2x + 5
(3) 2x
4
− 13 > −5x+4
12

7.1. Sign diagrams. For more complicated inequalities involving for example sec-
ond order algebraic expression it is very useful to do a systematic investigation of
the solution by using a Sign diagram. In this section we will learn how to use this
diagram, and we will illustrate its usefulness.
Consider the general quadratic inequality

ax2 + bx + c ≥ 0. (7.4)

From the previous section we know how to solve the equation ax2 + bx + c = 0 by
using the ABC formula. Furthermore, in Section 5.2 we saw that if x1 and x2 are two
solutions to the quadratic equation, then we can factorize the quadratic expression

ax2 + bx + c = a(x − x1 )(x − x2 ).


Thus we may rewrite the expression on the left hand side in (7.4), and solve the
following inequality
a(x − x1 )(x − x2 ) ≥ 0. (7.5)
In plain words, to solve the inequality we must find the values of x which are such
that a(x − x1 )(x − x2 ) is positive. To this end, recall that the product of two
numbers a and b (i.e. ab) is positive whenever a and b are positive or whenever a
and b are negative. While if either a or b is negative while the other is positive, the
product will be negative. To solve the inequality it is therefore sufficient to figure
out when each of the factors are both either positive or negative. To do this in a
systematic way, we use something called the sign diagram. In the sign diagram,
we can analyse each of the factors x − x1 and x − x2 separately to find out when each
of them are positive and when they are negative. Recall now that x is the variable
while x1 and x2 both represent known numbers.
EXC2910 THE FIRST SEMESTER 22

Assume for now that a > 0. The sign diagram to analyse the expression a(x −
x1 )(x − x2 ) is written as follows:

a(x − x1 )(x − x2 )

x1 x2
———————|———————|———————
(x − x2 ) −−−−−−−−−|−−−−−−−−−0 + + + + + +
(x − x1 ) −−−−−−−−−0 + + + + + + | + + + + + +
a +++++++++| + + + + + + | + + + + + +
a(x − x1 )(x − x2 ) + + + + + + 0− − − − − − 0 + + + + + +

The first horizontal line is to represent the x-axis; the potential values of x on the
real number line. In the second line, we analyse the first factor (x − x2 ), and we
ask our self; "For what values of x will x − x2 be positive, negative or 0?". When
x < x2 it is clear that x − x2 is going to be negative. This is then represented with
"minus sign line" − − −− in the diagram. (x − x2 ) is negative until we see that it
is 0 for x = x2 . Then for x > x2 it is positive, which is represented with a "plus
line" + + +. We analyse the factor x − x1 in the same way. Since a is assumed to
be a positive number, we represent this factor as something positive for any values
of x (it is indeed not depending on x as it is a fixed number). By multiplication of
the signs of the three factors we then find out when the product a(x − x1 )(x − x2 )
is positive, negative or equal to 0 in the last line. We can therefore read of the
solution. to the original inequality a(x − x1 )(x − x2 ) ≥ 0 by looking at the last line
in the sign diagram, and we find the solution: x ≤ x1 or x ≥ x2
Example Solve the inequality

−x2 − x + 12 ≥ 0.

Solution: To solve this it is useful to first factorize the quadratic expression, so


that we can analyse the solution in a sign diagram. Using the techniques in Section
5.2, we use the ABC formula to find x1 and x2 :

1 ± 1 + 4 · 12 1±7
x= = .
−2 −2
We therefore have that x1 = −4 and x2 = 3, and since a = −1 it follows that

−x2 − x + 12 = −(x − 3)(x + 4).

Rewriting the inequality, we are interested in solving

−(x − 3)(x + 4) ≥ 0,
EXC2910 THE FIRST SEMESTER 23

i.e. "For what values of x is −(x − 3)(x + 4) positive?". Analysing each parts
separately, we create the following sign diagram:
a(x − x1 )(x − x2 )

−4 3
———————|———————|———————
(x − 3) −−−−−−−−−|−−−−−−−−−0 + + + + + +
(x + 4) −−−−−−−−−0 + + + + + + | + + + + + +
−1 −−−−−−−−−| − − − − − − | − − − − − −
a(x − x1 )(x − x2 ) − − − − − − 0 + + + + + + 0− − − − − −
In the last line of the sign diagram we can now read of the solution to the inequality:
−4 ≤ x ≤ 3.

Exercise 7.2. Use the sign diagram method to solve the following inequalities:
(1) (x + 1)(x − 4) ≥ 0
(2) (x − 3)(x + 2) ≤ 0
(3) x2 − 2x + 21 < 1
(4) −2x2 + 4x − 4 < 0
x2 −3x−4
(5) (x−1)(x−4)
≥ 0.
EXC2910 THE FIRST SEMESTER 24

8. Functions

Functions are used to describe the relationship between two variables. Given an
input variable, a function will provide us with a corresponding output variable. FOr
example, in economics we know that there must be a relationship between the price
of a product, and the demand of the same product. If the price is low, then demand
increases, and if the price is high, the demand decreases. In this example, we can
interpret the price p as the input of a function f which tells us the demand for
the product for a given price. When the function receives an input variable p, we
evaluate the function f (p) which then assigns a number for the demand at that price
level. How the function f assigns a number for demand given a price level p must
then be specified with a mathematical expression. For example, the function could
be given by
f (p) = 100 − 2p.
Here, p is the input variable, and f (p) is the output variable. The expression 100−2p
provides us with a simple recipe for how to transform the input variable into an
output variable. Remember that p represents in this example the price of a given
product (which is a positive number). Then the function tells us that if the price is
p = 4, then the demand for the product (i.e. the number of products we will sell)
is equal to f (4) = 100 − 2 × 4 = 92. If the price is p = 30 (a significant increase in
price from p = 4), then the demand is f (30) = 100 − 2 × 30 = 40. We see that the
function provides us with the desired relationship between price and demand.
In general, we think of the function as the component which connects the numbers
of two sets. Let X and Y be two collections of real numbers (for example, X and
Y could be any real number, or only the real numbers that are between 0 and 1,
or some other collection). The function f assigns to each element in X exactly one
element of Y . We can think of this procedure as in the following diagram
X 7→ f (x) 7→ Y. (8.1)
Thus for each x in the set X, we obtain a value y in the set Y , and we have that
y = f (x). In most cases in these notes, both X and Y will be the set of real numbers
R (that is; all real numbers). Before moving on to a a systematic study of various
elementary functions, we will provide a generic definition of a function.
Definition 8.1. A function f from a set X to a set Y assigns an element of X to
an element of y, such that y = f (x). For each x in X, the notation f (x) means
that the function f is evaluated in the point x. The set X is then called the domain
(often denoted by D) and Y is called the range.
When both the domain and range of a given function is the set of real numbers
R, then a function can be graphically represented in a two-dimensional coordinate
EXC2910 THE FIRST SEMESTER 25

(a) f (x) = x3 − x + 1 (b) f (x) = 3 − x

Figure 8.1. Two different functions graphically represented

system, as seen in Figure 8.1. The horizontal line in the coordinate system is called
the x-axis, and the vertical line is called he y-axis. This two lines cross in the point
(x, y) = (0, 0), called the origin. In order to create a sketch of a function in a
coordinate system, it is useful to create a table where different x values are matched
with different y values trough the application of the function f . Let us look at one
example.
Example: Consider the function f (x) = 2x + 3 with X = Y = R. We will now
compute the function value for a few different values of x that will be represented
in a table:
x f (x) = y
−3 f (−3) = −3
−2 f (−2) = −1
−1 f (−1) = 1
0 f (0) = 3
1 f (1) = 5
2 f (2) = 7
3 f (3) = 9
The above table provides us with coordinates in order to sketch the graph of the
function in to a coordinate system. Note that in a coordinate system, each point
in the two dimensional plane is represented by one x value, and one y value (the
function value). Thus, from the first line in the table, we find the coordinate (x, y) =
(−3, −3), and we can continue in a similar way for the rest of the lines in the table.
This gives us:

8.1. Linear functions. We will in this section look closer at linear functions, also
called "straight lines". We begin with a definition:

Definition 8.2. Given two parameters a and b, a linear function is given by

f (x) = ax + b. (8.2)
EXC2910 THE FIRST SEMESTER 26

Figure 8.2. The graph of f (x) = 2x + 3.

Here, x is the variable, and for each x in the domain y = f (x) assigns a value in the
range. The parameter a is called the slope, and b is called the intercept.

The slope parameter of a linear function describes the increase or decrease of the
function, given an increase in the variable x. For example, if a = 2, then it means
that the function value f (x) will increase by 2 if we increase the x value by 1. If the
slope parameter is a = −3, it means that the function value f (x) will decrease with
−3 if we increase the x value by 1.
The intercept parameter tells us where the straight line is crossing the y axis; that
is, when x = 0. For example, if b = −5, it means that the straight line intercepts
the y axis when y = −5.
The slope and the intercept completely characterize any straight line in a coordi-
nate system. That means; if we know the slope and the intercept.
Any straight line that we can draw in a coordinate system (for example the straight
line in Figure 8.2) can be represented as a linear function. In fact, given only two
points in a coordinate system, call them (x1 , y1 ) and (x2 , y2 ), there is a unique line
that intersects both of these two points, and this straight line can be described by
a linear function f (x) = ax + b. The challenge is then to infer from the two points
what the slope a and b should be.
Given the assumption that the two points are coming from a linear function, we
must have that the following system of equations holds:

y1 =ax1 + b
(8.3)
y2 =ax2 + b.

Note that here x1 , x2 , y1 , y2 are known numbers to us, but a and b are unknown. The
system of equations must therefore be solved with respect to a and b. Rewriting the
system of equations slightly, we see that

y1 − ax1 =b
(8.4)
y2 − ax2 =b.
EXC2910 THE FIRST SEMESTER 27

In particular, this must mean that the left hand side in the first equation is equal
to the left hand side in the second equation, i.e.

y1 − ax1 = y2 − ax2 .

Solving for a we see that


y2 − y1
a= .
x2 − x 1
We can then insert this knowledge into one of the previous equations to find out b.
We summarize our findings in the following proposition.

Proposition 8.3. Given two coordinates (x1 , y1 ) and (x2 , y2 ), the straight line that
intersects both of these points are given by f (x) = ax + b, where
y2 − y1
a= , (8.5)
x2 − x 1
and b = y1 − ax1 .

Let us illustrate this proposition with the following example: Problem: Given
the two coordinates (x1 , y1 ) = (2, 3) and (x2 , y2 ) = (−1, 6), derive the straight line
that intersects both these points.
Solution: We need to find a straight line f (x) = ax + b that intersects the two
given points. This means that we need to figure out the value for a and for b in the
linear function. Using the formula for a in (8.5), we have that
6−3
a= = −1 (8.6)
−1 − 2
and then b = 3 − (−1)2 = 5. Thus the straight line is given by the function

f (x) = −x + 5. (8.7)

Exercise 8.4. Find the straight line (linear function) that intersects the following
points:
(1) (1, 5) and (−3, 2)
(2) (−5, 5) and (5, −5)
(3) (10, 1) and (5, −5)
(4) (1, 1000) and (2, 2500)

Given two linear functions f (x) = ax + b and h(x) = a′ x + b′ for some given
numbers a, b, a′ , b′ , we could ask our self; when will the straight line generated by
f (x) intersect the straight line generated by h(x)? Said differently, for which value
of x will the two lines cross?
We can answer this question graphically by sketching the two straight lines into
a coordinate system, and see where the two lines intersect. This is illustrated in
EXC2910 THE FIRST SEMESTER 28

Figure 8.3. The graphs of f (x) = 2x − 8 and h(x) = 10 − x.

Figure 8.3. There, we consider the example of f (x) = 2x − 8 and h(x) = 10 − 6,


and we can see that the two lines will meet when x = 6.
However, this can also be found computationally. The two lines will meet when
f (x) = h(x). This provides us with a linear equation that we can solve by elementary
methods; f (x) = h(x) is the same as 2x − 8 = 10 − x which implies that 3x = 18,
and we find that x = 6.

Exercise 8.5. Find the the value for x where the following two lines meet:
(1) f (x) = 2x − 3 and h(x) = −4x + 2
(2) f (x) = x + 4 and h(x) = 3x − 5
√ √
(3) f (x) = −5x + 5 and h(x) = − 5x + 5

Exercise 8.6. Consider the two straight lines f (x) = 10x − b and h(x) = x + 5.
Determine the value of b which is such that the two lines intersect when x = 2.
EXC2910 THE FIRST SEMESTER 29

9. Quadratic functions

Quadratic functions is one of the most fundamental nonlinear functions that we


will analyse. It takes the general form
f (x) = ax2 + bx + c, (9.1)
where a, b and c are given real numbers. Recall that a linear function is such that
if we increase the input, x, by 1 then the function will increase or decrease with
a fixed number. This is true for any value of x. When we work with nonlinear
functions, such as the quadratic function, We have that an increase in the input, x,
by 1 may increase or decrease the function more than a fixed number, and the size
of the increase or decrease typically depends on the x value you use as input. It
is the term ax2 that makes this function nonlinear. To illustrate this, suppose now
that a = 1, and then we see that the difference between (x + 1)2 and x2 is given by
(x + 1)2 − x2 = 2x + 1.
This means that if x = 100 and we increase by 1 then the function will increase
by 2 × 100 + 1 = 201. On the other hand, if x = 2 and we increase by 1 then the
function will increase by 2 × 2 + 1 = 5.
EXC2910 THE FIRST SEMESTER 30

(a) f (x) = 3x2 + 2x − 1 (b) f (x) = −3x2 − 2x + 1001

Figure 9.1. Two different quadratic functions

When sketching a quadratic function into a coordinate system we see that it is


always either shaped as a U or an upside down U ( ∩), as illustrated in Figure 9.1.
Note in particular that in Figure (A) the non linear term is 3x2 , which has a
positive sign in front and the curve is shaped like a U , while in Figure (B) the
nonlinear term is −3x2 , which has a negative sign in front and the curve is shaped
like ∩. In general, it is the sign in front of a in (9.1) that determines if the function
will be shaped like U or ∩.
We summarize this in the following proposition.

Proposition 9.1. Consider the general quadratic function

f (x) = ax2 + bx + c. (9.2)

Then the following statements holds:


(1) If a > 0 then f is shaped like a U and there exists a minimum point of f .
(2) If a < 0 then f is shaped like ∩ and there exists a maximum point of f .
(3) The function f will intersect the y-axis in the point y = c.
(4) If b2 − 4ac > 0 then the function f will intersect the x-axis twice.
(5) If b2 − 4ac = 0 then the function f will intersect the x axis once (in one
point).
(6) If b2 − 4ac < 0 then the function f will never intersect the x axis.

Note that the various properties of the quadratic function has strong ties to the
solvability of quadratic equations and inequalities, considered in previous sections.
In fact, in the analysis of quadratic functions, it will be useful to factorize the
quadratic expression in order to provide computational insights into the graphical
representations.

Proposition 9.2. Let f (x) = ax2 + bx + c for given real numbers a, b, c. Define two
variables √ √
−b + b2 − 4ac −b − b2 − 4ac
x1 := , x2 := .
2a 2a
EXC2910 THE FIRST SEMESTER 31

Then the function f (x) may be represented by


f (x) = a(x − x1 )(x − x2 ). (9.3)

With the factorized version of the quadratic function we are in good shape to
answer interesting questions related to the graph of the function. For example; if we
are interested in knowing where the function f (x) crosses the x-axis, we may simple
ask to solve the equation f (x) = 0, or using the factorized representation of f (x) we
then need to solve a(x − x1 )(x − x2 ) = 0. But this is simple to solve: it is clear that
the solution is given by x1 and x2 . On the other hand, if we want to know when f (x)
is positive, we may try to solve the inequality f (x) > 0, or formulated alternatively
as a(x − x1 )(x − x2 ) > 0. But this is then simply solved in a sign diagram, in the
same way as we have done in Section 7.1.

Exercise 9.3. Determine where (if ) the following functions intersect the x axis,
and provide a sketch of the function:
(1) f (x) = −2x2 − 3x + 10
(2) f (x) = x2 − 2x + 1
(3) f (x) = x2 − 9

It is rather easy to determine the value of x which gives us the largest possible or
smallest possible value for f (x). We call this the maximum or minimum point.

Proposition 9.4. Consider the quadratic function f (x) = ax2 +bx+c. The following
statements holds:
i) If a > 0 then there exists a minimum point (and not a maximum point) for
the function f . The minimum value of f is attained at x∗ = − 2a
b
, and f (x∗ )
is the minimal value.
ii) If a < 0 then there exists a maximum point (and not a minimum point) for
the function f . The maximum is attained at x∗ = − 2a b
, and f (x∗ ) is the
minimal value.

Remark 9.5. Note that the formula for the minimum and maximum point is the
same; it is really the sign of a that will determine if the point that we find is a
maximum or minimum. Recall also that the sign of a determines if the function is
shaped like U or like ∩. See Proposition 9.1.

Another highly interesting feature of the quadratic function is that it is symmet-


ric around it’s maximum or minimum point. We summarize this in the following
proposition.

Proposition 9.6. Let f be a general quadratic function with a minimum or max-


imum point at x∗ (meaning that f (x∗ ) is either the smallest or the greatest value
EXC2910 THE FIRST SEMESTER 32

that f will ever take). Then the graph of f is symmetric around the point x∗ . This
means that for any h > 0 we have f (x∗ + h) = f (x∗ − h).

Exercise 9.7. Determine if the following functions have a maximum or minimum


value (max/min), find the x that gives this max/min value, and compute the maxi-
mum or minimum value that f will take:
(1) f (x) = −2x2 + 5x − 10
(2) f (x) = 4x2 + 4x + 4
(3) f (x) = −bx2 − 3x + 10 where b is a negative number.
2
(4) f (x) = x2 − x −2x+1
x−1

Exercise 9.8 (Difficult problem). Show that if f (x) = ax2 + bx + c then f is


symmetric around its maximum or minimum. That is , show that for any number
h > 0 we have that f (x∗ + h) = f (x∗ − h).

Exercise 9.9 (Difficult problem). Consider the quadratic function


f (x) = 2x2 − 3x + c
for some number c. For what values of c will this function never intersect the x-axis?
EXC2910 THE FIRST SEMESTER 33

10. Polynomials

A polynomial provides us with an extension of the quadratic function. An n-th


degree polynomial is given on the form
Pn (x) = an xn + an−1 xn−1 + . . . + a1 x + a0 ,
where an , an−1 , . . . , a1 , a0 are given real (fixed) real numbers. This is a function of
the variable x, and we see that it consists of different powers of x. Polynomials are
extremely important in mathematics. One of the very nice properties of polynomials
is that they can approximate almost any other type of function! Thus understanding
how to analyse polynomials provides us with a powerful basis in order to analyse
more complicated functions.
We are already well known with factorization of quadratic functions. More gener-
ally, if we know the "roots" (the x values which makes Pn (x) = 0) we can factorize
the polynomial in a similar way. We summarize this in the following proposition.

Proposition 10.1. Let Pn (x) = an xn + an−1 xn−1 + . . . + a1 x + a0 be an n−th degree


polynomial and suppose x1 , x2 , . . . xn are n real solutions to the equation
an xn + an−1 xn−1 + . . . + a1 x + a0 = 0.
Then the following factorization holds
Pn (x) = an (x − x1 )(x − x2 ) . . . (x − xn ). (10.1)

10.1. Polynomial division. Given two polynomials say Pn (x) and Pm (x), we want
to divide one by the other, that is, we need to compute Pn (x) ÷ Pm (x), or written
as a fraction, we want to compute PPmn (x)
(x)
. To do this, we can follow very similar
algorithms as we use when we divide large numbers such as 123 4
. In the following
we will limit our self to the case when we have a third-degree polynomial that is
divided by a first degree polynomial, i.e. we will compute
ax3 + bx2 + cx + d
. (10.2)
a′ x + b ′
How we will be able to do this will be illustrated through practical examples.
Example 1: Compute the following polynomial division (x3 +x2 −5x+3)÷(x−1).
Solution: We have that
(x3 + x2 − 5x + 3) ÷ (x − 1) = ......,
and we need to figure out what to put in place of the dots on the right hand side.
We follow this simple algorithm:
(1) Consider the denominator x − 1 consisting of x and −1; and we ask, what
do I need to multiply x with in order to get x3 (the leading order term in
the numerator). The answer is x2 since x2 × x = x3 (and we write this then
EXC2910 THE FIRST SEMESTER 34

below the x3 term). We also see that x2 × (−1) = −x2 (and we write this
below the x2 term). Therefore we write
(x3 + x2 − 5x + 3) ÷ (x − 1) = x2 ......
−(x3 − x2 )
− 2x2

At last we take the two first terms: x3 + x2 and we subtract the two terms
that we computed: x3 − x2 , and we then get −x2 . This is now the term that
we will work with in the next step.
(2) We must now as our self: "What do we need to multiply x with in order to
get −2x2 ?" The answer is −2x. Now if we multiply −2x by −1 (the second
term in the denominator x − 1) we get 2x. We also need to move the −5x
term down next to the −2x2 term and We therefore now write
(x3 + x2 − 5x + 3) ÷ (x − 1) = x2 + 2x....
−(x3 − x2 )
(−2x2 − 5x)
− (−2x2 − 2x)
− 3x

(3) Now we need to ask our self: "What do we need to multiply x with in order
to get −3x?". The answer is −3, and we note that −3 × (−1) = 3. We
therefore get
(x3 + x2 − 5x + 3) ÷ (x − 1) = x2 + 2x − 3
−(x3 − x2 )
(−2x2 − 5x)
− (−2x2 − 2x)
− 3x + 3
−3x + 3
0

Since the remainder is now 0 we conclude that the answer is given on the
right hand side: x2 + 2x − 3.
Example 2: Compute the following polynomial division (−6x3 + 7x2 + 5x − 3) ÷
(2x − 3).
Solution: We have that

(−6x3 + 7x2 + 5x − 3) ÷ (2x − 3) = ......,


EXC2910 THE FIRST SEMESTER 35

and we need to figure out what to put in place of the dots on the right hand side.
We follow this simple algorithm:
(1) Consider the denominator 2x − 3 consisting of 2x and −3; and we ask, what
do I need to multiply 2x with in order to get −6x3 (the leading order term in
the numerator). The answer is −3x2 since −3x2 × 2x = −6x3 (and we write
this then below the x3 term). We also see that −3x2 × (−3) = 9x2 (and we
write this below the x2 term). Therefore we write

(−6x3 + 7x2 + 5x − 3) ÷ (2x − 3) = −3x2 ......


−(−6x3 + 9x2 )
− 2x2

At last we take the two first terms: −6x3 + 7x2 and we subtract the two
terms that we computed: −6x3 + 9x2 , and we then get −2x2 . This is now
the term that we will work with in the next step.
(2) We must now as our self: "What do we need to multiply 2x with in order
to get −2x2 ?" The answer is −x. Now if we multiply −x by −3 (the second
term in the denominator 2x − 3) we get 3x. We also need to move the 5x
term down next to the −2x2 term and We therefore now write
(−6x3 + 7x2 + 5x − 3) ÷ (2x − 3) = −3x2 − x....
−(−6x3 + 9x2 )
(−2x2 + 5x)
− (−2x2 + 3x)
2x

(3) Now we need to ask our self: "What do we need to multiply 2x with in order
to get 2x?". The answer is 1, and we note that 1 × (−3) = −3. We therefore
get
(−6x3 + 7x2 + 5x − 3) ÷ (2x − 3) = −3x2 − x + 1
−(−6x3 + 9x2 )
(−2x2 + 5x)
− (−2x2 + 3x)
2x − 3
2x − 3
0
Since the remainder is now 0 we conclude that the answer is given on the
right hand side: x2 + 2x − 3.
EXC2910 THE FIRST SEMESTER 36

The two examples above illustrates examples of a polynomial division where


Pn (x)
= Pn−m (x), (10.3)
Pm (x)
meaning that dividing a polynomial of degree n by a polynomial of degree n leaves
us with a polynomial of degree n − m (in the above example; n = 3 and m = 1).
However, in general we can only expect that the following division holds:

Pn (x) a
= Pn−m (x) + , (10.4)
Pm (x) Pm (x)
where a is some number. In the previous two example a = 0. In the next example,
we will consider a polynomial division where a ̸= 0
Example 3: Compute the following polynomial division (x3 +x2 −2x−3)÷(x−1).
Solution: We have that

(x3 + x2 − 2x − 3) ÷ (x − 1) = ......,

and we need to figure out what to put in place of the dots on the right hand side.
We follow this simple algorithm:
(1) Consider the denominator x − 1 consisting of x and −1; and we ask, what
do I need to multiply x with in order to get x3 (the leading order term in
the numerator). The answer is x2 since x2 × x = x3 (and we write this then
below the x3 term). We also see that x2 × (−1) = −x2 (and we write this
below the x2 term). Therefore we write
(x3 + x2 − 2x − 3) ÷ (x − 1) = x2 ......
−(x3 − x2 )
2x2
At last we take the two first terms: x3 + x2 and we subtract the two terms
that we computed: x3 − x2 , and we then get 2x2 . This is now the term that
we will work with in the next step.
(2) We must now as our self: "What do we need to multiply x with in order to
get 2x2 ?" The answer is 2x. Now if we multiply 2x by −1 (the second term
in the denominator x − 1) we get −2x. We also need to move the −2x term
down next to the 2x2 term and We therefore now write
(x3 + x2 − 2x − 3) ÷ (x − 1) = x2 + 2x....
−(x3 − x2 )
(2x2 − 2x)
− (2x2 − 2x)
0−3
EXC2910 THE FIRST SEMESTER 37

We see that (2x2 − 2x) − (2x2 − 2x) = 0. But we need to move down the
−3, so we now have 0 − 3. But there is no positive power of x that I can
multiply x with in order to get −3. And therefore, we take the −3 and add
it to the solution by dividing by x − 1, and we get
3
(x3 + x2 − 2x − 3) ÷ (x − 1) = x2 + 2x −
x−1
−(x3 − x2 )
(2x2 − 2x)
− (2x2 − 2x)
0−3
3
The solution is therefore x2 + 2x − x−1
.

10.2. Solving third degree equations. An equation of the third degree is an


equation of the form
ax3 + bx2 + cx + d = 0. (10.5)
An equation of the third degree often has three solutions, x1 , x2 and x3 . In contrast
to the case of quadratic equations where we have the ABC formula, finding these
three solutions might be very challenging. However, if we know one of the solutions,
say x1 , then by using polynomial division, it is not difficult to find the two other
solutions. Indeed, let us denote the three potential solutions of (10.5) by x1 , x2
and x3 , and suppose we know x1 , but the two others are unknown. By polynomial
factorization in Proposition 10.1 we have that

ax3 + bx2 + cx + d = a(x − x1 )(x − x2 )(x − x3 ). (10.6)

Since we know x1 , let us divide both sides by x − x1 . Then we get


ax3 + bx2 + cx + d
= a(x − x2 )(x − x3 ). (10.7)
x − x1
Thus, we can find a(x − x2 )(x − x3 ) by performing the polynomial division on the
right hand side. This will then give us a polynomial of the second degree (quadratic
expression) for which we can use the ABC formula in order to find x1 and x2 . We
will illustrate this methodology by two examples, based on the two first examples
in the previous subsection.
Example 1: One of the solutions to the equation

x3 + x2 − 5x + 3 = 0

is given by x1 = 1. Find the two other solutions x2 and x3 .


Solution:
EXC2910 THE FIRST SEMESTER 38

From Example 1 in the previous subsection, we know that


x3 + x2 − 5x + 3
= x2 + 2x − 3. (10.8)
x−1
Thus in order to find x2 and x3 we must simply find the solutions to the equation
x2 + 2x − 3 = 0. By the ABC formula with a = 1 b = 2 and c = 3, we find two
solutions x2 = 1 and x3 = −3.
We therefore have the three solutions
x1 = 1, x2 = 1, x3 = −3. (10.9)
Note that since x1 = x2 = 1 then we typically say that the equation has two solutions
, rather than counting the same solution twice.
Example 2: One of the solutions to the equation
−6x3 + 7x2 + 5x − 3 = 0
is given by x1 = 32 . Find the two other solutions x2 and x3 .
Solution: Know from example 2 in the previous subsection that
−6x3 + 7x2 + 5x − 3 ÷ (2x − 3) = x2 + 2x − 3
Alternatively, we see that

−6x3 + 7x2 + 5x − 3 = (2x − 3)(x2 + 2x − 3)


or
3
−6x3 + 7x2 + 5x − 3 = 2(x − )(x2 + 2x − 3).
2
Thus, in order to solve 2(x− 23 )(x2 +2x−3) = 0 we simply need to solve (x2 +2x−3) =
0. But this is the same quadratic equation as in the previous example, and we also
find here x2 = 1 and x3 = −3. We therefore have the following 3 solutions: x1 = 32 ,
x2 = 1 and x3 = −3.
EXC2910 THE FIRST SEMESTER 39

11. Limits and Asymptotes

A central topic in the field of mathematics is the analysis of functions. To under-


stand how different functions will behave when the input x changes or approaches
critical values will provide us with useful information towards potential applications
in business and economics. We have so far analyzed linear and quadratic functions
through understanding the shapes of their curves purely from seeing the function
expression, and to mathematically compute maximum and minimum points.
In this section we will analyse how the behavior of functions when the input
approaches certain "critical values". To this end we will need to use a mathematical
operation called limit. For example, we are interested in understanding the what
happens with the function f (x) = x1 when x approaches infinity (x gets larger and
larger and is never stopping to get bigger). To this aim, note that if x = 100, then
1
f (100) = 100 , a quite small number close to 0. If we choose a larger x, say x = 10 000
then f (10 000) = 10 1000 , an even smaller number, closer to 0. In fact, the larger we
choose x, the closer f (x) will get to 0. In principle we could go on making x larger
forever... we may choose x "infinitely large", which would result in making f (x)
"infinitely close to" 0. Writing this with mathematical notation we say x → ∞ to
describe "x approaches infinity (∞)), and we write

lim f (x) = 0,
x→∞

to say "the limit of f (x) when x approaches infinity is 0".


Example: Compute the limit of f (x) = 5 + x2 when x → ∞. That is, compute
2
lim 5 + .
x→∞ x
Solution: Observe first that the function f (x) can be divided into two terms; 5
and x2 . The term 5 is not affected by x, and so letting x approach ∞, this term will
still stay 5. For the second term, we see that x2 approaches 0 when x approaches
∞, or written mathematically, x2 → 0 when x → ∞. Therefore, we conclude that
f (x) = 5 + x2 will approach 5 when x approaches ∞, or in mathematical terms:
2
lim 5 + = 5.
x→∞ x
This calculation also means that f (x) will get closer and closer to the value 5 when
x gets larger and larger. We call this value then a Horizontal Asymptote.
g(x)
Proposition 11.1. Consider the function f (x) = h(x) where g(x) and h(x) are
polynomial of the same degree. Then we find the horizontal asymptote y is given by
g(x)
y = lim f (x) = lim
x→∞ x→∞ h(x)
EXC2910 THE FIRST SEMESTER 40

Example: Find the Horizontal asymptote (HA) for the function


2x − 3
f (x) = .
−x + 2
Solution We know that (HA) is found by y = limx→∞ f (x). Since f (x) is given
as a fraction, we first observe that both the numerator and the denominator → ∞
when x → ∞. However, by factorizing we see that
x(2 − x3 ) 2 − x3
f (x) = = .
x(−1 + x2 ) −1 + x2
Now we see that when x → ∞ then in the numerator we have 2 − x3 → 2 and in the
denominator −1 + x2 → −1 as x → ∞. Therefore, we see that
2
lim f (x) = = −2.
x→∞ −1
Proposition 11.2 (Formula for HA). Let a, b, c, d be real numbers, and suppose
ax + b
f (x) = .
cx + d
Then the horizontal asymptote (HA) is given by
a
y= .
c
Instead of investigating the behavior of a function when the input gets very large
(approaches infinity), we may also be interested in using the concept of limits to
describe potential x values, where a function may not be defined (or "be infinite").
Going back to the function f (x) = x1 , then we know that x cannot be 0 since 10 is not
defined. But what happens with f (x) when x approaches 0? That is, we imagine
that we choose x values which are larger than 0, but gets closer and closer to 0. So,
for example, choosing x = 21 , then we see that f ( 12 ) = 2. Moving closer to 0, we
1
see that f ( 100 ) = 100 and f ( 10 1000 ) = 10 000. Thus, the closer we move x towards
0 the function gets larger and larger. In fact, when x approaches 0 then f (x) will
approach ∞. We say that f (x) = x1 has a singularity in x = 0. Note that in this
example we chose x values greater than 0 and moved down towards 0. We then
write
lim f (x) = ∞. (11.1)
x↓0
It is also possible to approach 0 for x values that are smaller than 0 (i.e. nega-
tive numbers) and moving up towards 0. But we then see that f (− 21 ) = −2 and
1
f (− 100 ) = −100. Thus, when x approaches 0 from below, then f (x) will approach
−∞! We then write
lim f (x) = 0. (11.2)
x↑0
We see that when x approaches 0 the value of the function tends towards ±∞.
Graphically, one can think of this as the function moving up along the y-axis; it
EXC2910 THE FIRST SEMESTER 41

"explodes" when x approaches 0, and we say that x = 0 is a critical value for the
function f (x) = x1 . The straight line that can be drawn vertically from this critical
value is then called the Vertical Asymptote.
g(x)
Proposition 11.3. Consider the following function given as a fraction f (x) = h(x) ,
∗ ∗
where g(x) and h(x) are functions. If there exists point x which is such that h(x ) =
0, then x∗ is a point for a Vertical Asymptote (VA) of the function f (x). Thus;
to find the (VA) we simply need to solve the equation h(x) = 0.

Example: Find the vertical asymptotes of the function f (x) = 2x−1


x+4
.
Solution: From Proposition 11.3 we know that we only need to check when the
denominator is 0, which is the same as solving the equation x + 4 = 0. But this is
straight forward to check; x = −4. So the (VA) will be at x = −4.

Exercise 11.4. Find (HA) and (VA) of the following functions:


2x+2
(1) f (x) = −3x+1
100x+2
(2) f (x) = 10−20x
2x2 +2
(3) f (x) = −3x2 +1
−5x+2
(4) f (x) = 2x−5

Exercise 11.5. Determine the number a which is such that


ax−3
(1) f (x) = 2x
has (HA) y = 1.
2x2 −a
(2) f (x) = x−5a
has (VA) at x = 10.
EXC2910 THE FIRST SEMESTER 42

12. Differentiation

Recall that a function f takes in real numbers x in order to produce (a possibly


new) real number f (x). A function is a nice way to represent how one quantity is
in a direct relationship to another quantity. For example, when going for a walk in
the mountains, the number of kilometers that we walk, depend on how much time
we have spent walking. We can therefore let the variable x represent the amount
of time we have used; say x = 1 means that we have walked for 1 hour and x = 12
means that we have walked for 30 minutes. Then we let f (x) represent the number
of kilometers we have walked after x amount of time. For example; when x = 10
(we have walked for 10 hours), then the number of kilometers we have walked (f (x))
might be equal to 20.
Given that we have specified a relationship between the amount of time we have
spent walking and the distance we have travelled through a function f , we could be
interested in answering other questions related to this relationship. Such as; what
was the average speed that we had between a specific time x0 and x1 ? (recall that
speed is often defined as kilometers per hour) This we can find out by computing
the change in the distance we have travelled between these two points in time, and
then dividing by the difference between these two points:
f (x1 ) − f (x0 )
average speed between x0 and x1 = .
x0 − x1
For example; We could wonder what was the average speed we had from having
walked for 15 minutes ( 14 - hour) and 1 hour. Suppose the distance we have travelled

is represented by f (x) = 5 x. Then we find the speed:
√ q
5 1 − 5 14
Speed = ≈ 3.34 km/h.
1 − 41
The speed found above was the average speed held over a time period of 45
minutes. While it could be more interesting to know what was the instantaneous
speed held in a specific moment in time; say after walking 30 minutes? This is
certainly more challenging find. However, by the same methodology as above we
can look at the limit of the relative change when we approach x = 21 (i.e. 30 minutes).
To find this, we need to compute
f ( 12 + h) − f ( 21 )
speed held af ter 30 min walk = lim . (12.1)
h→0 h
We consider the instantaneous relative change around the point x = 12 . This in-
stantaneous relative change is called the derivative, and we say that we differentiate
the function f in the point x = 12 . With this in mind, we provide the following
definition:
EXC2910 THE FIRST SEMESTER 43

Definition 12.1. Let f be a function. For a given point x we define


f (x + h) − f (x)
f ′ (x) = lim . (12.2)
h→0 h
Whenever this limit exists (i.e. it is a finite number) we say that f ′ (x) is the
derivative of f in the point x. If f ′ (x) exists for all points x, we say that f is
differntiable (or continuously differentiable).

As we will see later in the curriculum, derivatives of functions will play a central
role in the analysis of different properties of functions. However, the reader might
think that the definition of the derivative looks complicated, and difficult to use in
practice. Fear not; there are several rules for computing the derivative of specific
functions. And it is these rules that we will use throughout the course to compute
derivatives of various functions, and use in the analysis of the graphs produced by
these functions. The next section will recall all these rules.

Exercise 12.2. Use the definition of the derivative in (12.2) to differentiate the
following functions
(1) f (x) = K for some constant number K.
(2) f (x) = 12 x − 2
(3) f (x) = (2 − x)2
EXC2910 THE FIRST SEMESTER 44

13. Rules of differentiation

Let a and n be real numbers (constant), and suppose g, h, u and v represents


functions. We let ′ be the notation for the derivative function; e.g. for a function f ,
the derivative is denoted by f ′ (and similarly for g and h)
• (Constants) if f (x) = a then

f ′ (x) = 0

.
• (Power functions) If f (x) = axn then

f ′ (x) = anxn−1

• (Linearity) If f (x) = g(x) + h(x) then

f ′ (x) = g ′ (x) + h′ (x)

• (Product rule) If f (x) = u(x)v(x) then

f ′ (x) = u′ (x)v(x) + u(x)v ′ (x)


u(x)
• (Quotient rule) If f (x) = v(x)
then
u′ (x)v(x) − u(x)v ′ (x)
f ′ (x) =
v(x)2
• (Chain rule) If f (x) = g(h(x)) then

f ′ (x) = g ′ (h(x))h′ (x)

13.1. How to differentiate a function. When we want to differentiate a function,


the first thing we need to do is to identify what type of function we are dealing with.
For example, if we are given the function

f (x) = 2x3 + 4x−2 ,

the first thing we observe is that it is constructed from the sum of the two terms
2x3 and 4x−2 . We can therefore identify these to terms by two functions g(x) and
h(x) by saying g(x) = 2x3 and h(x) = 4x−2 , and thus we immediately that we will
need to use the linearity rule. Secondly, we observe that both g and h in this case
are given as power functions (for g we see that a = 2 and n = 3, and for h we see
that a = 4 and n = −2). Thus in order to differentiate these functions we need to
follow the rule for power functions. By this rule, we see that

g ′ (x) = 2 · 3x3−1 = 6x2

and
h′ (x) = 4 · (−2)x−2−1 = −8x−3 .
EXC2910 THE FIRST SEMESTER 45

Thus combining these two results with the rule of linearity, we find that

f ′ (x) = g ′ (x) + h′ (x) = 6x2 − 8x−3 . (13.1)

Once you learn these rules, the considerations done above will quickly be com-
puted, and the derivative is easily found.

Remark 13.1. Sometimes we use different labels for functions. Most of the time, you
might be used to writing f (x) = ... while it is perfectly fine to label the function
with some other letter or symbol. In mathematics it is quite common to use the
Greek alphabet to supplement the Roman alphabet. For example α(x) = x2 is just
another label for the function x2 . In the next sections we will use several different
labels for functions to get used to this.

13.2. Exponential and logarithmic functions. We also need some rules for dif-
ferentiation of the exponential function ex and the natural logarithm ln(x). Recall
that these functions satisfy the following properties:
• eln(x) = x
• ln(ex ) = x
• ex+y = ex ey
• (ex )n = enx
• ln(xn ) = n ln(x)
• ln(xy) = ln(x) + ln(y)
• ln( xy ) = ln(x) − ln(y).
The above properties would be smart to remember. You will remember them by
doing several exercises.
These functions satisfy the following rules for differentiation:
• If f (x) = ex then f ′ (x) = ex
• If f (x) = ln(x) then f ′ (x) = 1
x

We also have some special rules; which can be seen as combinations of the rules of
differentiation for the natural logarithm/exponential function and the general rules
for differentiation above:
• if f (x) = eu(x) then f ′ (x) = eu(x) u′ (x)
• If f (x) = ln(u(x)) then f ′ (x) = u(x)1
u′ (x)

13.3. Exercises. We illustrate the rules for differentiation with the following exer-
cises:

Exercise 13.2 (Power functions). Differentiate the following functions with respect
to x:
(1) f (x) = 9x−2
EXC2910 THE FIRST SEMESTER 46

(2) f (x) = 12 x−10


(3) g(x) = 4h(x) where h(x) = 2x2

(4) l(x) = x
(5) p(x) = √7x
(6) α(x) = nxγ−1
Solutions will be found in the end of this article.

Exercise 13.3 (Linearity). Differentiate the following functions with respect to x:


(1) f (x) = 3x5 − ex + 5
(2) f (x) = x1 − x12 + c
(3) g(x) = xn + x−n − 10
(4) α(x) = 4x4 + 3x3 + 2x2 + x + 1
(5) f (x) = xn + xn−1 + xn−2 + . . . + x2 + x1 + 1

Exercise 13.4 (Product rule). Differentiate the following functions with respect to
x:
(1) f (x) = ex x3
(2) f (x) = ln(x)x2
(3) f (x) = g(x)x−5
(4) h(x) = 2x−2 4x3

Exercise 13.5 (Quotient rule). Differentiate the following functions with respect to
x:
(1) f (x) = 2x−3
4x+1
(2) f (x) = x14
(3) g(x) = h(x)
x2
+5
3x
(4) f (x) = √x + 4

Exercise 13.6 (Chain rule). Differentiate the following functions with respect to x:
(1) f (x) = (3x + 2)2
(2) f (x) = 1 − ln(x3 )
(3) g(x) = e−3x+2
(4) f (x) = (100x100 − 99x99 )2

Exercise 13.7 (Mixed rules). Differentiate the following functions with respect to
x:
(2x−3)3
(1) f (x) = 4x+1
2
ex
(2) f (x) = x4
(5x+ 2x+1 )−2
(3) g(x) = x
x
2
−1
(4) f (x) = √3x −2
( x+2)
EXC2910 THE FIRST SEMESTER 47

14. Tangent line

Recall that any straight line y(x) is given on the form of a linear function

y(x) = ax + b, (14.1)

where the a is called the slope and b is called the intercept.


Consider two points on the function f , for example given by (x1 , f (x1 )) and (x1 +
h, f (x1 + h)) (note that the addition of a positive value h to the point x1 moves us
to the right on the x axis). The secant line (the straight line) between these two
points can be found by identifying the correct slope a and b. These two parameters
can in this case be found as follows: The slope is given by the relative change in f
between the two points, i.e.
f (x1 + h) − f (x1 ) f (x1 + h) − f (x1 )
a= = . (14.2)
x1 + h − x 1 h
The intercept b can then be found as follows

b = f (x1 ) − ax1 .

Replacing a and b in (14.1) with the two quantities found above, we obtainthe
following formula for the secant line intersecting the points (x1 , f (x1 )) and (x1 +
h, f (x1 + h)) :
f (x1 + h) − f (x1 ) f (x1 + h) − f (x1 )
y(x) = x + f (x1 ) − x1
h h
f (x1 + h) − f (x1 )
= f (x1 ) + (x − x1 )
h
What happens then to this line when the points (x1 , f (x1 )) and (x1 + h, f (x1 + h))
is chosen closer and closer to each other? and in particular, when they are infinitely
close to each other? (i.e. when we consider the limit h → 0). Then we obtain the
tangent line; the straight line which "just touches" the curve in one point. The
derivative of the function f plays a central role in describing this line. We summarize
this in the following proposition.

Proposition 14.1. Let f be a differentiable function, and let x1 be a point on the


x-axis. The tangent line y(x) touching the function f in the point (coordinate)
(x1 , f (x1 )) is given by the formula

y(x) = f (x1 ) + f ′ (x1 )(x − x1 ).

Remark 14.2. Note that the tangent line y is a linear function of x (convince yourself
that it is a linear function). x1 is in this case considered to be fixed (constant). Also
note that this formula looks indeed like the formula for the secant line, but where
we have taken the limit when h → 0.
EXC2910 THE FIRST SEMESTER 48

In order to compute the tangent line, we see that we need to be able to compute
the derivative of a function f (x). The following exercises will require to compute
the tangent line.

14.1. Exercises.

Exercise 14.3 (Tangent lines). Compute the following tangent lines:


(1) Let f (x) = ex and compute the tangent line when x1 = 1, i.e. the tangent
line to the point (1, f (1)).
(2) Let f (x) = 12 x2 and compute the tangent line when x1 = 2, i.e. the tangent
line to the point (2, f (2)).
(3) Let f (x) = 21 x−2 and compute the tangent line when x1 = 3, i.e. the tangent
line to the point (3, f (3)).
(4) Let f (x) = (x2 + 2x − 1)2 and compute the tangent line when x1 = 0, i.e.
the tangent line to the point (0, f (0)).
(5) Let f (x) = (x + 1)2 + 100 and compute the tangent line when x1 = −1, i.e.
the tangent line to the point (−1, f (−1)).
(6) Let f (x) = ln(x2 + 3) and compute the tangent line when x1 = 12 , i.e. the
tangent line to the point ( 21 , f ( 12 )).
EXC2910 THE FIRST SEMESTER 49

15. Function Analysis

By knowing the derivative of a function, we can figure out several interesting and
important facts about the the function it self. For example; for what values of x will
the function f (x) increase or decrease? which value of x will give me the maximal
(or minimal) output f (x)? and when does the function change from being convex
to concave (or concave to convex)?
To find the maximal or minimal value of a function, we can simply investigate
when the slope of the tangent is zero (i.e. the tangent line is horizontal). Indeed, the
tangent line will only be horizontal in the point where either the slope changes from
negative to positive or from positive to negative, creating a maximum or minimum
point. Recalling from the last section that the slope of the tangent line is given by
the derivative of the function it self, it is sufficient to figure out when the derivative
of the function is 0. This gives rise to the following definition

Definition 15.1. We say that a real number x0 is a stationary point associated to


the function f if
f ′ (x0 ) = 0

Remark 15.2. Note that there might be more than one stationary point associated
to a function f .

From this definition it follows that in order to find the stationary points x0 we
need first to find the derivative f ′ (x) associate to the function f , and then solve
the equation f ′ (x) = 0. The solution to this equation is then one (or more) real
number(s) which we call stationary points.

Exercise 15.3. Let f (x) = x2 − 2x + 1. We shall now find the stationary points
of this function. We first compute the derivative. Following the rules in the above
sections, we have that
f ′ (x) = 2x − 2
. Now we need to solve the equation
f ′ (x) = 0.
This is the same as solving the linear equation 2x − 2 = 0. It is readily seen that the
solution to this equation is given by x = 1 Thus, the number x = 1 is a stationary
point of the function f .

In order to determine if the stationary point that we have found is a minimum


point or maximum point of f we can use the second derivative. The second derivative
can be used to tell us something about the shape of the function in specific areas.

Proposition 15.4. Let f be a differentiable function. Then the following holds:


EXC2910 THE FIRST SEMESTER 50

i If f ′′ (x) > 0 then f is convex around the point x.


ii If f ′′ (x) < 0 then f is concave around the point x.
iii If there exists a number x1 such that f ′′ (x1 ) = 0 then x1 is an inflection
point (the function changes here from being convex to being concave or from
concave to convex).
We can then use the above rules to determine if a stationary point x0 is a maximum
or minimum point:
Proposition 15.5 (2nd derivative test). Let f be a differentiable function, and let
x0 be a stationary point associated to f . Then the following holds:
i If f ′′ (x0 ) > 0 then f is convex around the point x0 =⇒ x0 is a minimum
point.
ii If f ′′ (x0 ) < 0 then f is concave around the point x0 =⇒ x0 is a maximum
point.
15.1. Recipe for function analysis. When analysing a function typically work
through the following points of interest:
(1) Determine when f (x) = 0, f (x) > 0 and f (x) < 0.
- Solve f (x) = 0, factorize the function, and solve inequalities in sign
diagram.
(2) Find f ′ (x). Determine when the function is increasing or decreas-
ing. Find stationary points.
- The function increases when f ′ (x) > 0 and decreases when f ′ (x) < 0.
Find stationary points by solving the equation f ′ (x) = 0.
(3) Compute f ′′ (x). Determine if stationary points gives a maximum or
minimum value of f . Analyse when the function is convex/concave
or has inflection point.
-Use second derivative test to find max/min. Solve the equation f ′′ (x) =
0 to find inflection point. Factorize f ′′ (x) and use sign diagram to solve
f ′′ (x) > 0 and f ′′ (x) < 0. Use this to conclude when the function is con-
cave/convex.
(4) Sketch the function.

15.2. Example of function analysis. Consider the function


f (x) = x3 − 2x2 − 3x. (15.1)
We will now go through step (1) − (4) of the function analysis for this function.
(1) We begin to determine when f (x) = 0. Replacing f with the function in
(15.1), we have the equation
x3 − 2x2 − 3x = 0 ⇔ x(x2 − 2x − 3) = 0
EXC2910 THE FIRST SEMESTER 51

We see that in order for this to be 0, then either x = 0 or x2 − 2x − 3 = 0.


We therefore need to solve x2 − 2x − 3 = 0. This we can do by the ABC
formula:
p √
2 ± 22 − 4 · 1 · (−3) 2 ± 16 2±4
x= = = (15.2)
2 2 2
This implies that the equation has the two solutions: x1 = 3 and x2 = −1.
This gives us a total of three values for x for which f (x) = 0, namely; x1 = 3,
x2 = −1 and x3 = 0. We can factorize the function f into

f (x) = x(x − 3)(x + 1). (15.3)

Using this, we create a sign diagram for the function, in order to determine
when it is positive and when it is negative.

f (x) = x(x − 3)(x + 1)

−1 0 3
———————|———————|———————|———————
x −−−−−−−−−|−−−−−−−−−0 + + + + + + | + + + + + +
x − 3 −−−−−−−−−| − − − − − − | − − − − − − 0 + + + + + +
x + 1 −−−−−−−−−0 + + + + + + | + + + + + + |+++++++++
f (x) − − − − − − 0 + + + + + + 0− − − − − − 0+++++++++

From the sign diagram we see that f (x) < 0 when x < −1 or 0 < x < 3,
and f (x) > 0 when −1 < x < 0 or x > 3. This completes the answer to
point (1).
(2) We begin to compute the derivative of f :

f ′ (x) = 3x2 − 4x − 3. (15.4)

We use the ABC formula again to find stationary points; i.e. solving f ′ (x) =
0. We see that
√ √ √
4 ± 16 + 4 · 9 4 ± 52 4 ± 2 13
x= = = . (15.5)
6 6 6
√ √
This gives the two solutions: x1 = 4+26 13 and x2 = 4−26 13 . For notational
ease we simply keep calling these two numbers x1 and x2 instead of writing
them explicitly. We can factorize the derivative of f as

f ′ (x) = (x − x1 )(x − x2 ). (15.6)

Using a sign diagram, we see that


EXC2910 THE FIRST SEMESTER 52

f ′ (x) = (x − x1 )(x − x2 )

x1 x2
———————|———————|———————
x − x2 −−−−−−−−−|−−−−−−−−−0 + + + + + +
x − x1 −−−−−−−−−0 + + + + + + | + + + + + +
f ′ (x) + + + + + + 0− − − − − − 0 + + + + + +
From the sign diagram we conclude that f (x) = 0 for x = x1 or x2 , f ′ (x) > 0
for x < x1 or x > x2 , and f ′ (x) < 0 for x1 < x < x2 . This implies that
the function f has stationary points x1 and x3 (which are local minima or
maxima) and is increasing when x < x1 or x > x2 and decreasing when
x1 < x < x 2 .
(3) At last we compute the second derivative f ′′ (x):
f ′′ (x) = 6x − 4. (15.7)
In order to find inflection points, we must solve f ′′ (x) = 0. Since the second
derivative is a linear function, this is simple:
2
6x − 4 = 0 ⇔ 6x = 4 ⇔ x = . (15.8)
3
We therefore have an inflection point at x = 23 . We then need to determine
where the function is convex and where it is concave. This we find by solving
f ′′ (x) < 0 and f ′′ (x) > 0. Since this is a linear equation it is sufficent to
check one of them;
2
6x − 4 < 0 ⇔ x < . (15.9)
3
The second derivative f ′′ (x) < 0 when x < 32 , and is therefore concave for
all x < 23 . The function is then convex for all x > 32 .
(4) At last we include a sketch of the function:
Next, you should try the four steps of function analysis on the following exercise.
EXC2910 THE FIRST SEMESTER 53

Figure 15.1. The graph of f (x).

Exercise 15.6. In the following exercise you are supposed to analyse the given
function by going through step 1-4 above.
(1) f (x) = 2x2 − x
(2) f (x) = ex
(3) f (x) = 3 ln(x)
(4) g(x) = xex
(5) v(x) = (x2 + x−2 )−1
(6) h(x) = ln(x) + ln(x2 ) + ln(x3 )
EXC2910 THE FIRST SEMESTER 54

16. Financial Analysis

Function analysis is an important tool in order to analyse profitability, efficiency,


costs and revenues of a business. Typically, we are first given a relationship between
the demand of a certain product and the price of the same product. Of course, it is
natural to think that the demand and price depends negatively on each other; if the
price increase the demand of the product decreases, and vice versa. The demand of
a good is understood as the number of units sold x, and the price is often denoted
by p. The relationship between the two can often be linear for example; for example
as a function for the demand
x = b − ap. (16.1)
Here the constant b denotes the "maximum estimated demand" when the price
p = 0. The number a is a parameter describing the sensitivity of the demand to a
change in the price; if the price increases with 1 then the demand falls by a.
The relationship can also be reversed; we are often interesting in expressing the
price as a function of the demand. In this case, we simply rewrite (16.1) by placing
p alone on the left hand side, and putting all other terms on the right hand side;
b 1
x = b − ap ⇔ ap = b − x ⇔ p = − x. (16.2)
a b
Thus we see the price as a function of demand as
b 1
p= − x. (16.3)
a b
Once we have a relationship between demand and price, we can simply compute
the total revenue function T R(x) as a function of the number of units sold x. The
total revenue is simply given by the price per unit p multiplied by the number of
units sold x:
T R(x) = px. (16.4)
As the price p can be expressed in terms of the demand x, we get that
b 1
T R(x) = ( − x)x.
a b
To simplify later computations, we can relabel the two constants appearing above
such that α = ab and β = 1b , and then we have

T R(x) = (α − βx)x = −βx2 + αx.

With the total revenue function at hand, we can compute the marginal revenue.
The marginal revenue tells us approximately how much more we will earn by selling
one more unit. The marginal revenue is given as the derivative of the total revenue
function, i.e. T R′ (x). For example, T R′ (40) tells us approximately how much more
we will earn if we increase our sales from 40 units to 41 units.
EXC2910 THE FIRST SEMESTER 55

We are typically given a total cost function T C(x). This function is given on the
form
T C(x) = A + Bx + Cx2 , (16.5)
where A, B, C are real numbers. The number A we can think of as the fixed cost
of the business; the cost which does not change if we increase the number of units
produced. This could be the cost of renting a factory or shop for example. The
number B represents the variable unit costs; typically the cost of producing one
unit, without taking into account the number of units produced. The number C
is probably the most interesting. This number can be used to represents the extra
costs that accumulates if we produce many units. This is to take into account that
if we where to produce many units, we might need to hire extra staff, rent a larger
warehouse, invest in more equipment etc. This can accumulate where quickly and it
is therefore important to include this in the total costs. Similarly as for the revenue
we are also interested in the marginal cost. This is given as the derivative of the
total cost function T C ′ (x) and tells us approximately how much more it will cost
to produce one more unit. For example T C ′ (40) tells us approximately how much
more it will cost to produce 41 relative to producing 40 units.
The profit when producing and selling x units is typically denoted by π(x) and is
given by the difference between the total revue T R(x) and total costs T C(x),

π(x) = T R(x) − T C(x). (16.6)

Note that the profit function in our running example will be a quadratic function

π(x) = −βx2 + αx − A − Bx − Cx2 = −(β + C)x2 + (α − B)x − A (16.7)

Again we deal with a quadratic function, and given that β + C > 0 we note that the
sign in front of the x2 term is negative. This implies (recall from previous analysis
of quadratic functions) that the function π will have a maximum point (we say that
it is concave; for all x). As a business analyst we are of course interested in finding
the optimal number of units to produce and sell with respect to the given profit
function. That is, we want to find the maximal profit. From our knowledge of
function analysis, we can find this maximum by solving the equation

(max P rof it) π ′ (x) = 0. (16.8)

Recalling that the profit is equal to the difference between total revenue and total
costs, we see that
π ′ (x) = T R′ (x) − T C ′ (x). (16.9)
And thus in order to obtain maximal profit, we must have that

T R′ (x) − T C ′ (x) = 0.
EXC2910 THE FIRST SEMESTER 56

This implies in particular that the maximal profit happens when the marginal rev-
enue is equal to the marginal cost, i.e.

T R′ (x) = T C ′ (x).

With this knowledge of the concepts of financial analysis, you are encouraged to
try the following exercises, which are of a similar type to those that could be given
at an exam.
NOTE: in the following exercises you should use a calculator, as the numbers
will become quite big. Since the numbers are going to be very large, or sometimes
difficult to write explicitly, you are encouraged to label the numbers by letters; for
example you could say that the number 10286903 is called α.

Exercise 16.1. Alf owns a micro brewery. He estimates that the relation between
demand and price p per unit of beer sold as a function of the number of units sold
x is given by
1
p = 80 − x. (16.10)
50
His total costs for producing the beer is given by the function
1 2
T C(x) = 10000 + 2x + x. (16.11)
100
Alf needs your advice on how many units of beer he should produce and sell in order
to obtain the maximum profit. In order to do so, complete the following tasks:
(1) Compute the total revenue function.
(2) Compute the profit function.
(3) Find the maximum of the profit function.
Alf tells you that the government has restricted his production to only 2000 units
of beer. How many units should alf produce then?

Exercise 16.2. Ingrid owns a computer software company. The company produce
and sell a cyber-security software, which is sold to businesses. In her business,
the fixed costs are typically high (labor costs, server costs, location costs) while the
unit costs are very small. At the same time, if the number of units sold gets large,
the business will require new servers, and extra staff which will increase the total
costs. She estimates the following relationship between the price of the cybersecurity
software (per unit) and the number of units sold x
1
x = 1000 − p (16.12)
1000
Her total costs is given by the function

T C(x) = 500000 + x + x2 (16.13)


EXC2910 THE FIRST SEMESTER 57

You will hep Ingrid to analyse the profit of her business and figure out how many
units she should sell in order to obtain the maximal profit. To this end, complete
the following tasks:
(1) Compute the total revenue function.
(2) Compute the profit function.
(3) Find the maximum of the profit function.

At last we also present one more quantity of interest; namely the average cost.
This is the average cost per unit when producing x units. We find this from the
following formula:
T C(x)
AC(x) = . (16.14)
x
That is, the average cost is the total costs of producing x units, divided by the
number of units produced.

16.1. Elasticity. The concept of elasticity is used to measure how the change in
one variable will affect the change in another. In light of our discussion of financial
analysis, we are especially interested in the relationship between price p and demand
x, and how a change in the price will impact the change in demand (and vice versa).
We can therefore heuristically think of the elasticity E as the following
relative change in demand
E=
relative change in price
Let us denote by ∆x = change in demand and ∆p = change in price. For example,
∆p = new price−old price. Then the relative change in demand and price is defined
as follows:
∆x ∆p
relative change in demand = , relative change in price = . (16.15)
x p
Thus, our simple formula for the elasticity is given by
∆x
x ∆x p
E= ∆p
= (16.16)
p
∆p x

where we have used the following identity for division of fractions:


a
b ad
c = .
d
cb
As discussed in the beginning of the section on financial analysis, we will often
assume a relationship between price p and demand x. For example, in the linear
case we have an equation of the form

x = b + ap, (16.17)
EXC2910 THE FIRST SEMESTER 58

for some numbers a and b. In this case, the we can think of the demand, the variable
x (appearing alone on the left hand side), as a function of the price p, and we can
simply write
x(p) = b + ap. (16.18)
This simply means that; given a price p we have a demand x(p).
Going back to the formula for the elasticity in (16.16), let us look at the term ∆x
∆p
Since we are now assuming x is a function of p, then let p0 represent an "old price"
and let p0 + h represent a new price (i.e. the price has moved by h), and then we
have that
∆x x(p0 + h) − x(p0 ) x(p0 + h) − x(p0 )
= = .
∆p p0 + h − p0 h
Note that this fraction is similar to the relative change that we have seen in Section
12, and especially on the right hand side of the definition of the derivative in 12.2.
Thus if we let h → 0, then we see that
x(p0 + h) − x(p0 )
lim = x′ (p). (16.19)
h→0 h
Thus, when considering "infinitely small changes in the price, we get the derivative
of the demand with respect to the price. This gives rise to the following definition
of elasticity of demand with respect to the price:

Definition 16.3. We define the elasticity of demand as a function of price in the


following way:
p
E(p) = x′ (p) .
x
The elasticity coefficient E(p) tells us what will happen with the demand in case
of an increase or decrease in price. In particular, it tells us that if price increases by
1% then the demand will reduce by −E(p)%.
For example, assume E(p) = −0.18; this means that if the price increases with
1% then the demand will fall by 0.18%. In economics we distinguish in particular
between three different elasticity scenarios:
• E = −1 =⇒ If the price increase with 1%, the demand will fall by 1%. We
call this Unit elastic.
• E > −1 =⇒ If the price increase with 1%, the demand will fall by less than
1%. We call this inelastic.
• E < −1 =⇒ If the price increase with 1%, the demand will fall by more
than 1%. We call this elastic.
With the above knowledge of elasticities, do the following exercise.

Exercise 16.4. Compute the elasticity of demand w.r.t. price E(p) and show when
it is elastic, unit elastic or inelastic by using a sign diagram for the following rela-
tionships between price p and demand x.
EXC2910 THE FIRST SEMESTER 59

(1) x = 10 000 − 2p.


(2) x = 3000 − 2p − 21 p2 .
(3) p = 50 − x (here you must first reverse the relationship; find the demand as
a function of the price).
(4) p = 100 − x − 12 x2 .
You should use the formula for the elasticity E(p) in Definition 16.3.

16.2. Geometric series and annuities. Consider the following sequences of num-
bers:

1, 2, 4, 8, 16, 32, ....


1, 3, 9, 27, 81, .....
15, 30, 60, 120, 240, ....

In each sequence you can try to guess the next number that should appear by
looking at the pattern created by the previous numbers. In particular, let us denote
by a1 the first number appearing in a sequence, a2 the second, and an the nth number
of the sequence. Then in the first sequence above we see that a1 = 1, a2 = 2, a3 = 4
and so on. Note in particular, that a2 = 2a1 . And a3 = 2a2 . In general we see that

a1 = 1
a2 = 2a1 = 2
a3 = 2a2 = 2 · 2a1 = 4
a4 = 2a3 = 2 · 2 · 2a1 = 8
....

We could continue this pattern as long as we want. We see that the base number
here, a1 is equal to 1 and the "multiplicity parameter" k is equal to 2; the next
number in the sequence is given by the previous term multiplied by k = 2.
We call a sequence of this form a geometric sequence. In financial applications
we are especially interested in computing the sum of the numbers in a geometeric
sequence. Let us denote the sum of the first n numbers in a geometeric sequence by
Sn . Then Sn is given by the sum

Sn = a1 + a2 + a3 + a4 + . . . + an .

Since the sequence of numbers a1 , a2 , . . . , an is geometric, we know that each term


a2 = a1 k, a3 = a1 k 2 , where k is the multiplicity parameter. This pattern repeats all
the way until an = a1 k n−1 . Thus, Sn can be written as a polynomial in the variable
k, in the sense that

Sn = a1 + a1 k + a1 k 2 + . . . + a1 k n−1 . (16.20)
EXC2910 THE FIRST SEMESTER 60

When n gets very large, it can be difficult to summarize all the terms quickly, and
it would be convinient to have a simple formula for this purpose. Due to the nice
structure of the geometeric series, we can simply find such a formula. First note
that if we multiply Sn by k we get
k Sn = a1 k + a1 k 2 + . . . + a1 k n .
Essentially we just increase the degree of the polynomial by 1. Let next look at the
difference between Sn and k Sn :
Sn − kSn
= a1 + a1 k + a1 k 2 + . . . + a1 k n−1
− a1 k + a1 k + a1 k 2 + . . . + a1 k n


=a1 − a1 k n .
Thus by factorizing, we see that
Sn (1 − k) = a1 (1 − k n ) (16.21)
which implies that
1 − kn
Sn = a1 .
1−k
Thus in order to sum up all the numbers in a geometric sum up to order n, we can
simply use this formula.
With the above formula, do the following exercise:

Exercise 16.5. Find the base number a1 and the multiplicity parameter in the fol-
lowing geometric sum, and use the formula to compute the value of the sum:
(1) S8 = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128
(2) S5 = 5 + 15 + 45 + 135 + 405
(3) S3 = 1 + r + r2 (here we assume r is a fixed number)
(4) S8 = 1 + 12 + 14 + 81 + 16
1 1
+ 32 1
+ 64 1
+ 128 . (will this sum ever be larger than 2
if we include more terms? )
EXC2910 THE FIRST SEMESTER 61

17. Annuities

In this section we will discuss the concept of present value and future value of
money, and use this concepts in connection with annuities. An annuity is a stream
of money of equal size arriving with a fixed interval length between them in the
future. It is especially important that the amount that we pay or receive is fixed
for all payments, as we can then use our knowledge about geometric sequences to
easily compute its value.
First let us recall the formula for saving M amount of money and having it in the
bank for n-years at interest rate r:

S = M (1 + r)n . (17.1)

The amount S is then the amount that you have in the bank after n years when
saving M amount of money today at annual interest rate r. Note that S is a future
value; it is an amount that can be obtained after having the money in the bank
for n years. But money has time value! this means that 100 kroner today is worth
more than 100 kr in one year. Indeed, if you are offered 100 NOK today or in 100
year, take the money today and save the money at interest rate r and you will in
one year have (1 + r)100 NOK in the bank, which is greater than 100 NOK. Thus
the same amount is worth more today than in the future. This is a very important
principle in finance and economics, and should be accounted for in most decisions.
In light of this, how much is then 100 NOK received in one year worth today?
This question can be formulated differently; how much money do I have to put in
the bank today in order to have 100 NOK in one year? This implies the following
equation
100 = (1 + r)M (17.2)
where we must solve for M . If r = 0.02, then
100
M= . (17.3)
1, 02
M is then the present value of 100 NOK received in one year.
Suppose now that you are saving a fixed amount of 1 000 N OK per year for 5 years
at 5% interest rate. First payment is done in 1 year. Then you are first interested in
computing the future value of this saving scheme; how much money will we have
1 year after final payment? Let us illustrate this in the following table:

af ter1 year F V1 = M (1 + r)
af ter2 years F V2 = M (1 + r)2 + M (1 + r)
af ter3 years F V3 = M (1 + r)3 + M (1 + r)2 + M (1 + r)
af ter4 years F V4 = M (1 + r)4 + M (1 + r)3 + M (1 + r)2 + M (1 + r)
EXC2910 THE FIRST SEMESTER 62

af ter5 years F V5 = M (1 + r)5 + M (1 + r)4 + M (1 + r)3 + M (1 + r)2 + M (1 + r).


SO after 5 years in the bank (just before we begin the 6th year), we have M (1 +
r)5 + M (1 + r)4 + M (1 + r)3 + M (1 + r)2 + M (1 + r) in the bank. We note that is
is a geometric sum with a1 = M (1 + r), and k = (1 + r), and so in order to find the
value of S5 we can use the formula for computing the geometric sum;
(1 + r)5 − 1 (1 + r)5 − 1
F V5 = M (1 + r) = M (1 + r) . (17.4)
1+r−1 r
THus, considering our example; M = 1000, n = 5 and r = 0.05, and then we find
F V5 = 5 801.91.
This is a future value (FV). This is a value that we will have 5 years from now. In
principle, we could assume that we save M amount of money or n years at interest
rate r, and we would have the following formula for the future value of the bank
account when first payment happens in one year and we consider the value of the
account one year after final payment:
(1 + r)n − 1
F Vn = M (1 + r) .
r
But how much would this amount be worth today? what is the present value of
S5 ? Similarly as before, we think of this as “how much money would I need to put
in the bank today, in order to get F Vn in the future?” We call this the present value
(PV) of the n payments, and again this is solved by the following equation
F Vn = (1 + r)n P Vn , (17.5)
Here, we consider F Vn as a given fixed quantity, and we solve the equation for P Vn
which then gives us:
F Vn (1 + r)n − 1
P Vn = = M (1 + r) . (17.6)
(1 + r)n r(1 + r)n
The present value of a stream of money can also be viewed differently: assume
that you are supposed to receive 1 000 NOK for the next 3 years. How much is this
sum of money worth today? Each of the payments we receive must be discounted
by the value it has today;
1000 1000 1000
P V3 = + 2
+ . (17.7)
(1 + r) (1 + r) (1 + r)3
1000 1
Then P V3 can be computed as a geometric sequence with a1 = (1+r)
, k= 1+r
and
n = 3, and we get
1
1000 ( 1+r )3 − 1
P V3 = 1
1 + r 1+r −1
1 − (1 + r)3
= 1000
−r(1 + r)3
EXC2910 THE FIRST SEMESTER 63

(1 + r)3 − 1
= 1000 .
r(1 + r)3

Using the formula for the future value, we see that (17.6) holds.

17.1. Annuity loan. A typical mortgage is given as an annuity loan. You first
borrow an amount from the bank, and then repay back in equal repayments over
the duration of the loan. Assume that you borrow K amount of money (insert your
favourite positive number in place of K if you want) at an interest rate r. You
will repay the loan over n years with annual repayments. To make thing easy, you
want each payment to be the same. But how much should each payment be? It is
easiest to see this from the Banks point of view; they are investing K amount of
money today (i.e. lending it to you) at an interest rate r. after one year you will
pay M amount of money, and continue this every year for n years. Therefore, in
order for the bank to not lose money, they need that the present value of the future
down-payments should equal the amount that you borrow today

K = P Vn (17.8)

Inserting the formulas for the present value, we find that


(1 + r)n − 1
K = M (1 + r) . (17.9)
r(1 + r)n
Now, the amount K that you borrow is known, as well as he interest rate r and
the number of years over which you borrow n. What we do not know is the annual
repayment M . THus if we solve the above equation for M we find that
K r(1 + r)n
M= . (17.10)
(1 + r) (1 + r)n − 1
This gives us the annual down-payment amount.
To illustrate this theoretical derivation, consider the following example:
Example: You borrow 1 000 000 to buy an old cabin in the mountains. The loan
is given as an annuity loan over 20 years with annual down payment. The annual
interest rate is 5%. Compute the annual down-payment.
solution: We insert the above information into formula (17.10) with K =
1000000 r = 0.05 n = 20 and find
1000000 0.05 · 1.0520
M= = 76 421.51. (17.11)
1.05 1.0520 − 1
Thus the annual repayment is 76 421.51 NOK.
Now that we know the annual repayment, can we figure out how much of this
repayment is given as interests and how much is given as down payment of the
EXC2910 THE FIRST SEMESTER 64

principal (the principal being the borrowed amount)? Yes: we can think of the first
annual repayment as something which is divided into two parts:
M = rK + installment (17.12)
where rK represents the annual interest rate r multiplied with the borrowed amount
that is still unpaid. In the first payment, we have not paid anything, so this is still
K. In the example above, rK = 0.05 · 1 000 000 = 50 000. Thus 50 000 of the
first down payment will be interest. Then the remaining difference M − rK is the
amount we pay in installment (the amount paid down on the principal). We see
that installment = M − rK = 76 421.51 − 50 000 = 26 421.51 NOK.

17.2. Exercises.

Exercise 17.1. You save 100 NOK every year for the next 50 years at a fixed
interest rate 5%. How much money will you have in the bank after the end of year
50?

Exercise 17.2. You save 100 NOK per month at a monthly interest rate 1%. The
bank compounds your interests monthly. How much money will you have after 50
years?

Exercise 17.3. You borrow 20 000 at annual interest rate r = 20% over 3 years.
a) What is the annual amount of repayment? (i.e. M )
b) How much of the first repayment amount is given as interests and how much
is installment?

Exercise 17.4. You borrow 50 000 at annual interest rate r = 20% over 5 years.
a) What is the annual amount of repayment? (i.e. M )
b) How much of the first repayment amount is given as interests and how much
is installment?
c) What is the present value of the remaining loan after the first repayment,
just before you are going to pay the second? Hint: here you think of the loan
as a stream of cash, use the present value formula.
EXC2910 THE FIRST SEMESTER 65

18. Two variable functions

So far we have been discussing functions of 1 variable; i.e. f (x) where x is a


variable in the real numbers. However, we are often interested in functions which
depend on two, or even more variables. Let us illustrate this with the following ex-
ample; A business produce and sell both coffee and tea. The total cost of producing
x units of coffee is denoted by T Cc(x) and the total cost of producing y units of
tea is denoted by T Ct(y). The total cost for the business when producing x units
of coffee and y units of tea is then equal to the sum of the two cost functions; i.e.

T C(x, y) = T Cc(x) + T Ct(y).

We see that this is a function of two variables, x and y. We call functions which
depends on two variables for two variable functions.
Similarly as with functions of one variable we can differentiate and analyse two
variable functions. Being a function with two variables, it is much more challenging
to sketch the graph of a two variable function, as it will look like a surface in a
three dimensional space, i.e. we then consider coordinates of the form (x, y, z) =
(x, y, f (x, y)). However, using the techniques from differentiation we can still find
local/global maximum and minimum points, and determine convexity and concavity
etc.
Let us begin with some terminology. We consider a two variable function f (x, y)
where x and y are real numbers. While we can not differentiate with respect to
both variables at the same time, but we can differentiate either with respect to he
x variable, or with respect to the y variable. When differentiating with respect to
x We then say that we take the partial derivative of f (x, y) with respect to x, and
we denote this by fx′ (x, y) or ∂x

f (x, y). If we differentiate with respect to y, we say
that we take the partial derivative with respect to y and write fy′ (x, y) or ∂y ∂
f (x, y).
When differentiating a two variable function with respect to one of the variables,
you essentially view the other variable as constant, and then differentiate the func-
tion in the same way as you would a one variable function.
We illustrate this with the following example:

Example: Consider the two variable function

f (x, y) = x2 + y 2 .

We will find the partial derivatives of this function, both with respect to x and y.
Let us begin to find the partial derivative w.r.t. x.
When we differentiate this function with respect to x, we treat the y variable as
a constant number. Recall that the derivative of a constant number is 0. Therefore,
EXC2910 THE FIRST SEMESTER 66

using the polynomial rule for differentiation on the x component on the function,
we see that
fx′ (x, y) = 2x + 0 = 2x.
Similarly differentiating the function f (x, y) with respect to y, we treat the x variable
as constant. Therefore
fy′ (x, y) = 0 + 2y = 2y. (18.1)

Example: Consider the two variable function

f (x, y) = ex+y − x2 y 3 .

We will find the partial derivatives of this function, both with respect to x and y.
We begin to find the partial derivative w.r.t. x. In doing so, we treat the y variable
as constant. Thus (with a different notation than in the previous example):
∂ ∂ x+y ∂ 2 3
f (x, y) = e − xy , (18.2)
∂x ∂x ∂x
differentiating each of the terms separately (treating y as a constant) we see that
∂ x+y ∂ x y ∂
e = e e = [ ex ]ey = ex ey = ex+y .
∂x ∂x ∂x
∂ 2 3 ∂ 2 3
x y = [ x ]y = 2xy 3 .
∂x ∂x
Combining these two, we see that

f (x, y) = ex+y − 2xy 3 .
∂x
Similarly, to compute the partial derivative w.r.t. y, we see that
∂ ∂ x+y ∂ 2 3
f (x, y) = e − xy . (18.3)
∂y ∂y ∂y
Treating now x as a constant, and y as the variable we differentiate with respect to,
then we have that
∂ x+y ∂ x y ∂
e = e e = ex ey = ex ey = ex+y .
∂y ∂y ∂y
∂ 2 3 ∂
x y = x2 y 3 = x2 3y 2 .
∂y ∂y

To practice differentiation of two variable functions, do the following exercises:

Exercise 18.1. Differentiate the following functions both with respect to x and with
respect to y:
(1) f (x, y) = 2x − 3y
(2) f (x, y) = x2 − 2x + 3xy − 400
(3) f (x, y) = ex+y (1 + xy)
(4) f (x, y) = 2xy ln(x2 y)
EXC2910 THE FIRST SEMESTER 67

18.1. Higher order derivatives. The two variable functions can also be differen-
tiated to a higher order, similar to what we have done for one variable functions.
Recall that when we differentiate a function, then the derivative is in itself a new
function, that could potentially be differentiated. For example, f (x, y) = x2 + y 2 ,
then we recall from the example in the previous section that fx′ (x, y) = 2x. We can
differentiate this function once more with respect to x in order to find the second
partial derivative with respect to x to see that

fx′′ (x, y) = 2.

However, instead of differentiating the derivative with respect to x, we could differ-


entiate it with respect to y, and in this case we get
′′
fxy (x, y) = 0, (18.4)

as there is no y term in the derivative fx′ (x, y). The second order partial derivatives
will be denoted in the following way
∂2 ∂2 ∂2
fx′′ (x, y) = f (x, y), fy′′ (x, y) = f (x, y), ′′
fxy (x, y) = f (x, y).
∂x2 ∂y 2 ∂x∂y
The first one is the second partial derivative w.r.t. x, the second is the second partial
derivative w.r.t. y and the third is the second partial derivative w.r.t. x first and
then y. The last one is also often called the mixed-partial derivative. Interestingly,
we have the following:

Proposition 18.2. Let f (x, y) be a two variable function which is differentiable in


both variables. Then
∂2 ∂2
f (x, y) = f (x, y).
∂x∂y ∂y∂x
The above proposition tells us that it does not matter in what order we differen-
tiate in the mixed partial derivative. We illustrate this with the following example:

Example: Consider again f (x, y) = x2 + y 2 . We recall that


∂ ∂
f (x, y) = 2x, f (x, y) = 2y
∂x ∂y

Now differentiating ∂x
f (x, y) with respect to y (we treat the x term as constant)
and observe that
∂2 ∂
f (x, y) = 2x = 0. (18.5)
∂y∂x ∂y

Similarly, if we differentiate ∂y
f (x, y) with respect to x we find that
∂2 ∂
f (x, y) = 2y = 0.
∂x∂y ∂x
EXC2910 THE FIRST SEMESTER 68

To practice second order differentiation of two variable functions, do the following


exercise:

Exercise 18.3. Differentiate the following functions to the second order; both com-
pute the derivatives w.r.t. x and y and the mixed-partial derivatives.
(1) f (x, y) = 2x2 − 3y 4 + 2xy
(2) f (x, y) = (x + 3)(y + 4)
(3) f (x, y) = 5x2 (x2 − 2xy)
(4) f (x, y) = ln(x2 + y 2 )
1
(5) f (x, y) = x2 +y 2

18.2. Optimization of two variable functions. A two variable function an be


visualized as a surface in three dimensional space. Indeed, for each pair of points
(x, y) we get a function value f (x, y), giving rise to the three dimensional coordinate
(x, y, z) = (x, y, f (x, y)). This is illustrated below for a simple function behaving
like a parabola in both the x and y direction.

Figure 18.1. The graph of f (x, y) = x2 + y 2 .

Recall that a two variable function may represent for example the total cost
function from producing two different goods, where number of units produced is
x and y. Just as in the case of one-variable functions, we are then interested in
knowing the minimum total cost, and to this end find the optimal quantities x and
y such that the total cost becomes as small as possible.
In general when considering a two variable function f (x, y) we are interested in
finding stationary points. Recall that a stationary point for a one variable function
is a point x∗ such that f ′ (x∗ ) = 0. To find such a point in the one dimensional case
EXC2910 THE FIRST SEMESTER 69

we simply differentiate the function f ′ (x) and then solve the equation f ′ (x) = 0.
We will see that finding stationary points for two variable functions will follow by
the very same argument, but we now have two different derivatives to consider; one
for each variable. We summarize this in the following proposition.

Proposition 18.4. Let f (x, y) be a differentiable function in both variables. The


stationary points (x∗ , y ∗ ) of f (x, y) is found by solving the system of equations
fx′ (x, y) = 0 (18.6)
fy′ (x, y) = 0

To illustrate the above proposition, consider the following examples:


Example: Let f (x, y) = x2 + y 2 − 10. We are interested in finding a stationary
point for this function. First we see that
fx′ (x, y) = 2x, fy′ (x, y) = 2y.
Then we need to solve the system of equations
fx′ (x, y) = 0
fy′ (x, y) = 0
This is then the same as solving
2x = 0
2y = 0.
But it is readily seen that the only solution to these two equations is (x, y) = (0, 0).
Thus the stationary point is (x∗ , y ∗ ) = (0, 0).
Example: Let f (x, y) = 2x2 − 2x + 3y 2 − y + xy. Then we see that
fx′ (x, y) = 4x − 2 + y
fy′ (x, y) = 6y − 1 + x.
Then solving (18.6) we must solve the following system of two equations with two
unknowns
(1) 4x − 2 + y = 0
(2) 6y − 1 + x = 0
From (1) we get that y = 2 − 4x. Inserting this into (2) we see that
11
(2) 6(2 − 4x) − 1 + x = 0 =⇒ 12 − 24x − 1 + x = 0 =⇒ x = .
23
Inserting this information back into (1), we see that
4 · 11 2
(1) y = −2 − = . (18.7)
23 23
EXC2910 THE FIRST SEMESTER 70

We find the stationary point is therefore given by (x∗ , y ∗ ) = ( 23


11 2
, 23 ).

As illustrated by the last example, to solve the system of equations imposed by


(18.6) we simply use well known techniques to solve a system of two equations with
two unknowns. We must however be careful; in order to use this methodology we
need to a have linear system of equations. That is, each equation fx′ (x, y) = 0 and
fy′ (x, y) must be linear in both x and y. As we have seen in earlier section, there are
several interesting functions with non-linear derivatives! (in fact, the only functions
that will have linear derivatives are second order polynomials in both variables... ).

So far we have not classified the stationary points that we have found. Recall
that a stationary point for a one variable function can be either a maximum or
minimum point for the function. This is also true for a two variable function, but
here we also have one more category of points; saddle points. Saddle points are
stationary points where the function can be seen as a local minimum point in one of
the variables while being a local maximum in the other variable. This is illustrated
in the following function. We see that in if we follow the x axis, then the function

Figure 18.2. The graph of f (x) = x2 − y 2 .

is convex, while if we follow the y axis, the function is concave. This results in the
saddle point. We can simply check that this occurs in the point (x∗ , y ∗ ) = (0, 0).
In order to classify what type of stationary point we have for a given function (i.e.
local max, min or saddle), we need to compute the second derivatives (in a similar
EXC2910 THE FIRST SEMESTER 71

way as we done for one-variable functions), and then follow a simple test procedure.
We summarize this in the next proposition.

Proposition 18.5. Suppose f (x, y) is a twice differentiable function in each vari-


able, and assume that (x∗ , y ∗ ) is a stationary point of f , i.e. fx′ (x∗ , y ∗ ) = fy′ (x∗ , y ∗ ) =
′′ ′′ ′′
0. Denote by A = fxx , B = fxy and C = fyy . The the following classification of the
stationary point holds:
i) If AC − B 2 >0 and A > 0 then (x∗ , y ∗ ) is a local minimum point.
ii) If AC − B 2 >0 and A < 0 then (x∗ , y ∗ ) is a local maximum point.
iii) If AC − B 2 <0 then (x∗ , y ∗ ) is a local saddle point.
iv) If AC − B 2 =0 then the test in inconclusive.

We illustrate this proposition with a simple example:


Example: We consider the function shown in the figure above, where f (x, y) =
x − y 2 . We already know that this is a saddle point, but we will now show this
2

by using the tools from the Proposition. First, we know that a stationary point is
given by (x∗ , y ∗ ) = (0, 0). The first partial derivatives is given by fx′ (x, y) = 2x and
fy′ (x, y) = −2y. The second order derivatives are simply computed:

fx′′ (x, y) = 2, ′′
fxy = 0, ′′
fyy (x, y) = −2.

Thus A = 2, B = 0 and C = −2. We see that AC − B 2 = −4 − 0 < 0. And thus,


point iii) of the above proposition suggests that the point (x∗ , y ∗ ) = (0, 0) must be
a saddle point for the function f (x, y) = x2 − y 2 . This we can also confirm from the
figure.

Exercise 18.6. Find all stationary points of the functions and classify them accord-
ing to Proposition 18.5.
(1) f (x, y) = 3x2 − 2x + 2y 2 − 3y
(2) f (x, y) = x2 − y 2 + 2xy
(3) f (x, y) = 5x4 y 3 − 2y 2
(4) f (x, y) = −xyex+y
(5) f (x, y) = ln(y 2 x2 − 2xy + 1)

Exercise 18.7. A business sells two products: Product A is sold in x number of


units, and Product B is sold in y number of units. The price of p of Product A and
q of Product B in relation to the number of units sold is given by
x
p = 1000 − 0 < x ≤ 2000.
2
q = 2000 − y 0 < y ≤ 2000.
EXC2910 THE FIRST SEMESTER 72

The business operates with the following total cost function for producing x units of
Product A and y units of Product B:
1
T C(x, y) = (x2 + y 2 ) + 4x + 5y − xy + 1000.
2
The business asks you to help them figure out the following:
(1) Find the profit function.
(2) Find stationary points of the profit function and classify them.
(3) What is the optimal profit?
(4) The business tells you that they will only be able to produce up to 500 units
of Product A. What will then the optimal profit be?

Exercise 18.8. Find all possible stationary points of the functions in Exercise 7.3
and classify them.
EXC2910 THE FIRST SEMESTER 73

19. Optimization under constraints: The Lagrange method

So far we have learned how to find stationary points and classify local maximum
and minimum points associated to the stationary points for a two variable function
f (x, y). In doing so, our approach was completely unconstrained, in the sense that
the variables x and y could potentially be any real number, and was not limited in
any way. However, in reality, we are often interested in optimizing functions under
certain constraints on the variables. We illustrate this with the following example.

Example: A business produces and sell two types of snowboards; x units of a


freeride snowboard and y units of a freestyle snowboards. The profit function of the
business from producing and selling the snowboards is given by a function π(x, y).
After closer investigations of the market, the management concludes that it will not
be realistic to sell more than 1000 snowboards in total, simply because there are no
more potential buyers of the snowboards. As a business analyst you are then told to
find the optimal numbers of snowboards to produce in order to maximize the profit
function, given that the total number of snowboards produced is 1000. You are then
faced with the following optimization problem

max π(x, y) such that x + y = 1000. (19.1)

Here, the max π(x, y) simply means that we wish to maximize the value of π(x, y).
The condition x + y = 1000 is due to the constraint that the total number of snow-
boards sold must equal to 1000. The goal is thus to choose the optimal combination
of x and y such that the profit π(x, y) becomes as large as possible, while at the
same time ensuring that x + y = 1000.

Illustrated by the example above, the problem of optimizing the function is faced
with a constraint on the variables x, y. We call this optimization under constraint.
There exists several methods to deal with such optimization problems, but in this
course we will work with the method of Lagrange, named after the great 1700 century
Italian mathematician Joseph Louis Lagrange.
Using the method is rather simple in it self and provide a powerful tool for analysis.
In these notes we will only focus on application of the method towards optimiza-
tion of functions under constraints, and will therefore not dig any deeper into the
reasoning behind the method of Lagrange.
We first present a definition for the so called Lagrangian associated with a func-
tion.

Definition 19.1. Let f (x, y) be a differentiable function, and suppose we are given
the optimization problem

max f (x, y), s.t. g(x, y) = c, (19.2)


EXC2910 THE FIRST SEMESTER 74

where g(x, y) is another differentiable function, and c is a (constant) number. The


Lagrangian function L(x, y) associated with this problem is then given by

L(x, y) = f (x, y) − λ(g(x, y) − c).

Here, λ is a so-called "dummy variable"; you can think of it as an arbitrary constant


number for now, and its role in the optimization problem will become apparent later.

The Lagrangian L(x, y) is a new function that we create involving both the func-
tion f (x, y) that we aim to optimize, as well as the constraint condition g(x, y) − c
(note that in order for the constraint equality to be satisfied, we need to find a pair
(x, y) with is such that g(x, y) − c = 0).
We will now present the so called Lagrange multiplier method.

Lagrange multiplier method Suppose you want to solve the following problem:

max f (x, y), s.t. g(x, y) = c.

In order to find all possible solutions of (19.2), we proceed as follows:


(1) First write down the associated Lagrangian function L(x, y) as defined in
Definition 19.1.
(2) Differentiate the Lagrangian function L(x, y) with respect to both x and y,
and write up the following first order conditions:

L′x (x, y) = fx′ (x, y) − λgx′ (x, y) = 0


L′y (x, y) = fy′ (x, y) − λgy′ (x, y) = 0
g(x, y) = c.

(3) Solve the above system of three equations with respect to the three unknown
variables (x, y, λ). Any triplet (x, y, λ) that solves these three equations is
a solution candidate, and at least one of the candidates will be the true
solution to the constrained optimization problem.
Let us illustrate the above method with two examples.

Example: Maximize f (x, y) = xy such that x + y = 1. Writing this in a similar


way as above, we formulate the problem:

max f (x, y) = xy, s.t. g(x, y) = x + y = 1.

Here the constant c = 1. We begin with the step (1) of the method; formulate the
Lagrange function. This is then given by

L(x, y) = xy − λ(x + y − 1).


EXC2910 THE FIRST SEMESTER 75

Continuing with step (2) we see that L′x (x, y) = y − λ and L′y (x, y) = x − λ. We
move to step (3) and formulate the system of equations

L′x (x, y) = y − λ =0
L′y (x, y) = x − λ =0
x + y =1.

In order for the first to equations to hold we must have that x = y. Inserting this
into the third equation, we see that 2x = 1 =⇒ x = 21 . Inserting this information
again into the third equation implies that y = 21 . The only solution candidate is
therefore (x∗ , y ∗ ) = ( 12 , 12 ).

Example: Maximize the function f (x, y) = x + y such that the variables x and
y satisfies the following equation for a circle with radius 1; x2 + y 2 = 1. Written
differently, we want to solve the following problem:

max f (x, y) = x + y s.t. g(x, y) = x2 + y 2 = 1. (19.3)

We begin to formulate the Lagrangian (Step (1)):

L(x, y) = x + y − λ(x2 + y 2 − 1).

For step (2) we differentiate the Lagrangian function and see that L′x (x, y) = 1−2λx
and L′y (x, y) = 1 − 2λy. For step (3) we then set up the three equations that we
need to solve:

L′x (x, y) = 1 − 2λx =0


L′y (x, y) = 1 − 2λy =0
x2 + y 2 =1.
1 1
We see that 2λx = 1 and 2λy = 1 and thus, x = 2λ and y = 2λ
. Inserting this
information into the third equation, we must have that
1 2 1
( ) + ( )2 = 1.
2λ 2λ
This implies that 4λ2 2 = 1, or written differently; λ2 = 12 . This equation has two
solutions; λ1 = √12 and λ2 = − √12 . Given λ1 , we then find x and y directly by
inserting it into the previous relations; i.e. 2λ1 x = 1 =⇒ x = √12 , and similarly
we see that y = √12 . Therefore, one solution candidate is (x∗1 , y1∗ , λ1 ) = ( √12 , √12 , √12 ).
We can then verify that we have another solution candidate as well, by investigating
λ2 , and we find (x∗2 , y2∗ , λ2 ) = (− √12 , − √12 , − √12 ). We therefore have two solution
candidates; but which gives us the maximum value? We know that one of the
EXC2910 THE FIRST SEMESTER 76

solutions will give us a maximum, and therefore we insert the two solutions into the
original function f to check:
1 1 √ 1 1 √
f (x∗1 , y1∗ ) = f ( √ , √ ) = 2, and f (x∗2 , y2∗ ) = f (− √ , − √ ) = − 2. (19.4)
2 2 2 2
We see that the point (x∗1 , y1∗ ) = ( √12 , √12 ) provides us with a maximum under the
constraint.
To practice optimization under constraints, we recommend to do the following
exercises.

Exercise 19.2. Optimization problems with constraints:


(1) Solve the following minimization problem
min f (x, y) = x2 + y 2 , s.t. x − y = 1.
(2) Solve the following maximization problem
max f (x, y) = x2 + y 2 − 2xy, s.t.x + 2y = 10.
(3) Solve the following maximization problem
π(x, y) = −x2 − y 2 − xy + 200x + 100y − 100, s.t. x + y = 100.
Extra: How does your solution compare to the unconstrained optimization
problem? That is; if we do not care about the constraint x + y = 100, what
would be the optimal pair then?.

Exercise 19.3. A business is producing two different products. They produce and
sell x units of product A and produce and sell y units of product B. Their profit
function is given by
xy
π(x, y) = −x2 − y 2 + + 200x + 100y − 100.
2
a) What pair (x, y) will give the maximum profit for the business?
b) What is the maximum profit in this case?
c) The management tells you that they want to produce a total of 150 units.
Under this constraint, what is the optimal number of units produced?
EXC2910 THE FIRST SEMESTER 77

20. Integration

We are by now very well acquainted with differentiation of functions, both in one
and two variables. There is also another mathematical concept which has strong
links to differentiation, and can be seen as the "inverse operation" to that of differ-
entiation.
Given a function describing the relationship between distance traveled and time
spent travelling, we can calculate the speed at which we are travelling at any given
moment in time; as illustrated in section 12. The concept of integration works in the
opposite direction; given a function for the speed at which we travel at any point in
time, we can calculate the distance we have travelled.
We begin with a definition of what we call the anti derivative.

Definition 20.1. We say that a function F (x) is an anti derivative of another


function f (x) if we have that
F ′ (x) = f (x). (20.1)

This definition tells us that to find the anti derivative of a given function f (x) we
must try to find a function F (x) which is such that its derivative F ′ (x) is equal to
f (x).
Let us illustrate this with an example.

Example: Consider the function f (x) = x. An anti derivative of this function


is given by F (x) = 21 x2 . Indeed, it is readily checked that then F ′ (x) = x. Note
however that any function F (x) + c for some constant c would be an anti derivative
of the function f (x), and we therefore see that there exists infinitely many anti
derivatives to the function f (x). However, all of them will be on the form of F (x)+c.

20.1. Indefinite integration. The anti derivative of a function is strongly con-


nected to the concept of integration. In fact, the anti derivative of a function is
often called the indefinite integral of a function.

Definition 20.2. Let F (x) be the anti derivative of a function f (x). We then say
that the indefinite integral of f (x) is equal to F (x) and we write
Z
f (x) dx = F (x) + c.
R R
The notation is the symbol for for integration. We say that f (x) dx is an
indefinite integral.

We provide the following three examples for the computation of some elementary
indefinite integrals:
EXC2910 THE FIRST SEMESTER 78

Example:
R
(1) The integral 1 dx = x + c since an anti derivative of the function f (x) = 1
is given by F (x) = x + c (Indeed, check that the derivative of F (x) i equal
to f (x)).
(2) The integral x dx = 21 x2 +c since an anti derivative of the function f (x) = x
R

is given by F (x) = 12 x2 , as illustrated in an earlier example. We therefore


use the definition of the indefinite integral to conclude.
(3) The integral x2 dx = 31 x3 + c. Indeed, we see that for F (x) = 13 x3 + c then
R

F ′ (x) = x2 . Thus, using that f (x) = x2 , we see that F (x) + c is the anti
derivative of f (x), and we therefore conclude by definition of the indefinite
integral.
Working with the computation of various indefinite integrals it is useful to follow
some simple rules. We provide these rules in the following proposition.

Proposition 20.3 (Rules for integration). The following computation rules holds
for indefinite integrals
1
R
(1) xp dx = p+1 xp+1 + c for p ̸= −1.
R
(2) a dx = ax + c for some constant a.
R R R
(3) f (x) + g(x) dx = f (x) dx + g(x) dx for any two functions f (x) and
g(x).
R R
(4) af (x) dx = a f (x) dx for some constant a.
R
(5) ex dx = ex + c.
(6) eax dx = a1 eax + c.
R

(7) x1 dx = ln(x) + c.
R

It is strongly encouraged to try to prove for yourself that the above rules holds
by using the definition of the indefinite integral and anti derivatives together with
your knowledge of differentiation.

Exercise 20.4. Compute the following indefinite integrals:


Z
(1) (x − 2x2 ) dx.
Z
(2) aeax dx for some constant a > 0.
Z
(3) (x − 2)2 dx.
Z
(4) pxp−1 dx for some p ̸= 0.
Z
β
(5) ( − αeβx ) dx for some constant α, β.
x
EXC2910 THE FIRST SEMESTER 79

20.2. Definite integration. As we have seen in the previous section; the indefinite
R
integral f (x) dx and the anti derivative F (x) of a function coincides, and answers
the question "what function is such that its derivative is equal to f (x)?". However,
the concept of integration can be used for a great variety of applications. The most
fundamental being to compute the area underneath a graph induced by a function
f (x). We will illustrate this with the following example. Consider the familiar
function f (x) = x2 . This function has a convex shape, and its graph between x = 0
and x = 5 is given as in the following figure.

Figure 20.1. The graph of f (x) = x2 .

Now we might be interested in computing area defined underneath the graph


(blue line) and above the x axis, say between x = 0 and x = 4 for example. This
is illustrated in the following figure: The sketched blue area is the area of interest,

Figure 20.2. Area underneath the graph of f (x) = x2 .

and it turns out that we can compute this area by using integration.

Proposition 20.5. Let F (x) be an anti derivative of a function f (x). The definite
integral of f (x) from the point a to b is given by
Z b
f (x) dx = [F (x)]ba = F (b) − F (a). (20.2)
a
EXC2910 THE FIRST SEMESTER 80

Furthermore, the area A underneath the curve f (x) from x = a to x = b is given by


the definite integral Z b
A= f (x) dx.
a

Remark 20.6. The notation [F (x)]ba


simply means F (x) evaluated in the point b,
minus F (x) evaluated in the point a; or put simply F (b) − F (a). We keep this
notation as it makes later computations more clear.

With the above definition in hand, we are now ready to compute some definite
integrals. Example Consider the function f (x) = x2 . We are interested in comput-
ing the area underneath the graph of this function between x = 0 and x = 4 (i.e.
the area sketched in blue in the above figure). To this end, we know from the above
Proposition that the area A is given by
Z 4
A= x2 dx. (20.3)
0

We first find the anti derivative of f (x) = x2 . Using the first rule of integration we
find that F (x) = 13 x3 is an anti derivative of this function. Using the proposition to
compute indefinite integrals, we therefore have
Z 4
1 1 1
A= x2 dx = [ x3 ]40 = 43 − 03 ≈ 21.3.
0 3 3 3

Example: Compute the area underneath the graph of the function f (x) = ex
from x = 1 to 2. We now that the anti derivative of ex is simply F (x) = ex .
Therefore Z 2
A= ex dx = [ex ]21 = e2 − e1 .
1

Exercise 20.7. Compute the following definite integrals:


Z 2
1
(1) (2x − x2 ) dx.
0 2
Z 1
(2) ae−ax dx for some constant a > 0.
0
Z 3
(3) (x − 2)2 dx.
2
Z b
(4) pxp−1 dx for some p ̸= 0.
a
Z 2
2
(5) dx for some constant α, β.
1 x
Exercise 20.8. Consider the function f (x) = x2 .
• Compute the area A0 underneath the curve of f (x) from x = 0 to 1.
EXC2910 THE FIRST SEMESTER 81

• let n be an arbitrary number. Compute the area An underneath the curve of


f (x − n) from x = n to x = n + 1.
• how does A0 compare to An ; are they different?
R
20.3. Two integration techniques. Given an indefinite integral of the form f (x) dx
for some function f , it is often challenging to find an anti derivative associated to
f to provide us with a solution. For example, suppose f (x) = x ln(x). To find the
anti derivative of this function we recall that we must find a function F (x) which is
such that its derivative is equal to f (x). Simply trying to guess the answer typically
takes much time, and can be very challenging. However, there are a few techniques
for computation with indefinite integrals that can help us in this endeavor. In this
section we will have a closer look at two of these techniques.

20.3.1. Integration by parts. This technique is one of the most widely used inte-
gration techniques in mathematical analysis, and is highly useful in a great variety
of applications. The technique can help us with the following type of problem:
Compute the following indefinite integral:
Z
f (x)g(x) dx.

Since we have a product between two functions f and g, finding the anti derivative
can be very tricky. However, based on the product rule for differentiation we can
find a relation for this type of integrals which in many cases can help us compute
this indefinite integral.
Let (uv)′ denote the derivative of the product u(x)v(x). Recall that for the
product of two functions we have the following rule of differentiation

(uv)′ = u′ v + uv ′ .

Here, we have simply dropped the (x) notation for later convenience. Integrating
both sides, and using that the anti derivative of (uv)′ is equal to uv, we see that
Z Z
uv = u (x)v(x) dx + u(x)v ′ (x) dx.

Rewriting this, we see that


Z Z
u (x)v(x) dx = uv − u(x)v ′ (x) dx.

The above expression is called th integration by parts formula. This formula tells
us that if we want to compute the integral of two functions u′ (x)v(x) then it is equal
to the product uv minus the integral u(x)v ′ (x) dx.
R

The integration by parts formula is particularly useful if we want to integrate a


product of two functions f (x)g(x) where one of these functions are ex or ln(x). We
illustrate this in the following examples:
EXC2910 THE FIRST SEMESTER 82

Example Compute the indefinite integral of the function f (x) = x ln(x), i.e.
R
x ln(x) dx. To compute this integral we can use the integration by parts technique.
Suppose u′ (x) = x and v(x) = ln(x). Then u(x) = 12 x2 , and v ′ (x) = x1 , and it follows
that Z Z
1 2 1 21
x ln(x) dx = x ln(x) − x dx
2 2 x
In the last integral, we see that we get a cancellation of one x term, and therefore
Z Z
1 2 x
x ln(x) dx = x ln(x) − dx.
2 2
Using that 21 x dx = 14 x2 + c we find that
R

x2
Z
1
x ln(x) dx = x2 ln(x) − + c, (20.4)
2 4
giving us a nice and simple expression for the integral we wanted to compute. Let
us also check that what we have on the right hand side is indeed the anti derivative
2
of x ln(x). To do so, we need to differentiate the function F (x) = 21 x2 ln(x) − x4 .
We observe by the product rule that
1 1
F ′ (x) = x ln(x) + x − x = x ln(x), (20.5)
2 2

Example Compute the indefinite integral


Z
xex dx.

We define u′ (x) = ex and v(x) = x. Then we have that u(x) = ex , and v ′ (x) = 1.
By the integration by parts formula, we then find
Z Z Z Z
′ ′
xe dx = u (x)v(x) dx = u(x)v(x) − u(x)v (x) dx = xe − ex 1 dx (20.6)
x x

R
The last integral on the right hand side is straight forward to compute; ex dx =
ex + c, and therefore
Z
xex dx = xex − ex + c = ex (x − 1) + c.

The integration by parts can also be used to compute the definite integral. That
is, for the definite integral we have the following formula
Z b Z b
′ b
u (x)v(x) dx = [u(x)v(x)]a − u(x)v ′ (x) dx.
a a

Here [u(x)v(x)]ba = u(b)v(b) − u(a)v(a).


Integration by parts works particularly well when working with ex or ln(x) terms.
In this case, we can follow the following simple rule:
EXC2910 THE FIRST SEMESTER 83

Rule: When we study an integral of the form f (x)ex dx, try to set u′ (x) = ex
R

and v(x) = f (x). When we study an integral of the form f (x) ln(x) dx, set u′ (x) =
R

f (x) and v(x) = ln(x).

To practice the use of the integration by parts formula, it is recommended to do


the following exercise.

Exercise 20.9. Compute the following indefinite integrals:


R
(1) 3xe3x dx
(2) x ln(x) + x2 dx
R
R
(3) ex (x + 1) dx
R √
(4) 2x ln( x) dx

Exercise 20.10. Compute the following indefinite integral by using integration by


parts Z
x2 ex dx.

Hint: You can use the integration by parts formula twice!

Exercise 20.11. (difficult) What must n be for the following equality to hold
x3
Z
xn ln(xn+1 ) dx = (ln(x3 ) − 1).
3
20.3.2. Integration by substitution. Another powerful technique in order to compute
indefinite or definite integrals is called integration by substitution. In this technique,
the idea is to substitute a complicated part of the function we want to integrate by
an easier term, and then substitute back after integration. Let us illustrate this with
an example: We are interested in computing the integral
Z
(2x3 + 3)7 x2 dx.

This looks at first glance like a very difficult integral to compute. However, we can
substitute what is inside the parentheses by a new variable; define u = 2x3 + 3.
Then u is essentially a function of x, and we see that u′ (x) = 6x2 . Therefore we
write du = x2 dx. inserting this into the integral above, we see that
Z Z
3 7 2 1
(2x + 3) x dx = u7 du (20.7)
6
Now the integral on the right hand side is easy o compute with the power rule;
u8
Z
u7 du = + c.
8
Therefore Z
1 8
(2x3 + 3)7 x2 dx = u +c (20.8)
48
EXC2910 THE FIRST SEMESTER 84

Using the fact that we have defined u = 2x3 + 3, we have that


Z
1
(2x3 + 3)7 x2 dx = (2x3 + 3)8 + c. (20.9)
48
The method that we have used is called substitution; we substitute the expression
2x3 + 3 by the simple variable u Since the derivative of 2x3 + 3 was equal to 6x2 , we
R
could use that du = x2 dx, and then compute the simple integral u7 du.
The method of substitution is typically useful when we have integrals of compo-
sitions of functions, and is highly related with the chain rule for differentiation. We
illustrate this in the following proposition

Proposition 20.12. Let f (x) and h(x) be two functions such that h′ (x) exists for
all x. Let F (x) be the anti derivative associated to f (x). Then the following integral
holds: Z
f (h(x))h′ (x) dx = F (h(x)) + c. (20.10)

We illustrate this proposition with an example.


Example: Compute the following indefinite integral
ex
Z
dx.
ex − 1
To this end, let f (x) = x1 , and h(x) = ex − 1. Then h′ (x) = ex . Then we see that
ex
Z Z
dx = f (h(x))h′ (x) dx. (20.11)
ex − 1
The anti derivative associated to f (x) = x1 is equal to F (x) = ln(x) + c. Using the
above proposition, we therefore have that
ex
Z
dx = ln(ex − 1) + c. (20.12)
ex − 1

While using this technique for indefinite integrals follows the procedure outlined
in the above example, when considering definite integrals one must also take into
account the substitution that has been done in the integration limits. We illustrate
this in the following proposition.

Proposition 20.13. Let f (x) and h(x) be two integrable functions, and suppose
F (x) is the anti derivative of f (x). Then
Z b Z h(b)
′ h(b)
f (h(x))h (x) dx = f (u) du = [F (u)]h(a) = F (h(b)) − F (h(a)).
a h(a)

We illustrate the above proposition with an example.


Example: Compute the following definite integral
Z 2
(2x2 − x + 3)2 (4x − 1) dx. (20.13)
1
EXC2910 THE FIRST SEMESTER 85

Again, this looks like a difficult integral to compute. However, define f (x) = x2 ,
and h(x) = 2x2 − x + 3, and note that h′ (x) = 4x − 1. We then see that
Z 2 Z 2
2 2
(2x − x + 3) (4x − 1) dx = f (h(x))h′ (x) dx. (20.14)
1 1
From the above proposition we then know that
Z 2 Z h(2) Z h(2)
′ 1 h(2)
f (h(x))h (x) dx = f (u) du = u2 du = [ u3 ]h(1) . (20.15)
1 h(1) h(1) 3
By simple evaluation we find that h(1) = 2·12 −1+3 = 4 and h(2) = 2·22 −2+3 = 9
and we get Z 2
1 1
f (h(x))h′ (x) dx = 93 − 43 ≈ 221.6. (20.16)
1 3 3
Exercise 20.14. Identify the functions f (x), h(x), h′ (x) and F (x) such that the
method of substitution can be applied in the following integrals, and compute the
indefinite integrals:
R
(1) 2(2x − 3)2 dx
R
(2) (ex − 2)(ex − 2x + 3) dx
(3) 4 (2x(x−1)
R
2 −4x+3) dx
R
(4) 2(2x − 3) ln(2x − 3) dx.

Exercise 20.15. Compute the definite integrals:


R2
(1) 0 2(2x − 3)2 dx
R1
(2) −1 (ex − 2)(ex − 2x + 3) dx
R2
(3) 1 4 (2x(x−1)
2 −4x+3) dx
R3
(4) 2 2(2x − 3) ln(2x − 3) dx.

Exercise 20.16. Compute the following definite integrals


R2
(1) 1 3h(x)2 h′ (x) dx when h(x) = x − x1 .
R b ′ (x)
(2) a 31 hh(x) dx when h(x) = x2 − 1
R1
(3) −1 eh(x) 5h′ (x) dx when h(x) = 4x − 3
EXC2910 THE FIRST SEMESTER 86

21. Introduction to linear algebra: Gauss Elimination

We have learned how to solve systems of equations of the form

ax + by = p1
(21.1)
cx + dy = p2 ,

for any specific numbers a, b, c, d and p1 , p2 . The two equations describe a specific
relationship between the two variables x and y, and our goal is to find a pair of
numbers (x, y) which solves both equations at the same time. To solve this sys-
tem of equations we have used either the method of substitution or the method of
elimination. These two methods works very well when we are considering the above
problem; two equations with two unknowns. We have also solved a system of three
equations with three unknowns of the form

a11 x + a12 y + a13 z = p1


a21 x + a22 y + a23 z = p2 (21.2)
a31 x + a32 y + a33 z = p1

where the solution is given as a triple (x, y, z). We have observed that by using
the same methods as described above for the system of two equations to solve the
system of three equations, we will spend significantly more time, as the system gets
much more involved. In applications to business, finance, economics or marketing,
we typically have a very large number of equations describing a relationship between
several different variables, and using these methods to solve such equations is then
very difficult.
To reduce the complexity of such large systems of equations, one can represent the
equations through a mathematical construction called a matrix (matrices in plural).
A matrix is an array collecting all the coefficients in front of the unknown variables
in a system of equations. For example, relating to the system of two equations in
(21.1) we construct the matrix
!
a b p1
.
c d p2

The first column to the left in this matrix represents the coefficients multiplied with
the x variable in (21.1), and the second column represents the variables multiplied
by y. The column that comes after the vertical line represents numbers on the right
hand side of (21.1). This matrix provides a simple way to represent the coefficients
appearing in (21.1), without writing up the variables x and y; the position of each
number implicitly describes how the numbers relates to each variable. Similarly, we
can construct a matrix corresponding to the system of three equations in (21.2) as
EXC2910 THE FIRST SEMESTER 87

the following  
a11 a12 a13 p1
 a21 a22 a23 p2  .
 

a31 a32 a33 p3


Again we see that the column to the left represents the variables multiplied with x,
the next column represents the variables multiplied by y, the third column from the
left represents the variables multiplied by z, and the column after the vertical line
represents the numbers on the left hand side of the equality signs in (21.2).
Similarly as with systems of equations, we can use simple manipulations directly
on the matrix in order to solve the system of equations. In fact, it is the same type
of operations that are allowed for matrices as for systems of equations. A simple way
of solving a system of equations in matrix form is called Gauss elimination method
or Gauss row reduction. We will present this method in the following example.
Consider the matrix !
1 2 −1
. (21.3)
−1 3 2
Our goal is to find two numbers (x, y) such that
! !
1 2 −1 1 0 x
= .
−1 3 2 0 1 y
To do this, we must manipulate the rows in the matrix. Essentially, each row
represents one equation with two unknown variables. Similarly as how we solve
systems of two equations, let us begin to add the first row to the second row. We
then get ! !
1+ 2 −1 1 2 −1
= . (21.4)
−1 + 1 3 + 2 2 + (−1) 0 5 1
Now multiply the second row by 15 . Then we see that
! !
1 2 −1 1 2 −1
= . (21.5)
0 5 51 1 15 0 1 15
Now, let us subtract 2 times the second row from the first row. We then get
! !
1 7
1 − 0 2 − 2 × 1 −1 − 2 × 5 1 0 −5
1
= .
0 1 5
0 1 15
Where we see that the right hand side is the matrix that we wanted to obtain. The
solution is therefore x = − 75 and y = 51 .
Let us do another example:
Example: Use Gauss elimination to reduce the following matrix.
!
−1 2 2
.
1 1 0
EXC2910 THE FIRST SEMESTER 88

First add 2× the second row to the first row, i.e.


! !
−1 + 2 × 1 2 + 2 × 1 2 + 2 × 1 1 4 4
= .
1 1 0 1 1 0
As we want the first number in the second row to be 0, we now subtract the first
equation from the second equation to get
! !
1 4 4 1 4 4
= .
1−1 1−4 0−4 0 −3 −4

Multiplying by − 13 in the second equation we get


! !
1 4 4 1 4 4
= .
0 −3 −1 3
−4 −1
3
0 1 43
At last, we multiply the second row by −4 and subtract it from the first row, in
order to obtain 0 in the second position in the first row. We then get
! ! !
1 4 − 4 × 1 4 − 4 × 43 1 0 12 3
− 16
3
1 0 − 4
3
4
= 4
= 4
.
0 1 3
0 1 3
0 1 3

Where the right hand side is the reduced matrix. Note that this implies that the
following system of equations
−x + 2y = 2
x+y =0
has the solution (x, y) = (− 34 , 43 ).

Gauss method of elimination can also be used to solve 3 dimensional systems of


equations. Indeed, we use exactly the same techniques, however, some more com-
putation is needed in order to obtain the reduced form. We illustrate this in the
following example.

Example: Use Gauss elimination method to find the reduced matrix associated
to  
1 0 2 4
 2 1 −1 0  . (21.6)
 

0 0 3 3
Our goal is now to use the elimination method to find a matrix
 
1 0 0 x
 0 1 0 y .
 

0 0 1 z
for some numbers x, y, z.
EXC2910 THE FIRST SEMESTER 89

In (21.6), we begin to multiply the third row by 31 , to complete the reduction of


this row:
   
1 0 2 4 1 0 2 4
 2 1 −1 0  =  2 1 −1 0  .
   

0 0 3 31 3 13 0 0 1 1
Multiply now the third row with 2 and subtract it from the first row to obtain
   
1−0 0−0 2−2×1 4−2×1 1 0 0 2
 2 1 −1 0 = 2 1 −1 0  .
   

0 0 1 1 0 0 1 1

Now we only need to deal with the second row. We note that this is simply combina-
tion of two operations, one involving the first row, and one involving the third row.
multiply the first row by 2 and subtract it from the second row to obtain. Begin to
multiply the first row by 2 and subtract from the second row. Then we get
   
1 0 0 2 1 0 0 2
 2 − 2 × 1 1 − 0 −1 − 0 0 − 2 × 2  =  0 1 −1 −4  .
   

0 0 1 1 0 0 1 1

At last add the third row to the second row to find


   
1 0 0 2 1 0 0 2
 0 1 −1 + 1 −4 + 1  =  0 1 0 −3  .
   

0 0 1 1 0 0 1 1

We have now obtained the reduced form of the matrix, and we see that (x, y, z) =
(2, −3, 1). This corresponds then to the solution of the following system of equations
with three unknowns
x + 2z = 4
2x + y − z = 0
3z = 3.

Exercise 21.1. Use Gauss elimination method to reduce the following two dimen-
sional matrices:

! ! !
−3 2 4 −1 1 1 −4 −1 5
a) b) c)
4 1 −2 2 1 −3 2 1 −1
.
EXC2910 THE FIRST SEMESTER 90

Exercise 21.2. Use Gauss elimination method to reduce the following two dimen-
sional matrices:
   
1 2 −3 2 −1 1 −1 2
a)  3 −4 1 0  b)  2 −1 2 0 
   

0 2 −1 1 2 −1 −1 1
.

Exercise 21.3. Consider the matrix


!
−1 2a 3
. (21.7)
1 −1 −4
Find the value of a which is such that the reduced form of the above matrix equals
!
1 0 − 92
. (21.8)
0 1 − 12

You might also like