Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Notes 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn -

DOUBLE INTEGRALS

C.A. DE BERNARDI

1
2 C.A. DE BERNARDI

Contents
1. Improper integrals 3
1.1. Integrals over unbounded intervals 3
1.2. Integrals of unbounded functions on bounded intervals 3
1.3. Unbounded intervals and unbounded functions 4
1.4. Integrability criteria 5
1.5. Exercises 5
2. Rn as normed space, functions of several variables and continuity 6
2.1. Functions of several variables and continuity 8
2.2. Exercises 9
3. Differential calculus for functions of two variables 9
3.1. First-order partial derivatives 10
3.2. Tangent plane 11
3.3. Level curves 11
3.4. Second-order partial derivatives 12
3.5. Unconstrained extrema 12
3.6. Exercises 13
4. Differential calculus for functions of n variables 14
4.1. First-order partial derivatives 14
4.2. Second-order partial derivatives 15
4.3. Unconstrained extrema 16
5. Appendix - The symbols ∼ and o 16
6. Convex functions 17
7. Vector valued functions 19
7.1. Exercises 20
8. Constrained optimization 21
8.1. Constrained optimization for functions of two variables 21
8.2. Lagrange multipliers method for a function of two variables and a
unique constraint function 21
8.3. Lagrange multipliers method: the general case 22
9. Double integrals 23
9.1. Integrals over rectangles 24
9.2. Integrals over simple domains 25
9.3. Change of variables 28
9.4. Exercises 29
10. Γ and β functions 29
References 30
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 3

1. Improper integrals
In the sequel we denote by R([a, b]) the class of bounded Riemann-integrable
functions on the interval [a, b]. The aim of the present section is to extend the
definition of integral in the following situations:
(i) the function is defined on an unbounded interval;
(ii) the function is defined on a bounded interval, on which it is unbounded.
We shall call integrals of this form improper integrals and we shall define them as
limits of classical Riemann-integrals.

1.1. Integrals over unbounded intervals. Let f be a function defined on an


unbounded interval [a, ∞) and suppose that, for each k > a, we have f ∈ R([a, k])
Rk
and let us denote Ik = a f (x) dx.
Definition 1.1. Let f be as above. If the limit
(1) I = lim Ik
k→∞

exists and is finite, f is said to be integrable in a generalized sense in the interval


[a, ∞). The value I of the limit is called the improper integral of f in [a, ∞) and we
write Z ∞
I= f (x) dx.
a

R ∞If the limit in (1) exists and it is finite (is ∞ or −∞, respectively) we say that
a f (x) dx
R ∞converges, (diverges, respectively). If the limit in (1) does not exist we
say that a f (x) dx does not exist. In a similar way we can define integrability in
a generalized sense in an interval (−∞, b].
Example
R∞ 1.2 (Important!). Let α > 0 and let us consider the improper integral
I = 1 x1α dx. Then a direct computation shows that:
(i) if 0 < α ≤ 1 then I diverges;
(ii) if α > 1 then I converges.
1.2. Integrals of unbounded functions on bounded intervals. Let f be a
function defined on a bounded interval (a, b) and suppose that, for each a < k < b,
we have f ∈ R([k, b]) (observe that this makes sense even if f is not defined at b).
Rb
Let us denote Ik = k f (x) dx.
Definition 1.3. Let f be as above. If the limit
(2) I = lim Ik
k→a+

exists and is finite, f is said to be integrable in a generalized sense in the interval


(a, b). The value I of the limit is called the improper integral of f in (a, b) and we
write
Z b
I= f (x) dx.
a
4 C.A. DE BERNARDI

If the limit in (2) exists and it is finite (is ∞ or −∞, respectively) we say that
Rb
a f (x) dx
Rb
converges, (diverges, respectively). If the limit in (2) does not exist we
say that a f (x) dx does not exist. In a similar way we can define integrability in
a generalized sense of a function f defined on a bounded interval (a, b) and such
that, for each a < k < b, we have f ∈ R([a, k]). Observe that if f ∈ R([a, b]) then
the corresponding improper integral converges and coincides with the corresponding
classical Riemann integral.

Example 1.4 (Important!). Let α > 0 and let us consider the improper integral
R1
I = 0 x1α dx. Then a direct computation shows that:
(i) if α ≥ 1 then I diverges;
(ii) if 0 < α < 1 then I converges.

1.3. Unbounded intervals and unbounded functions. Now, suppose that f is


a function defined on the interval (a, b) (with −∞ ≤ a < b ≤ ∞) and suppose that,
for each h, k ∈ (a, b) such that h < k, we have f ∈ R([h, k]). Fix any c ∈ (a, b) and
consider the (possibly improper) integrals
Z b Z c
f (x) dx and f (x) dx.
c a

Definition 1.5. If both the above (possibly improper) integrals are convergent, we
say that f is integrable in a generalized sense in the interval (a, b) and we put
Z b Z b Z c
f (x) dx = f (x) dx + f (x) dx.
a c a

(It is easy to see that the above definition does not depend on the choice of c.)

Remark 1.6. Observe R ∞that, in general, in order to determine the convergence of


the improper integral −∞ f (x) dx it is not sufficient to study the limit
Z k
(3) lim f (x) dx.
k→∞ −k

To see this, consider the following example: let g : R → R be the function defined
x
Rk
by g(x) = 1+x 2 . By symmetry, we have that −k g(x) dx is null, whenever k > 0.
Hence, the limit in (3) is convergent. Despite this fact, a direct computation easily
shows that the improper integrals
Z ∞ Z 0
g(x) dx, g(x) dx,
0 −∞

diverge and hence g is not integrable in a generalized sense in (−∞, ∞). However,
the following fact holds true.
R∞
If the improper integral −∞ f (x) dx converges then its value coincides with the
limit in (3).
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 5

1.4. Integrability criteria. Let us introduce three useful results in studying con-
vergence of improper integrals. We present these results for function defined on
unbounded intervals of the form [a, ∞). Analogous results hold for the other types
of improper integrals introduced above. Let us start by considering two criteria for
non-negative functions.
Proposition 1.7 (Comparison test). Let f, g be functions defined on an unbounded
interval [a, ∞) and suppose that, for each k > a, we have f, g ∈ R([a, k]). Suppose
that, for each x ∈ [a, ∞) we have 0 ≤ f (x) ≤ g(x). Then:
R∞ R∞
(i) if Ra g(x) dx converges alsoR a f (x) dx converges;
∞ ∞
(ii) if a f (x) dx diverges also a g(x) dx diverges.

Proposition 1.8 (Asymptotic comparison test). Let f, g be non-negative functions


defined on an unbounded interval [a, ∞) and suppose that, forReach k > a, we have

f, g ∈ R([a, k]).
R ∞Suppose that f (x) ∼ g(x) as x → ∞. Then a g(x) dx converges
if and only if a f (x) dx converges.
If the functions considered have a sign which is not eventually constant, the
following criterion may be useful.
Proposition 1.9 (Absolute convergence test). Let f be a function defined on an
R ∞ [a, ∞) and suppose that, for Reach
unbounded interval

k > a, we have f ∈ R([a, k]).
Suppose that a |f (x)| dx converges. Then also a f (x) dx converges and we have
Z ∞ Z ∞


f (x) dx ≤ |f (x)| dx.
a a

1.5. Exercises.
Exercise 1.1. Study the convergence of the following improper integrals.
R∞√
(i) 0 x + 1e−x dx
R ∞ e2x+1
(ii) 0 (e2x +4)2 dx
R∞ 3
(iii) 2 x ln(x) dx
R ∞ ln(x2020 )
(iv) 2 2021 dx
R ∞ exx+ln(x2 +3)−√x2 +1
2020

(v) 2 x5 +√sin x+3+ 1 ex dx


R1 x 2
(vi) 0 sinx 3/2 dx
R 12
(vii) 0 x ln32 (x) dx
R 1 2 +1
(viii) 03 3x √ x dx
R 1 1 xe1
(ix) 0 √ 3 x dx
R +∞ x3e 3
(x) 2 dx
R ∞ sinx2x ln x
(xi) 1 x3/2 dx
R∞ x
(xii) 0 sin x3/2
dx
6 C.A. DE BERNARDI

Exercise 1.2. Study, for β > 0, the convergence of the improper integral
Z ∞
1
dx.
2 x lnβ (x)
For β = 2, compute the value of the corresponding improper integral.
1
Solution. Let f (x) = x lnβ (x)
and observe that:
1 1
(i) if β ̸= 1, F (x) = 1−β lnβ−1 (x)
of f on the interval (2, ∞);
is an antiderivative
(ii) if β = 1, F (x) = ln | ln(x)| is an antiderivative of f on the interval (2, ∞).
A simple computation shows that the improper integral converges if and only if
β > 1.
For β = 2, by the above observation, we have
Z ∞ Z k
1 1 1 1 1
2 dx = lim 2 dx = lim [− + ]= .
2 x ln (x) k→∞ 2 x ln (x) k→∞ ln(k) ln(2) ln(2)

Exercise 1.3. Study, for α > 0, the convergence of the improper integral
Z +∞
1 x2021 − 2021 ln x − 2020x2020
dx.
2 xα x + e−x
1 x2021 −2021 ln x−2020x2020
Solution. Observe that eventually, as x → ∞, xα x+e−x
> 0.
1 x2021 −2021 ln x−2020x2020 1
Moreover, xα x+e−x
∼ xα−2020 as x → ∞. Hence the improper inte-
gral converges if and only if α > 2021.

2. Rn as normed space, functions of several variables and continuity


We denote by Rn the sets of all n-tuples of real numbers, that is,
Rn = {(x1 , . . . , xn ); x1 , . . . , xn ∈ R}.
The sum and the product by a scalar are defined component by component. That
is, if x = (x1 , . . . , xn ) and y = (y1 , . . . , yn ) are elements of Rn and α ∈ R then
x + y = (x1 + y1 , . . . , xn + yn ) and αx = (αx1 , . . . , αxn ).
Rn with these two operations is a vector space.
The vectors of Rn can be associated in bijective way to the column vectors with
n components, that is matrices of type (n, 1). So, we shall use also the following
equivalent notation for x ∈ Rn :
 
x1
x =  ...  .
 

xn
Given x, y ∈ Rn , the dot (or scalar) product of x and y is defined as
x · y = xT y = x1 y1 + . . . + xn yn .
In particular, we have
x · x = x21 + . . . + x2n .
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 7

The norm of a vector x ∈ Rn is the real number


√ q
∥x∥ = x · x = x21 + . . . + x2n .
The norm satisfies the following properties:
• ∥x∥ ≥ 0, whenever x ∈ Rn ;
• ∥x∥ = 0 if and only if x = (0, . . . , 0);
• ∥ax∥ = |a| ∥x∥, for every a ∈ R, x ∈ Rn ;
• ∥x + y∥ ≤ ∥x∥ + ∥y∥, for every x, y ∈ Rn (triangular inequality);
• |x · y| ≤ ∥x∥ ∥y∥, for every x, y ∈ Rn (Cauchy–Schwarz inequality).
Taking into account the last inequality, we can introduce the notion of the angle
θ ∈ [0, π] between two not null vectors x ed y, defined by
x·y
cos θ = .
∥x∥∥y∥
We say that two vectors are orthogonal if θ = π2 . This fact is equivalent to say that
their dot product is null. Starting from the notion of norm, we define the (euclidean)
distance between vectors x, y ∈ Rn as
d(x, y) = ∥x − y∥.
The following properties of the distance hold:
• d(x, y) ≥ 0, ∀x, y ∈ Rn ,
• d(x, y) = 0 if and only if x = y;
• d(x, y) = d(y, x), ∀ x, y ∈ Rn ;
• d(x, y) ≤ d(x, z) + d(z, y), ∀ x, y, z ∈ Rn .
Remark 2.1. In the case n = 2, 3, the vectors of Rn can be geometrically repre-
sented, respectively, as arrows in the plane and in the three-dimensional Cartesian
space. In this case the sum of two vectors may be represented graphically using the
so called parallelogram rule.
Moreover, the norm of a vector x represents the length of the corresponding arrow,
i.e., the length of the segment whose end points are the origin and the point of the
plane or of the three-dimensional space corresponding to x.
Definition 2.2. We call (circular) neighbourhood of a point x0 ∈ Rn with radius r
the open ball B(x0 , r) with radius r > 0 and centre x0 , i.e., the set defined by
B(x0 , r) = {x ∈ Rn ; d(x, x0 ) < r}
Since we have introduced a notion of neighbourhood of a point in Rn , we can also
introduce in Rn the following topological notions. Let us consider a set A ⊂ Rn .
(i) x0 ∈ Rn is an interior point of A if there exists a neighbourhood of x0
entirely contained in A. A set is open when all its points are interior points.
(ii) x0 ∈ Rn is a boundary point of A when every neighbourhood of x0 contains
points both of A and of the complement of A. The set of all the boundary
points of A is denoted by ∂A.
(iii) A set is closed when it contains all its boundary points. Given a set A ⊂ Rn ,
the closure of A is the set cl(A) = A ∪ ∂A.
8 C.A. DE BERNARDI

(iv) x0 ∈ Rn is a limit point (or accumulation point) of A if every neighbourhood


of x0 contains infinitely many elements of A. We remark that a limit point
of A is not necessarily an element of A.
(v) A is said to be bounded if there exists a real number r > 0 such that
A ⊂ B(0, r).
(vi) A bounded and closed set is called compact.

2.1. Functions of several variables and continuity. Let A ⊂ Rn and let f :


A → R be a function. We say that A is the domain of f and that f (A) is the image
of f . The graph of f is the subset of Rn+1 defined by:
G(f ) = {(x1 , . . . , xn , z) ∈ Rn+1 ; (x1 , . . . , xn ) ∈ A, z = f (x1 , . . . , xn )}.
Definition 2.3. Let A ⊂ Rn and let f : A → R. We say that f is bounded from
above if there exists K ∈ R such that f (x) ≤ K, whenever x ∈ A. Similarly, we say
that f is bounded from below if there exists H ∈ R such that f (x) ≥ H, whenever
x ∈ A. Finally, we say that f is bounded if f is bounded from above and below.
Definition 2.4. Let A ⊂ Rn and let f : A → R. We say that x0 ∈ A is a
global maximum (minimum, respectively) point and that f (x0 ) is the global maximum
(minimum, respectively) for f on A if, for each x ∈ A, we have f (x) ≤ f (x0 )
(f (x) ≥ f (x0 ), respectively).
We recall also the respective local notions.
Definition 2.5. Let A ⊂ Rn and let f : A → R. We say that x0 ∈ A is a
local maximum (minimum, respectively) point and that f (x0 ) is the local maximum
(minimum, respectively) for f on A if there exists a neighbourhood U of x0 such
that, for each x ∈ A ∩ U , we have f (x) ≤ f (x0 ) (f (x) ≥ f (x0 ), respectively).
Definition 2.6. Let x ∈ A ⊂ Rn and let f : A → R. We say that f is continuous
at x if if for every ε > 0 there exists δ > 0 such that |f (y) − f (x)| < ε whenever
y ∈ A ∩ B(x, δ). We say that f is continuous on A if f is continuous at each point
of A.
In general, directly verifying the continuity of a given function can be rather
complicated. Observe that:
(i) polynomial functions in several variable are continuous functions;
(ii) sum and product of continuous functions are continuous functions;
(iii) quotient of continuous functions (with non null denominator) is a continuous
functions;
(iv) composition of continuous functions is a continuous function.
Theorem 2.7 (Weierstrass Theorem). Let A be a compact subset of Rn and f :
A → R a continuous function. Then f attains its maximum and minimum value on
A. That is, there exist x1 , x2 ∈ A such that, for each x ∈ A, we have
f (x1 ) ≤ f (x) ≤ f (x2 ).
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 9

2.2. Exercises.
Exercise 2.1. Let x = (1, 2, 3) ∈ R3 and y = (0, 1, 0) ∈ R3 . Let us denote by θ the
angle between x and y. Determine cos θ.
Exercise 2.2. Let x = (1, 2, 3, 4) ∈ R4 and y = (0, 1, 0, 1) ∈ R4 . Let us denote by θ
the angle between x and y. Determine cos θ.
Exercise 2.3. Determine the interior and the boundary of the following subsets of
R2 . Then determine whether the sets are closed/open/bounded/compact.
(i) S1 = {(x, y) ∈ R2 ; (x + 1)2 + y 2 ≤ 1} ∪ {(1, 1)}.
(ii) S2 = {(x, y) ∈ R2 ; x = 1}.
(iii) S3 = {(x, y) ∈ R2 ; |x| + |y| < 1}.
(iv) S4 = {( n1 , 1) ∈ R2 ; n ∈ N}.
(v) S5 = S4 ∪ ∂S3 .
(vi) S6 = {(x, y) ∈ R2 ; (x + 1)2 + y 2 ≤ 2} ∪ {(x, y) ∈ R2 ; (x − 1)2 + y 2 ≤ 2}.
Exercise 2.4. Determine the interior and the boundary of the following subsets of
R. Then determine whether the sets are closed/open/bounded/compact.
(i) S1 = [0, 1).
(ii) S2 = (−∞, 1) ∪ {2}.
(iii) S3 = Q.
(iv) S4 = { n1 ∈ R; n ∈ N}.
(v) S5 = R \ N.
Exercise 2.5. (*) Find (if possible) an example of a subset S of R such that ∂S is
an open set.
Exercise 2.6. (*) Determine whether the following sentences are true or false.
(i) If A and B are closed subsets of Rn then A ∩ B and A ∪ B are closed sets.
(ii) If A and B are open subsets of Rn then A ∩ B and A ∪ B are open sets.
(iii) Let A be a subset of Rn , then A is open if and only if Rn \ A is closed.
(iv) If A is a subset of Rn then ∂A and A ∪ ∂A are closed sets.
(v) Let A be a closed subset of Rn and let us denote by intA the set of all
interior points of A. Then it holds ∂A = A \ intA.
Exercise 2.7. Prove that the function
 2
x
for y ̸= 0
f (x, y) = y
0 for y = 0

is not continuous at (x0 , y0 ) = (0, 0).

3. Differential calculus for functions of two variables


In this section, we suppose that A is an open subset of R2 and that f : A → R.
10 C.A. DE BERNARDI

3.1. First-order partial derivatives. Let (x0 , y0 ) ∈ A and let us consider the
following difference quotients of f with respect to x and y, respectively:
∆x f (x0 , y0 , h) f (x0 + h, y0 ) − f (x0 , y0 )
=
h h
∆y f (x0 , y0 , k) f (x0 , y0 + k) − f (x0 , y0 )
=
k k
If the limits
∆x f (x0 , y0 , h) ∆y f (x0 , y0 , k)
lim , lim
h→0 h k→0 k
are finite, they are called respectively partial derivative of f with respect to x and
partial derivative of f with respect to y at (x0 , y0 ). We denote them by the following
equivalent symbols:
fx (x0 , y0 ), fy (x0 , y0 )
∂f ∂f
(x0 , y0 ), (x0 , y0 )
∂x ∂y
Dx f (x0 , y0 ), Dy f (x0 , y0 ).
The gradient of f at (x0 , y0 ) is the row vector whose components are the first-order
partial derivatives of f :
 
∇f (x0 , y0 ) = fx (x0 , y0 ) fy (x0 , y0 ) .
Once we have introduced the definition of partial derivatives at a point, we can
consider the partial derivative functions defined as follows. Suppose that B is a
subset of A and that the partial derivative fx (x, y) exists for each (x, y) ∈ B. Then
we can consider the function fx : B → R that associates with every (x, y) ∈ B the
value fx (x, y). The function fy is defined similarly.
Observe that the existence of both the partial derivatives of f at a point (x0 , y0 )
does not imply the continuity of f at (x0 , y0 ). To see this, observe that the function
introduced in Exercise 2.7 admits partial derivatives at (0, 0) but it is not continuous
at the same point. Nevertheless, we have the following important result.
Theorem 3.1. Suppose that (x0 , y0 ) ∈ A and that fx , fy exist on a neighbourhood
of (x0 , y0 ) and are continuous functions at (x0 , y0 ). Then, if we denote by v the
gradient of f at (x0 , y0 ), we have the following formula:
 
h
(4) f (x0 + h, y0 + k) = f (x0 , y0 ) + v · + o(∥(h, k)∥), ∥(h, k)∥ → 0.
k
Definition 3.2. Let (x0 , y0 ) ∈ A. If there exists a row vector v such that (4) is
satisfied we say that f is differentiable at (x0 , y0 ).
It is easy to see that if f is differentiable at (x0 , y0 ) then f is continuous at
the same point. Indeed, if f is differentiable at (x0 , y0 ), by the Cauchy–Schwarz
inequality, we have
|f (x0 + h, y0 + h) − f (x0 , y0 )| ≤ ∥v∥ ∥(h, k)∥ + o(∥(h, k)∥),
and the right hand side goes to 0 as ∥(h, k)∥ → 0. Hence, Theorem 3.1 implies the
following corollary.
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 11

Corollary 3.3. Suppose that (x0 , y0 ) ∈ A and that fx , fy exist on a neighbourhood


of (x0 , y0 ) and are continuous functions at (x0 , y0 ). Then f is continuous at (x0 , y0 ).
From now on, we denote by C 1 (A) the class of all functions whose partial deriva-
tives exist and are continuous on A.

3.2. Tangent plane. For one-variable functions, existence of the derivative at a


point, can be geometrically interpreted as existence of the tangent line to the graph
of the function at the corresponding point. More precisely, if C is an open subset of
R and g : C → R is differentiable at x0 ∈ C, we have
g(x0 + h) = g(x0 ) + g ′ (x0 )h + o(h), h → 0.
Hence, y = g(x0  ) + g ′ (x
0 )(x − x0 ) is the equation of the the tangent line to the graph
of g at x0 , g(x0 ) .
Let us explain the analogous geometric meaning of differentiability for two-vari-
ables functions. Let (x0 , y0 ) ∈ A and suppose that f is differentiable at (x0 , y0 ).
Then, in the sense expressed by (4) and taking h = (x − x0 ) and k = (y − y0 ), we
can say that the function f can be “well” approximated, as ∥(h, k)∥ → 0, by the
affine function L : R2 → R defined by
L(x, y) = f (x0 , y0 ) + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).
Equivalently, the plane π with equation
z = f (x0 , y0 ) + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ),

is the tangent plane to the graph of f at x0 , y0 , f (x0 , y0 ) .

3.3. Level curves. Let α ∈ f (A), then the subset of R2


Lf (α) = {(x, y) ∈ A : f (x, y) = α}
is called level curve (at height α). The level curves are obtained by projecting on
the plane xy the points in the intersection between graph of f and the plane z = α.
Exercise 3.1. Study the level curves of the following functions: f (x, y) = 3x − 2y,
f (x, y) = x2 + y 2 f (x, y) = x2 − 3x − y
Let (x0 , y0 ) ∈ A and suppose that f is differentiable at (x0 , y0 ) and that ∇f (x0 , y0 )
is not null. Let z0 = f (x0 , y0 ) and consider the level curve Lf (z0 ) with equa-
tion f (x, y) = z0 . Now, let us consider π the tangent plane to the graph of f at
x0 , y0 , f (x0 , y0 ) with equation
z = f (x0 , y0 ) + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).
If we consider the intersection between π and the plane with equation z = z0 , we
obtain the line with equation
z = z0 , fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) = 0.
Hence, the line contained in the xy plane with equation
fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) = 0
12 C.A. DE BERNARDI

is the tangent line to the level curve Lf (z0 ). The previous argument shows that,
under our hypotheses, the line tangent to the level curve Lf (z0 ) at (x0 , y0 ) is the
unique line passing through (x0 , y0 ) and orthogonal to ∇f (x0 , y0 ). See also [1,
Figure 10.9].
3.4. Second-order partial derivatives. Suppose that f ∈ C 1 (A) and consider
the functions fx : A → R and fy : A → R. Suppose that (x0 , y0 ) ∈ A and that fx , fy
admit partial derivatives at (x0 , y0 ) (both with respect to x and y). Then, we can
introduce the so called second-order partial derivatives of f at (x0 , y0 ), defined as
follows:
fxx (x0 , y0 ) = (fx )x (x0 , y0 ), fxy (x0 , y0 ) = (fx )y (x0 , y0 ),
fyy (x0 , y0 ) = (fy )y (x0 , y0 ), fyx (x0 , y0 ) = (fy )x (x0 , y0 ).
The Hessian matrix is the matrix whose elements are the second-order partial deriva-
tives:  
fxx (x0 , y0 ) fxy (x0 , y0 )
Hf (x0 , y0 ) = .
fyx (x0 , y0 ) fyy (x0 , y0 )
In general, it can happen that fxy (x0 , y0 ) ̸= fyx (x0 , y0 ), however, the following
important result hold.
Theorem 3.4 (Schwarz’s Theorem). Let (x0 , y0 ) ∈ A, suppose that the second-
order partial derivatives fxy and fyx exist in a neighbourhood of (x0 , y0 ) and are
continuous at (x0 , y0 ). Then it holds fxy (x0 , y0 ) = fyx (x0 , y0 ).
Let us denote by C 2 (A) the class of all functions whose second-order partial
derivatives exist and are continuous at every point of A. Let f ∈ C 2 (A) and
(x0 , y0 ) ∈ A, it is possible to prove that:
f (x0 + h, y0 + k) = f (x0 , y0 )+
+ [fx (x0 , y0 )h + fy (x0 , y0 )k]+
1
[fxx (x0 , y0 )h2 + fyy (x0 , y0 )k 2 + 2fxy (x0 , y0 )hk]+
2
+ R(h, k),
where R(h, k) is o(∥(h, k)∥2 ), as ∥(h, k)∥ → 0. The last equality is known as sec-
ond order Taylor formula at (x0 , y0 ). The quadratic function q, depending on two
variables and defined by
q(h, k) = fxx (x0 , y0 )h2 + fyy (x0 , y0 )k 2 + 2fxy (x0 , y0 )hk,
is called Hessian quadratic form.
3.5. Unconstrained extrema. Let us start by considering the following first order
necessary condition.
Theorem 3.5 (Fermat’s theorem). Let f : A ⊆ R2 → R have partial derivatives at
a point (x0 , y0 ) ∈ A. If (x0 , y0 ) is a local maximum (minimum) point for f then
(
fx (x0 , y0 ) = 0
,
fy (x0 , y0 ) = 0
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 13

i.e.,∇f (x0 , y0 ) is null.


A point at which the gradient vanishes is called stationary point. A stationary
point (x0 , y0 ) such that is nor a local minimum point neither a local maximum point
is called saddle point. When such case occurs, in each ball centred at (x0 , y0 ) there
exist a point at which the value taken by f is greater than f (x0 , y0 ) and an other
point at which the value taken by f are less than f (x0 , y0 ). Let us consider the
following examples:
• f (x, y) = xy, (x0 , y0 ) = (0, 0)
• f (x, y) = (y − x2 )(y − 2x2 ), (x0 , y0 ) = (0, 0).
In order to determine the type of a stationary point (x0 , y0 ) we should study the
sign of the expression:
(5) f (x0 + h, y0 + k) − f (x0 , y0 ),
Suppose that f ∈ C 2 (A) and that (x0 , y0 ) is a stationary point for f , by the Taylor
formula, the expression in (5) coincides with:

1
(6) [fxx (x0 , y0 )h2 + fyy (x0 , y0 )k 2 + 2fxy (x0 , y0 )hk] + R(h, k),
2
where R(h, k) is o(∥(h, k)∥2 ), as ∥(h, k)∥ → 0.
Using the previous fact it is possible to prove that:
• if q(h, k) is definite positive then (x0 , y0 ) is a strict local minimum point for
f;
• if q(h, k) is definite negative then (x0 , y0 ) is a strict local maximum point
for f ;
• if q(h, k) is indefinite then (x0 , y0 ) is a saddle point for f ;
• if q(h, k) is semidefinite (both positive or negative) we have no sufficient in-
formations about the behaviour of f around (x0 , y0 ). In order to determine
the type of this point we should do further analysis.
Therefore, if we consider the determinant of the Hessian matrix of f at (x0 , y0 )
det Hf (x0 , y0 ) = fxx (x0 , y0 )fyy (x0 , y0 ) − (fxy (x0 , y0 ))2
we obtain the following second order sufficient optimality conditions:
• if fxx (x0 , y0 ) > 0 and det Hf (x0 , y0 ) > 0 then (x0 , y0 ) is a strict local
minimum point for f ;
• if fxx (x0 , y0 ) < 0 and det Hf (x0 , y0 ) > 0 then (x0 , y0 ) is a strict local
maximum point for f ;
• if det Hf (x0 , y0 ) < 0 then (x0 , y0 ) is a saddle point for f ;
• if det Hf (x0 , y0 ) = 0 nothing can be said without additional analysis

3.6. Exercises.
Exercise 3.2. Determine the stationary points of the function f (x, y) = ln(x2 +
y 2 − y).
14 C.A. DE BERNARDI

Solution. The domain of f is the open set


A = {(x, y) ∈ R2 ; x2 + y 2 − y > 0}.
Observe that f ∈ C 1 (A) and that, for each (x, y) ∈ A, we have
2x 2y − 1
∇f (x, y) = ( , 2 ).
x2 + y − y x + y2 − y
2

Since (0, 12 ) ̸∈ A, f does not have stationary points.


Exercise 3.3. Write the second order Taylor formula for the function f at the point
(x0 , y0 ) indicated.
(i) f (x, y) = epy ln x , (x , y ) = (1, 0).
0 0
3
(ii) f (x, y) = 1 + x − y 2 , (x0 , y0 ) = (0, 0).
Exercise 3.4. Consider the function f : R2 → R defined by f (x, y) = yex + y 2 + 1.
(i) Let x0 = (0, 1) and compute f (x0 ).
(ii) Determine the Jacobian matrix of f and evaluate it at x0 .
1 11
(iii) Let x1 = (− 10 , 10 ) and estimate f (x1 ) using a linear approximation of f at
(x0 ), i.e., compute
f (x0 ) + ∇f (x0 )(x1 − x0 ).
(iv) Determine the Hessian matrix of f and evaluate it at x0 .
(v) Estimate f (x1 ) using a quadratic approximation of f at x0 , that is, compute
1
f (x0 ) + ∇f (x0 )(x1 − x0 ) + (x1 − x0 )T Hf (x0 )(x1 − x0 ).
2
4. Differential calculus for functions of n variables
In this section, we suppose that A is an open subset of Rn and that f : A → R.

4.1. First-order partial derivatives. Let us consider the canonical basis of Rn


consisting of the vectors {e1 , . . . , en }. Let a = (a1 , . . . , an ) ∈ A and let us consider
the following difference quotients of f with respect to the variables xk (1 ≤ k ≤ n)
with increment h:
∆xk f (a, h) f (a + hek ) − f (a)
= .
h h
If the limit
∆xk f (a, h)
lim
h→0 h
is finite, it is called partial derivative of f with respect to xk at a. We shall also use
the following equivalent symbols:
∂f
fxk (a), (a), Dxk f (a).
∂xk
The gradient of f at a is the row vector whose components are the first-order partial
derivatives of f :  
∇f (a) = fx1 (a) . . . fxn (a) .
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 15

Once we have introduced the definition of partial derivatives at a point, we can


consider the partial derivatives functions defined as follows. Suppose that B is a
subset of A and that the partial derivative fxk (a) exists for each a ∈ B. Then we
can consider the function fxk : B → R that associates with every a ∈ B the value
fxk (a).
We have the following important result.
Theorem 4.1. Suppose that a ∈ A and that all the partial derivatives fxk (1 ≤ k ≤
n) exist on a neighbourhood of a and are continuous functions at a. Then, if we
denote by v the gradient of f at a, we have the following formula:
(7) f (a + w) = f (a) + v · w + o(∥w∥), ∥w∥ → 0.
Definition 4.2. Let a ∈ A. If there exists a row vector v such that (4) is satisfied
we say that f is differentiable at a.
It is easy to see that if f is differentiable at a then f is continuous at the same
point. Indeed, if f is differentiable at a, by the Cauchy–Schwarz inequality, we have
|f (a + w) − f (a)| ≤ ∥v∥ ∥w∥ + o(∥w∥),
and the right hand side goes to 0 as ∥w∥ → 0. Hence, Theorem 3.1 implies the
following corollary.
Corollary 4.3. Suppose that a ∈ A and that all the partial derivatives fxk (1 ≤
k ≤ n) exist on a neighbourhood of a and are continuous functions at a. Then f is
continuous at a.
As in the two variables case, we denote by C 1 (A) the class of all functions whose
partial derivatives exist and are continuous on A.

4.2. Second-order partial derivatives. Suppose that f ∈ C 1 (A) and consider


the functions fxk : A → R (1 ≤ k ≤ n). Suppose that a ∈ A and that fxk
(1 ≤ k ≤ n) admit partial derivatives at a with respect to xh (1 ≤ h ≤ n). Then,
we can introduce the so called second-order partial derivatives of f at a, defined as
follows:
fxk xh (a) = (fxk )xh (a).
The Hessian matrix is the matrix whose elements are the second-order partial deriva-
tives:  
fx1 x1 (a) . . . fx1 xn (a)
Hf (a) =  .. ..
.
 
. .
fxn x1 (a) . . . fxn xn (a)
In general, it can happen that fxk xh (a) ̸= fxh xk (a), however, the following impor-
tant result hold.
Theorem 4.4 (Schwarz’s Theorem). Let a ∈ A and 1 ≤ h, k ≤ n, suppose that the
second-order partial derivatives fxk xh , fxh xk exist in a neighbourhood of a and are
continuous at a. Then it holds fxk xh (a) = fxh xk (a).
16 C.A. DE BERNARDI

Let us denote by C 2 (A) the class of all functions whose second-order partial
derivatives exist and are continuous at every point of A. Let f ∈ C 2 (A) and (a) ∈ A,
it is possible to prove that:
1
f (a + w) = f (a) + ∇f (a) · w + wT Hf (a)w + R(w),
2
2
where R(w) is o(∥w∥ ), as ∥w∥ → 0. The last equality is known as the second order
Taylor formula at a. The quadratic function q, defined by
q(w) = wT Hf (a)w,
is called Hessian quadratic form.

4.3. Unconstrained extrema. As in the two variables case, we have the following
first order necessary condition.
Theorem 4.5 (Fermat’s theorem). Let f : A → R have partial derivatives at a
point a ∈ A. If a is a local maximum (minimum) point for f then ∇f (a) is null.
A point where the gradient vanishes is called stationary point. A stationary point
a such that is nor a local minimum point neither a local maximum point is called
saddle point. When such case occurs, in each ball centred at a there exist a point
at which the value taken by f is greater than f (a) and an other point at which the
value taken by f are less than f (a).
In order to determine the type of a stationary point a ∈ A we should study the
sign of the expression:
(8) f (a + w) − f (a),
If f ∈ C 2 (A)
and a is a stationary point for f , by the second order Taylor formula,
the expression in (8) coincides with

(9) wT Hf (a)w + R(w),


where R(w) is o(∥w∥2 ), as ∥w∥ → 0.
Using the previous fact it is possible to prove that:
• if q(w) is definite positive then a is a strict local minimum point for f ;
• if q(w) is definite negative then a is a strict local maximum point for f ;
• if q(w) is indefinite then a is a saddle point for f ;
• if q(w) is semidefinite (positive or negative) we have no sufficient informa-
tions about the behaviour of f around a. In order to determine the type of
this point we should do further analysis.

5. Appendix - The symbols ∼ and o


Definition 5.1. Let p ∈ R = R ∪ {±∞} and let f, g be two functions defined in a
neighbourhood of p except at most at the point p. Suppose that eventually g(x) ̸= 0
as x → p, that is, there exists a suitable neighbourhood of p on which g is not null,
except at most at the point p. We say that:
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 17

(i) f (x) is asymptotic to g(x) (and we write f (x) ∼ g(x)) as x → p if and only
if limx→p fg(x)
(x)
= 1;

(ii) f (x) is little-o of g(x) (and we write f (x) = o g(x) ) as x → p if and only
if limx→p fg(x)
(x)
= 0;

Fact 5.2 (Main properties of ∼). Suppose that f1 (x) ∼ f2 (x) and g1 (x) ∼ g2 (x) as
x → p. Then the following properties hold:
(i) limx→p f1 (x) exists if and only if limx→p f2 (x) exists. In the case both the
limits exist, they coincide;
(ii) eventually, as x → p, sign f1 (x) = sign f2 (x);
(iii) f1 (x)g1 (x) ∼ f2 (x)g2 (x), as x → p;
(iv) f1 (x)/g1 (x) ∼ f2 (x)/g2 (x), as x → p;
(v) |f1 (x)| ∼ |f2 (x)|, as x → p;
(vi) if f1 (x), f2 (x) are eventually positive as x → p and α ∈ R, then [f1 (x)]α ∼
[f2 (x)]α , as x → p.
Fact 5.3 (Main properties of o). Let c ∈ R \ {0} and let f, g be as in Definition 5.1.
Let x → p, then:
(i) o(c · g(x)) = o(g(x));
(ii) o(g(x)) + o(g(x)) = o(g(x));
(iii) if f (x) = o(g(x)) then [f (x)]α = o([g(x)]α ), whenever α > 0;
(iv) if f (x) is eventually non null as x → p, then f (x) o(g(x)) = o(f (x) g(x));
(v) if f (x) is eventually non null as x → p, then o(f (x)) o(g(x)) = o(f (x) g(x));
(vi) o(o(g(x))) is o(g(x)).
Proposition 5.4. Let g be as in Definition 5.1. Then
g(x) + o(g(x)) ∼ g(x),
as x → p.
Remark 5.5. (i) Proposition 5.4 states, roughly speaking, that a function
that is o(g(x)) is negligible with respect to g(x).
(ii) Let f1 (x) ∼ f2 (x) and g1 (x) ∼ g2 (x) as x → p. Observe that, in general,
the relation f1 (x) + g1 (x) ∼ f2 (x) + g2 (x) does not hold. The same, if we
consider the composition with a function. That is, if h : R → R, in general,
the relation h(f1 (x)) ∼ h(f2 (x)) does not hold.

6. Convex functions
In the present section, we introduce the class of convex functions on a convex
subset of Rn . Let us recall that a set A ⊂ Rn is convex if, for each a1 , a2 ∈ A, we
have that [a1 , a2 ], the segment with endpoints a1 and a2 , is contained in A.
Definition 6.1. Let A be a convex subset of Rn and f : A → R a function. We say
that f is convex if, for each a1 , a2 ∈ A we have
(10) f (ta1 + (1 − t)a2 ) ≤ tf (a1 ) + (1 − t)f (a2 ), t ∈ (0, 1).
18 C.A. DE BERNARDI

In the case (10) holds with “<”, whenever a1 , a2 ∈ A, we say that f is strictly
convex. Finally, f is called concave (strictly concave) if and only if −f is convex
(strictly convex).
Let us recall that, given a function f : A ⊂ Rn → R the epigraphic of f is the
subset of Rn+1 defined as
epif = {(x, z) ∈ Rn+1 ; z ≥ f (x), x ∈ A}.
We have the following geometrical characterization of convexity.
Theorem 6.2. Let A be an open convex set in Rn and let f : A → R. The following
conditions are equivalent:
(i) f is convex on A;
(ii) epif is a convex set;
(iii) the restriction of f to each interval contained in A is a convex function.
Example 6.3. The following real functions are convex functions on Rn :
(i) constant functions;
(ii) linear functions, i.e. functions of the form f (a) = v · a, where v is a row
vector with n components;
(iii) semidefinite positive quadratic functions, i.e. functions of the form f (a) =
aT Ha, where H ∈ M(n) is a symmetric semidefinite positive matrix.
Proposition 6.4. Let A be an open convex set in Rn and let f, g : A → R be convex
functions on A. Then the functions f + g and max{f, g} are convex on A.
The following result shows that convex functions satisfy remarkable continuity
and differentiability properties.
Theorem 6.5. Let A be an open convex set in Rn and let f : A → R be a continuous
function. Then:
(i) f is continuous;
(ii) if a ∈ A and f admits partial derivatives at a then f is differentiable at a;
(iii) if f is differentiable at each point of A then f ∈ C 1 (A).
If we suppose that f is a differentiable function on an open convex subset of Rn ,
we have the following characterization of convexity.
Theorem 6.6. Let A be an open convex subset of Rn and suppose that f is differ-
entiable on A. Then f is convex if and only if, for each x, x0 ∈ A we have
f (x) ≥ f (x0 ) + ∇f (x0 ) · (x − x0 ).
Let us observe that the geometrical meaning of the previous theorem for n = 2 is
the following: f is convex if and only if, for each point of its graph, the corresponding
tangent plane lies below the graph itself.
For functions of class C 2 (A) we have the following result.
Theorem 6.7. Let A be an open convex subset of Rn and f ∈ C 2 (A). Then f is
convex if and only if the Hessian quadratic form xT Hf (x0 )x is semidefinite positive,
whenever x0 ∈ A,.
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 19

Finally, we present the following important result on the optimization of convex


(concave) functions. In particular, we prove that the first order necessary optimality
condition (contained in Fermat’s theorem) for convex (concave) functions is also
sufficient.
Theorem 6.8. Let A be an open convex subset of Rn and suppose that f is differ-
entiable and convex (concave) on A. If x0 ∈ A is a stationary point of f then x0 is
a global minimum (maximum) point for f on A.
Example 6.9. Determine in which of the following cases the function f is convex
on the set A. If this is the case determine whether f attains its minimum on A.
(i) f (x, y) = ex ln y, A = {(x, y) ∈ R2 ; y > 0}.
(ii) f (x, y) = ex − ln y, A = {(x, y) ∈ R2 ; y > 0}.
(iii) f (x, y) = x2 + xy + y 2 , A = R2 .
(iv) f (x, y) = ex y, A = R2 .

7. Vector valued functions


Let m, n ∈ N, A ⊂ Rn and let f : A → Rm be a function. As usual, we say that
A is the domain of f and that f (A) is the image of f .
Here below, we are going to generalize some of the results contained in the previous
sections to functions with values in Rm (vector valued functions).
Let f be as above, it is clear that we can write

f (a) = f1 (a), . . . , fm (a) (a ∈ A),
where, for each i = 1, . . . , m, fi : A → R. The definition of continuity is similar to
the real valued functions case.
Definition 7.1. Let f be as above and a ∈ A. We say that f is continuous at a if for
every ε > 0 there exists δ > 0 such that ∥f (w) − f (a)∥ < ε whenever w ∈ A ∩ B(a, δ).
We say that f is continuous on A if f is continuous at each point of A.
It is easy to see that f is continuous at a if and only if all the real valued functions
fi (i = 1, . . . , m) are continuous at a.
We have the following important characterization of continuity.
Theorem 7.2. Let f : Rn → Rm . Then the following conditions are equivalent:
(i) f is continuous on Rn ;
(ii) for each open set U in Rm , f −1 (U ) is open in Rn ;
(iii) for each closed set C in Rm , f −1 (C) is closed in Rn .
Now, suppose that A is an open subset of Rn and that a and f are as above.
Suppose that, for each i = 1, . . . , m and k = 1, . . . , n, there exists the partial
∂fi
derivative (a). We can consider the so called Jacobian matrix of f at a, denoted
∂xk
as Jf (a) and defined as follows.
20 C.A. DE BERNARDI

∂f1 ∂f1
 
(a) . . . (a)
 ∂x1 ∂xn 

Jf (a) =  .. .. 
.
 . . 
 ∂fm ∂fm 
(a) . . . (a)
∂x1 ∂xn
Observe that the m rows of the matrix above are exactly the gradients of the
functions f1 , . . . , fm at a.
∂fi
We say that f ∈ C 1 (A, Rm ) if the partial derivatives (i = 1, . . . , m and
∂xk
k = 1, . . . , n) exist and are continuous on A. We have the following important
result.
Theorem 7.3 (Chain Rule). Let A ⊂ Rn and B ⊂ Rp be open set. Let f : A → Rp
and g : B → Rm be functions such that f ∈ C 1 (A, Rp ), g ∈ C 1 (B, Rm ), and
f (A) ⊂ B. Let us consider the function h : A → Rm defined by h(a) = g f (a)
(a ∈ A). Then h ∈ C 1 (A, Rm ) and we have

Jh (a) = Jg f (a) Jf (a).
Operatively we can describe the formula above as follows. Let us denote

f (x) = f1 (x), . . . , fp (x) , x = (x1 , . . . , xn ) ∈ A,

g(y) = g1 (y), . . . , gm (y) , y = (y1 , . . . , yp ) ∈ B,

h(x) = h1 (x), . . . , hm (x) , x = (x1 , . . . , xn ) ∈ A,
∂gi
and let (i = 1, . . . , m and j = 1, . . . , p) be the partial derivatives of the functions
∂yj
g1 , . . . , gm . Then, for each i = 1, . . . , m and k = 1, . . . , n, we have
p
∂hi X ∂gi  ∂fj
(a) = f (a) (a) (a ∈ A).
∂xk ∂yj ∂xk
j=1

7.1. Exercises.
Exercise 7.1. Let f : R2 → R be defined by f (x, y) = yexy and let g : R → R2 be
defined by g(x) = (x + 1, ln(x2 + 1)). Let h = f ◦ g and compute h′ (0).
Exercise 7.2. Let g : R → R2 be defined by g(x) = (x + 1, ln(x2 + 1)) and let
f : R2 → R be such that ∇f (1, 0) = [3 4]. Let h = f ◦ g and compute h′ (0).
Ry √
Exercise 7.3. Let f : R2 → R be defined by f (x, y) = x e− |t| dt.
(i) Compute Jf (x, y), whenever (x, y) ∈ R2 . √
R x3 − |t|
(ii) Use the previous point to compute h′ (0), where h(x) = −x e dt.
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 21

8. Constrained optimization
8.1. Constrained optimization for functions of two variables. Let A ⊂ R2
and let f, g : A ⊆ R2 → R. We consider the problem of finding a point in the set
S = {(x, y) ∈ A : g(x, y) = 0}
that (locally or globally) maximizes or minimizes f on S. This problem is usually
called constrained optimization problem, the function f is the objective function,
the set S is the feasible region (or constraint) defined by the equality constraint
g(x, y) = 0.
If the set S coincides with the graph of a function h : D ⊂ R → R then the prob-
lem described above can be reduced to an optimization problem with an objective
function depending on a single variable.
Example 8.1. Consider the function f (x, y) = 8 − (x − 2)2 − (y − 2)2 and the
constraint S = {(x, y) ∈ R2 : x + y − 1 = 0}.
Another elementary approach to solve our problem is the so called Level Curves
method, described below. We draw the feasible region S and the level curves of
the objective function f in the Cartesian plane. In order to find the constrained
maximum we should identify the level curve of f associated to the highest level
such that it intersects the feasible region. Similarly, in order to find the constrained
minimum we have to identify the level curve associated to the lowest level such that
it intersects the feasible region. In this way we can find, if they exist, the global
maximum and minimum of f on S. It is clear that in order to apply the Level
Curves method we must have a precise geometrical description of the constraint set
and of the level curves of the function f .
Example 8.2. Consider the function f (x, y) = 2(x − 2) − y and the constraint
S = {(x, y) ∈ R2 : y = 3 + 3(x − 2)2 }.
8.2. Lagrange multipliers method for a function of two variables and a
unique constraint function. In the case the elementary methods described above
cannot be applied, more sophisticated tools are needed in order to study our prob-
lem. Let us introduce the so called Lagrange multipliers method.
Let A ⊂ R2 , f, g and S be as above, and suppose that f, g ∈ C 1 (A). We say that
a point (x0 , y0 ) ∈ S is regular when
∇g(x0 , y0 ) ̸= 0.
We define the Lagrange function
L(x, y, λ) = f (x, y) − λg(x, y).
We have the following first order necessary optimality condition.
Theorem 8.3. If a regular point (x0 , y0 ) ∈ S is a local maximum or minimum point
for f on S then there exists a real number λ0 such that

Lx (x0 , y0 , λ0 ) = 0

Ly (x0 , y0 , λ0 ) = 0

Lλ (x0 , y0 , λ0 ) = 0

22 C.A. DE BERNARDI

i.e., (x0 , y0 , λ0 ) is a stationary point of the Lagrange function L(x, y, λ).


Let us show how the previous theorem can be used, in tandem with the Weierstrass
theorem, to solve a constrained optimization problem.
Example 8.4. Let us consider the function f (x, y) = xy. Determine the global
maximum and minimum points for the function f (x, y) subject to the constraint
S = {(x, y) ∈ R2 : x2 + y 2 − 2y = 0}.
We also have the following second order sufficient optimality condition. Let f, g
be as above and suppose that f, g ∈ C 2 (A). Let us introduce the following matrix,
called bordered Hessian matrix:
 
0 gx (x0 , y0 ) gy (x0 , y0 )
HL (x0 , y0 , λ0 ) :=  gx (x0 , y0 ) Lxx (x0 , y0 , λ0 ) Lxy (x0 , y0 , λ0 )  .
gy (x0 , y0 ) Lxy (x0 , y0 , λ0 ) Lyy (x0 , y0 , λ0 )
Theorem 8.5. Let (x0 , y0 , λ0 ) be a stationary point of the function L(x, y, λ), then:
• if det(HL (x0 , y0 , λ0 )) > 0 then (x0 , y0 ) is a local maximum point for f on
S,
• if det(HL (x0 , y0 , λ0 )) < 0 then (x0 , y0 ) is a local miminum point for f on
S.
Observe that, in the case det(HL (x0 , y0 , λ0 )) = 0, nothing can be said about the
point without additional analysis.
8.3. Lagrange multipliers method: the general case. The first order sufficient
condition, described above, can be generalized to the case of functions of n variables
and constraints defined by m equality.
Let A be an open subset of Rn and let f, g1 , . . . , gm : A → R be functions in
C (A). Let us denote by g : A → Rm the function defined by g = (g1 , . . . , gm ). Let
1

S be the set defined by g(x1 , . . . , xn ) = 0, i.e., by the m equations



g1 (x1 , . . . , xn ) = 0


..
 .

g (x , . . . , x ) = 0
m 1 n

We consider the problem of finding a point in the set S that (locally or globally)
maximizes or minimizes f on S.
It is clear that if the constraint equality are independent then the problem is
interesting when m, the number of equation defining the constraint S, is less than
n, the number of variables. If else, in general, S can be a finite set (consider, e.g.,
the equations of two lines in the plane). So, from now on we suppose m < n.
Let f, g and S be as above, and suppose that x∗∈ S. We say that x∗ is regular
if the rank of Jg (x∗ ) is maximum, i.e., rank Jg (x∗ ) = m.
We define the Lagrange function as follows. For each x = (x1 . . . , xn ) ∈ A and
λ1 , . . . , λm ∈ R, put
L(x, λ1 , . . . , λm ) = f (x) − λ1 g1 (x) − . . . − λm gm (x).
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 23

We have the following first order necessary optimality condition.


Theorem 8.6. If a regular point x∗ ∈ S is a local maximum or minimum point for
f on S then there exist real numbers λ∗1 , . . . , λ∗m such that

Lx1 (x∗ , λ∗1 , . . . , λ∗m ) = 0






 ..
.




L (x∗ , λ∗ , . . . , λ∗ ) = 0

xn 1 m
 ∗ ∗ ∗
Lλ1 (x , λ1 , . . . , λm ) = 0

..






 .
Lλm (x∗ , λ∗1 , . . . , λ∗m ) = 0

i.e., (x∗ , λ∗1 , . . . , λ∗m ) is a stationary point for the Lagrange function L.
Example 8.7. Determine the points of the surface z 2 − xy = 1 which minimize the
distance from the origin. That is, find the global minimum points of the function
f (x, y, z) = x2 + y 2 + z 2 on the set S defined by
S = {(x, y, z) ∈ R3 ; z 2 − xy − 1 = 0}.
Solution. Observe that S is a closed set. An easy geometrical argument, involving
Weierstrass theorem, implies that f attains its minimum on S (exercise for you:
explain why!). Let us observe that each point of S is regular. Let us consider the
Lagrange function
L(x, y, z, λ) = x2 + y 2 + z 2 − λ(z 2 − xy − 1).
If (x∗ , y ∗ , z ∗ ) ∈ S is a local minimum point for f on S, then there exists a real
number λ∗ such that (x∗ , y ∗ , z ∗ , λ∗ ) is a solution of the following system.


 2x + λy = 0

 2y + λx = 0

 2z − 2λz = 0

 2
z − xy − 1 = 0
The system above has the following solutions:
(0, 0, 1, 1), (0, 0, −1, 1), (1, −1, 0, 2), (−1, 1, 0, 2).
Let us compare the values of f at the corresponding points of S:
f (0, 0, 1) = 1, f (0, 0, −1) = 1, f (1, −1, 0) = 2, f (−1, 1, 0) = 2.
Hence (0, 0, 1) and (0, 0, −1) are global minimum points of f on S.

9. Double integrals
The aim of this section is to introduce a basic theory for integration of two
variables functions.
24 C.A. DE BERNARDI

9.1. Integrals over rectangles. Let us recall the definition of partition of an


interval.
Definition 9.1. Let [a, b] be a closed interval in R and suppose that a = x0 < x1 <
. . . < xn = b. The set P = {x0 , . . . , xn } is called partition of the interval [a, b].
Let us start by defining integrability for a bounded function f : R → R, where
R = [a, b] × [c, d] is a rectangle in R2 .
Let us consider two partitions P1 = {x0 , . . . , xn } and P2 = {y0 , . . . , ym } of the
intervals [a, b] and [c, d], respectively.
Let us denote
X
s(f, P1 , P2 ) = mi,j (xi − xi−1 )(yj − yj−1 ),
i=1,...,n j=1,...,m

X
S(f, P1 , P2 ) = Mi,j (xi − xi−1 )(yj − yj−1 ),
i=1,...,n j=1,...,m

where
mi,j = inf f,
[xi−1 ,xi ]×[yj−1 ,yj ]

Mi,j = sup f.
[xi−1 ,xi ]×[yj−1 ,yj ]

The geometrical meaning of s(f, P1 , P2 ) is clear. For the sake of simplicity, sup-
pose that f ≥ 0. Then s(f, P1 , P2 ) represents the sum of the volumes of all paral-
lelepipeds with basis the rectangle Ri,j = [xi−1 , xi ] × [yj−1 , yj ] and height mi,j , the
infimum of f over Ri,j . Hence, s(f, P1 , P2 ) is the volume of a solid contained in
the region of R3 “between” R × {0} and the graph of f . A similar interpretation
of S(f, P1 , P2 ) can be given. In particular, S(f, P1 , P2 ) is the volume of a solid
containing the region of R3 “between” R × {0} and the graph of f .
Definition 9.2. Let f be as above. We say that f is integrable over R if
inf S(f, P1 , P2 ) = sup s(f, P1 , P2 ),
P1 ,P2 P1 ,P2

where the supremum and the infimum are taken over all partitions P1 and P2 of the
intervals [a, b] and [c, d], respectively. In the case f is integrable over R, we define
the double integral of f over R as
Z
f (x, y) dx dy = inf S(f, P1 , P2 ) = sup s(f, P1 , P2 ).
R P1 ,P2 P1 ,P2

As for functions of one variable, one of the main problem is to determine which
functions are integrable. We have the following sufficient condition.
Theorem 9.3. Let f : R → R be a continuous function, then it is integrable.
The following example shows that not all bounded functions are integrable.
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 25

Example 9.4. Let f : [0, 1] × [0, 1] → R be defined by


(
1 if x ∈ Q
f (x, y) = .
0 if x ̸∈ Q
It is easy to see that, for all partitions P1 and P2 of [0, 1], we have
S(f, P1 , P2 ) = 1, s(f, P1 , P2 ) = 0,
and hence f is not integrable over [0, 1] × [0, 1].
The next theorem gives us a method to compute a double integral of a two
variables continuous function as an iteration of two integrals of one variable function.
Theorem 9.5. Let f : [a, b]×[c, d] → R be a continuous function. Then the function
Z d
φ(x) = f (x, y) dy
c
is continuous on [a, b] and we have
Z Z b Z b Z d 
f (x, y) dx dy = φ(x) dx = f (x, y) dy dx.
[a,b]×[c,d] a a c
Similarly, the function
Z b
ψ(y) = f (x, y) dx
a
is continuous on [c, d] and we have
Z Z d Z d Z b 
f (x, y) dx dy = ψ(y) dy = f (x, y) dx dy.
[a,b]×[c,d] c c a

Example 9.6. Let us compute


Z
yexy dx dy.
[0,1]×[0,1]

Observe that f (x, y) = yexy


is continuous on [0, 1]×[0, 1]. We can apply the previous
theorem and we obtain
Z Z 1 Z 1  Z 1
xy
f (x, y) dx dy = ye dx dy = ey − 1 dy = e − 2.
[0,1]×[0,1] 0 0 0

9.2. Integrals over simple domains.


Definition 9.7. Suppose that Ω ⊂ R2 is a bounded set and that f : Ω → R is a
bounded function. Let R be a rectangle in R2 such that Ω ⊂ R and let f0 : R → R
be defined by (
f (x, y) if (x, y) ∈ Ω
f0 (x, y) = .
0 if (x, y) ∈ R \ Ω
If f0 is integrable over R we say that f is integrable over Ω and we define
Z Z
f (x, y) dx dy = f0 (x, y) dx dy.
Ω R
26 C.A. DE BERNARDI

Remark 9.8. It is easy to see that:


(i) the definition above is well-given, in the sense that it does not depend on
the choice of the rectangle R;
(ii) even if f is continuous on Ω it is possible that f is not integrable on Ω. To
see this, it is sufficient to consider the set Ω ⊂ R = [0, 1] × [0, 1], defined by
Ω = {(x, y) ∈ R; x ∈ Q},
and the constant function f ≡ 1 on Ω.
In what follows, we are going to provide a condition on the set Ω which ensures
the integrability of continuous functions on Ω.
Definition 9.9. Let Ω be a bounded subset of R2 . Ω is said:
(i) y-simple if it is of the form
Ω = {(x, y) ∈ R2 ; x ∈ [a, b], g1 (x) ≤ y ≤ g2 (x)},
where g1 , g2 : [a, b] → R are continuous functions;
(ii) x-simple if it is of the form
Ω = {(x, y) ∈ R2 ; y ∈ [c, d], h1 (y) ≤ x ≤ h2 (y)},
where h1 , h2 : [c, d] → R are continuous functions;
(iii) regular if it is a finite union of x-simple or y-simple sets.
We have the following important result.
Theorem 9.10. Let Ω be a subset of R2 and f : Ω → R be a continuous function.
(i) If Ω is regular then f is integrable on Ω.
(ii) Suppose that Ω is y-simple and that we can write
Ω = {(x, y) ∈ R2 ; x ∈ [a, b], g1 (x) ≤ y ≤ g2 (x)},
where g1 , g2 : [a, b] → R are continuous functions. Then the function
Z g2 (x)
φ(x) = f (x, y) dy
g1 (x)

is continuous on [a, b] and we have


Z Z b "Z g2 (x)
#
f (x, y) dx dy = f (x, y) dy dx.
Ω a g1 (x)

(iii) Suppose that Ω is x-simple and we can write


Ω = {(x, y) ∈ R2 ; y ∈ [c, d], h1 (y) ≤ x ≤ h2 (y)},
where h1 , h2 : [c, d] → R are continuous functions. Then the function
Z h2 (y)
ψ(y) = f (x, y) dx
h1 (y)
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 27

is continuous on [c, d] and we have


Z Z d "Z h2 (y)
#
f (x, y) dx dy = f (x, y) dx dy.
Ω c h1 (y)
2
Example 9.11. Let us compute Ω 2e−x dx dy, where Ω = {(x, y) ∈ R2 ; 0 ≤ x ≤
R
1, 0 ≤ y ≤ x}. Since Ω is y-simple, by the previous theorem, we have
Z Z 1 Z x  Z 1
−x2 −x2 2
2e dx dy = 2e dy dx = 2xe−x dx = 1 − e−1 .
Ω 0 0 0
Observe that Ω is also a x-simple set, indeed we can write
Ω = {(x, y) ∈ R2 ; 0 ≤ y ≤ 1, y ≤ x ≤ 1}.
However, if we consider the other order of integration, we obtain
Z Z 1 Z 1 
2 2
2e−x dx dy = 2e−x dy dy,
Ω 0 y

and we cannot conclude


R 1 our 2computation. Indeed, it is not possible to explicitly
compute the integral y 2e−x dy.

Proposition 9.12 (Basic properties of double integral). Let Ω ⊂ R2 be a bounded


set, f, g : Ω → R integrable functions over Ω, and c ∈ R. Then the following
properties hold.
(i) The functions f + g and c · f are integrable over Ω and we have
Z Z Z
[f (x, y) + g(x, y)] dx dy = f (x, y) dx dy + g(x, y) dx dy,
Ω Ω Ω
Z Z
c f (x, y) dx dy = c f (x, y) dx dy.
Ω Ω
(ii) If f (x, y) ≥ g(x, y), whenever (x, y) ∈ Ω, then
Z Z
f (x, y) dx dy ≥ g(x, y) dx dy,
Ω Ω
(iii) The functions |f | is integrable over Ω and we have
Z Z

f (x, y) dx dy ≤ |f (x, y)| dx dy.

Ω Ω
(iv) Suppose that f ≥ 0 on Ω and that Ω′ ⊂ Ω is such that f is integrable over
Ω′ . Then Z Z
f (x, y) dx dy ≥ f (x, y) dx dy.
Ω Ω′
(v) Suppose that Ω1 , Ω2 are disjoint regular set such that f is integrable over
Ω1 and Ω2 , and such that Ω1 ∪ Ω2 = Ω. Then
Z Z Z
f (x, y) dx dy = f (x, y) dx dy + f (x, y) dx dy.
Ω Ω1 Ω2
28 C.A. DE BERNARDI

9.3. Change of variables.


Theorem 9.13. Let U be an open set in R2 and T : U → R2 an injective function
such that T ∈ C 1 (U, R2 ). Suppose that the determinant of the Jacobian matrix
JT (x, y) is not null, whenever (x, y) ∈ U . Let Ω be a regular set contained in T (U )
and let f : Ω → R be a continuous function. Then f ◦ T is integrable on T −1 (Ω)
and we have
Z Z

f (x, y) dx dy = f T (u, v) |det(JT (u, v))| du dv.
Ω T −1 (Ω)

One of the main application of the theorem above is the computation of double
integrals using polar coordinates
Example 9.14 (Polar coordinates). Let (x, y) ∈ R2 \{(0, 0)} then there exist unique
ρ > 0 and θ ∈ [0, 2π) such that
(
x = ρ cos θ
(11)
y = ρ sin θ
(Observe that we can alternatively consider θ ∈ [−π, π) or any other interval of
length 2π.) Hence, we can consider the change of coordinates above or, more
precisely, the injective function T : (0, ∞) × [0, 2π) → R2 defined by T (ρ, θ) =
(ρ cos θ, ρ sin θ). If we denote U = (0, ∞) × (0, 2π), then T ∈ C 1 (U, R2 ) and we have
 
cos θ −ρ sin θ
JT (ρ, θ) = .
sin θ ρ cos θ
In particular, |det(JT (ρ, θ))| = ρ ̸= 0, whenever (ρ, θ) ∈ U . Hence, we can write
Z Z

f (x, y) dx dy = ρ · f ρ cos(θ), ρ sin(θ) dρ dθ,
Ω Ω′

where Ω′ represents the set Ω described in terms of the variables ρ and θ.


Example 9.15. Let us compute the volume V (r) of the 3-dimensional ball with
radius r. We have V (r) = V (1)r3 . Moreover,
Z p
V (1) = 2 1 − x2 − y 2 dx dy,

where Ω = {(x, y) ∈ R2 ; x2 + y2≤ 1}. By using polar coordinates, we have


Z p
V (1) = 2 ρ 1 − ρ2 dθ dρ,
Ω′

where Ω′ = {(ρ, θ) ∈ R2 ; 0 < ρ < 1, 0 < θ < 2π}. Hence,


Z 2π Z 1 
2 4π
V (1) = 2 ρ dρ dθ = .
0 0 3
4π 3
Finally, we get V (r) = 3 r .
IMPROPER INTEGRALS - DIFFERENTIAL CALCULUS IN Rn - DOUBLE INTEGRALS 29

9.4. Exercises.
Exercise 9.1. Compute the following double integrals.
(i) Ω 83 (x2 + y 2 ) dx dy, where Ω = {(x, y) ∈ R2 ; 1 ≤ y ≤ 2, 0 ≤ x ≤ 1}.
R
√ p
(ii) RΩ 3(x + y) dx dy, where Ω = {(x, y) ∈ R2 ; 0 ≤ y ≤ 22 , y ≤ x ≤ 1 − y 2 }.
R

(iii) Ω 12xy dx dy, where Ω = {(x, y) ∈ R2 ; 0 ≤ x ≤ 1, x2 ≤ y ≤ x}.
(iv) Ω 43 x2xy dx dy, where Ω = {(x, y) ∈ R2 ; 1 ≤ x2 + y 2 ≤ 4, x ≥ 0, y ≥ 0}.
R
+y 2
(v) Ω 16xy dx dy, where Ω = {(x, y) ∈ R2 ; x2 + 2y 2 ≤ 1, x ≥ 0, y ≥ 0}.
R

2 −y 2
Exercise 9.2. Let R ∈ (0, ∞), f (x, y) = e−x ((x, y) ∈ R2 ) and define
ΩR = {(x, y) ∈ R2 ; x2 + y 2 ≤ R2 },
QR = {(x, y) ∈ R2 ; −R ≤ x ≤ R, −R ≤ y ≤ R, }.
R
(i) Compute ΩR f (x, y) dx dy.
(ii) Prove that
ΩR ⊂ QR ⊂ Ω√2R .
R∞ 2 √
(iii) (*) Use the results in the previous points to prove that −∞ e−x dx = π.
Exercise 9.3. Compute the following double integrals.
(i) Ω 38 (x2 − y 2 ) dx dy, where Ω = {(x, y) ∈ R2 ; 1 ≤ x + y ≤ 2, 0 ≤ x − y ≤ 1}.
R
R 3
(ii) Ω 16 (x + y) dx dy, where Ω = {(x, y) ∈ R2 ; x2 + y 2 ≤ 4, x ≥ 0, y ≥ 0}.

10. Γ and β functions


Let us introduce the so called Gamma function, that as we will prove can be seen
as a generalization of the factorial function.
Definition 10.1. Let Γ : (0, ∞) → R be the the function defined by
Z ∞
Γ(x) = tx−1 e−t dt.
0
It is an easy exercise to prove
R∞that the definition above is well given, i.e., for each
x > 0, the improper integral 0 tx−1 e−t dt is convergent. We have the following
important results.
Theorem 10.2. The following properties hold.
(i) Γ(x) = (x − 1)Γ(x − 1), whenever x > 1.
(ii) Γ(n) = (n − 1)!, whenever n ∈ N.
(iii) For each x > 0, we have
Z ∞
2
Γ(x) = 2 u2x−1 e−u du.
0

(iv) Γ( 12 ) = π.
Proof. (i) It follows easily by the definition of Γ and using integration by parts.
(ii) It follows by (i) and since Γ(1) = 1.
(iii) Use the substitution t = u2 .
30 C.A. DE BERNARDI

(iv) By (iii), we have


Z ∞ √
1 2
Γ( ) = 2 e−u du = π.
2 0

Definition 10.3. Let β : (0, ∞) × (0, ∞) → R be the the function defined by
Z 1
β(x, y) = tx−1 (1 − t)y−1 dt.
0
It is an easy exercise to prove that theR definition above is well given, i.e., for each
1
x, y > 0, the possibly improper integral 0 tx−1 (1 − t)y−1 dt is convergent. We have
the following important results.
Theorem 10.4. The following properties hold.
(i) β(x, y) = β(y, x), whenever x, y > 0.
(ii) β(1, 1) = 1.
(iii) β(1/2, 1/2) = π.
(iv) For each x, y > 0, we have
Γ(x)Γ(y)
β(x, y) = .
Γ(x + y)
References
[1] L. Peccati, S. Salsa, and A. Squellati, Mathematics for Economics and Business, Bocconi
University Press, Milan, 2016.
[2] M.P. Deisenroth, A. Faisal, and C. Soon Ong -Mathematics for Machine Learning, Cam-
bridge University Press, 2020.

You might also like