Notes 1
Notes 1
Notes 1
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.
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+
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.
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.)
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.
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
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.
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
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
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
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
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
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
(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
∂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
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
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
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
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θ,
Ω Ω′
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}.