Lect 1
Lect 1
1 Introduction
Calculus is a branch of mathematics that delves into the behavior of functions and the operations
that can be performed with them. It primarily revolves around four key subjects:
1. Limits: Understanding how functions behave as they approach a specific point.
2. Continuity: Investigating the smoothness of functions at individual points and across sets
of points.
3. Rates of Change: Examining how functions change, both from a physical perspective
(interpreting as rates of change) and a geometrical one (exploring tangent lines or planes on
function graphs). This leads to the concept of derivatives and differentials, which in turn
connects to linear functions, a topic studied in linear algebra.
4. Integration: The continuous summation or accumulation of functions.
At the heart of calculus lies a profound connection between the differential of a function, denoted
as df, and its integral:
Z
df = f +C ;
where C is a constan.
In this course, we will delve into these four fundamental concepts, exploring them in the context of
functions with two or more variables.
2 Multivariable functions
In these lectures, we use the notation Rn to denote the set of n-tuples (x1;:::; xn), where each xk for
k =1; 2; :::; n represents an independent variable belonging to the real numbers (R). It is important
to note that we typically treat each xk as an independent variable, distinct from the other variables.
When working with two-dimensional space, R2, the convention is to represent the independent
variables as x and y. Similarly, in three-dimensional space, R3, the convention includes variables
x; y, and z. Given that calculus in Rn shares similarities with that in R2, our primary focus will be
in calculus within the R2 space. However, it's important to note that the outcomes and conclusions
we discuss also apply seamlessly to higher-dimensional spaces.
1. While ancient Greece boasted great mathematicians like Eudoxus and Archimedes, the absence of the concept of infinity
in their mathematics delayed the discovery of calculus by almost two millennia. It was through the introduction of the notion
of infinitesimal quantities (which we now know as a contradictory concept) that figures like Isaac Newton and Leibniz
independently developed calculus. (The longstanding debate between British and German scholars over who deserves credit for
its invention spanned more than a century without a clear resolution.)
1
A two-variable function, denoted as z = f (x; y), assigns a distinct value of z to each point (x; y),
where x and y are considered independent variables.
y
f
(x; y)
x R
z
(x; y; z)
y R
u
0.5 0.8
0 0.6
0.4
-0.5
0.2
-1
-1 0 1
Exercise 1. Assume = 1 + sin(x) sin(y) is given as the mass density of some substance. Run the following
code in Matlab and generate the graph
x=-1:0.01:1;
2
y=x';
z = 1+sin(pi*x).*sin(pi*y)
imagesc(x,y,z);
set(gca,'YDir','normal')
colormap(flipud(gray))
colorbar
The output is as shown below
1 2
0.5 1.5
0 1
-0.5 0.5
-1 0
-1 0 1
Customize the code to represent the function in the domain [¡2; 2] [¡2; 2].
In multivariable calculus, we often need to find points on the xy-plane where a function has the
same value. To do this, we create level curve plots. These plots show lines that connect points
with the same function value. These plots help us see how values are spread out. They're useful for
understanding things in engineering and science.
2¡ y2
For example, the figure below depicts the level curves of the temperature function T (x; y) = e¡x
1
0.40.5 0.3
3 0.6
0.
0.5
0.7
0.9
0
0.4
0.8
0. 0.8
7
5
-0.5
0.
0.
0 0. 6 0.6 0.
3
0.3 .4 5
-1
-1 -0.5 0 0.5 1
We can see that level curves take the shape of circles. This can be understood from the following
2 2
math: If we have the function T (x; y) = e¡x ¡y = c, then we get x2 + y 2 =¡ln c. This is the same
as saying x2 + y 2 = C, where C is a non-negative constant.
Each curve on the diagram represents points with the same temperature. That's why they're also
known as isothermal points.
2
¡y2
Exercise 2. Determine the equation of level curves of the function f (x; y) = ex . The following code in Matlab
generates the level curves
x=-1:0.01:1;
y=x';
z=exp(x.^2-y.^2);
contour(x,y,z,'ShowText','on')
Run this code and determine the points with values less that 1.
3
Exercise 3. Consider the density function (x; y) = 1 + sin(x) sin(y). The following code in Matlab shows
only the level curves with values = 0.5 and = 1.5 in the domain [¡1; 1] [¡1; 1]:
x=-1:0.01:1;
y=x';
z = 1+sin(pi*x).*sin(pi*y);
contour(x,y,z,[0.5,1.5],'ShowText','on')
The output is shown below
1
0.5
1.5
0.5
0
0.5
1.5
-0.5
-1
-1 -0.5 0 0.5 1
Customize the code to generate the level curves in the domain [¡2; 2] [¡2; 2].
Exercise 4. Consider the function (x; y) = 1 + sin(x) sin(y). Run the following code in Matlab that generate
the surface of the function
xx=-1:0.01:1;
y=x';
z=1+sin(pi*x).*sin(pi*y);
surf(x,y,z), shading interp
xlabel('$x$','interpreter','latex','fontsize',10)
ylabel('$y$','interpreter','latex','fontsize',10)
zlabel('$z$','interpreter','latex','fontsize',10)
4
a) Modify the code to represent the surface in the domain [¡2; 2] [¡2; 2].
b) change the surf to surfc and run the command. It generate the surface and the level curves
c) Use the command surf and add the following code to generate both surface and the image:
hold on; imagesc(x,y,z)
you will get the following figure
Exercise 5. The level curves can also be shown on the surfaces. For example, we can illustrate the function
= 1 + sin(x) sin(y) with level curves on the surfaces as shown below
5
ylabel('$y$','interpreter','latex','fontsize',10)
zlabel('$z$','interpreter','latex','fontsize',10)
Modify the code to generate plot in the domain [¡2; 2] [¡2; 2].
As we can see from the exercises, the images of level curves and the image plot commonly used in
engineering and the surface diagrams are connected. They actually represent the same concept, just
presented in different ways.
Exercise 6. Generate the surface of the function f (x; y) = 2x ¡ y + 3. This surface is a plane in R3.
Exercise 7. Generate the surface of the function f (x; y) = x2. Note that for any fixed y = y0, the function
f (x; y0) is equal to f (x; y). In other word, the function f is independent of y. The surface is a translation of the
parabola f = x2 along the y-axis.
Exercise 8. Generate the surface pot of the function f (x; y) = x2 + y 2 in the domain [¡1; 1] [¡1; 1]. Compare
p
the surface to the surface of the function g(x; y) = x2 + y2 . What is the equation of the points with the value
z = 0.5 for function f (x; y)? What is the equation of this value for the function g(x; y)?
Exercise 9. Consider the function f (x; y) = x2 ¡ y2 defined on the domain [¡1; 1] [¡1; 1].
b) Fix y = 0 for the function f (x; y). This results in the function f (x; 0) = x2 which is a parabola. This
new function has a minimum at x = 0. Fix x = 0 for the function f (x; y). This results in the function
f (0; y) = ¡y2 which is a parabola with the maximum at y = 0.
Definition 1. Consider a subset D of R2. R2 is often visualized as the xy-plane, and D represents
a subset of this plane. A two-variable function z = f (x; y) associates each point (x; y) 2 D with a
real value on the z-axis.
y
Domain
(x; y)
D
x Range R
z
The set D is referred to as the domain of the function f, usually denoted as Df. The set ff (x; y);
(x; y) 2 Df g is known as the range of f, often represented as Rf.
p
Example 2. Let's consider the function f (x; y) = ln 1 ¡ 1 ¡ x2 ¡ y 2 . We determine the region
Df in R2 where this function is well-defined andp also find its range Rf . To ensure the function's
validity, we must have 1 ¡ x ¡ y 0 and 1 ¡ 1 ¡ x2 ¡ y 2 > 0. Combining these conditions, we
2 2
obtain the domain as the intersection of f(x; y); x2 + y 2 1g and f(x; y); 0 < x2 + y 2 1g, which
gives us
6
This represents a disk with radius 1, excluding the origin. Now, for any (x; y) in Df , we have
p
0<1¡ 1 ¡ x2 ¡ y 2 1:
As the logarithm is an increasing function, we find that the range of the function is Rf = (¡1; 0].
x2 + y 2
f (x; y) = :
2xy
Hint: note that x2 + y2 2xy.
y2
f (x; y) = :
x4 + y4 + 1
4 Implicit functions
The function z = f (x; y) is referred to as an explicit function because it provides the value of z
explicitly in terms of the values of x and y. An implicit function of two variables, x and y, takes
on the general form:
h(x; y; z) = 0;
x2 + y 2 + z 2 = 1;
is an implicit function, and z cannot be explicitly expressed as a function of x and y. The graph of
this function represents a sphere with a radius of 1.
7
5 Linear functions in Rn
In engineering mathematics, one of the most important types of functions is called linear functions.
We will learn later that when we want to understand how a function behaves near a specific
point, we often use something called 'linearization' at that point. This tool is extremely useful
for mathematicians and engineers who work in practical fields. Linear algebra is the branch of
mathematics that studies these types of functions.
Definition 3. A multivariable function z = f (x1;:::; xn) is called linear over Rn if it can be expressed
in the form:
z = c1x1 + + cn xn;
where c1; : : : ; cn are constants. An affine function, on the other hand, is defined as
z = c1x1 + + cn xn + d;
where d is a constant.
Example 4. The linear function in two variables, z = x + y, defines a plane in R3 that passes
through the points
Recall that a plane in R3 is uniquely determined by three non-collinear points. The affine function
z =1¡x¡ y
In a similar manner, the function u = x + y + z defines a hyperplane in R4 passing through the points
Indeed, for functions defined in higher-dimensional spaces, such as functions with three or more
independent variables, it becomes increasingly difficult to visualize the geometric interpretations
directly. While we can still work with and analyze these functions mathematically, their geometric
representation becomes less intuitive as the number of dimensions increases.
8
Remark 5. It's convenient to interpret a linear function as an operation on vectors. A linear
function f takes a vector and maps it to a scalar in the following way:
0 1
x1
B C
f (x
~ ) = [ c1 : : : cn ]@ A:
xn
With this interpretation, a linear function f can be represented as a row matrix [ c1 : : : cn ] where
ck ; k = 1; : : : ; n are constants. Linear algebra, as a field of study, delves into the properties of linear
maps and matrices from Rn to Rm, focusing on linear transformations that map vectors in Rn to
vectors in Rm.
Exercise 12. Let f be a linear function in Rn. Show the following relations
f (a ~x + b ~y) = af (x
~ ) + bf (y
~ );
Problem 1. Show that the range of a linear function is either the trivial set f0g or the whole of R.