MM Book
MM Book
MM Book
Aljaž Zalar
Ljubljana, 2022
Introduction
The exercises on the following pages appeared on theoretical exams in the study years
2018/19–2021/22 for the course Mathematical Modelling, which is an elective course for
students enrolled in the undergraduate programme of Computer and Information Science
at the University of Ljubljana.
The exercises are divided in chapters, which are covered in the course, so that you can
try to solve them immediately after studying the appropriate chapter.
This study material is not peer-reviewed and so there can be some mistakes in the
solutions. If you notice a mistake, please send me an e-mail to [email protected].
For easier navigation within the document there are some shortcuts. If you click on the
symbol after the exercise, you will move to the corresponding solution. If you click on
the symbol at the solution, you will return to the text of the exercise. For the TeX
template of the document I am grateful to dr. Aleksandra Franc.
Notation
Introduction 3
Notation 5
Part 1. Exercises 9
Chapter 1. Linear systems 11
Chapter 2. Nonlinear systems 15
Chapter 3. Curves and surfaces 17
Chapter 4. Differential equations 21
Part 2. Solutions 25
Linear systems 26
Nonlinear systems 36
Curves and surfaces 42
Differential equations 54
Part 1
Exercises
CHAPTER 1
Linear systems
Task. 1.
Compute the singular value decomposition (SVD) of the matrix
" #
3 1 1
B= .
−1 3 1
Task. 2.
We are given the matrix A and the vector b:
1 1 2 0
1 0 1 1
A= , b = .
1 1 2 0
2 0 2 2
Task. 3.
Let A, B be m × n matrices, m, n ∈ N, such that AT B = 0 and BAT = 0. Verify the
following statements:
a. Every column of A is perpendicular to every column of B.
Hint: What is the meaning of the entry in the i-th row and j-th column of AT B?
b. A† B = B † A = 0.
Hint: Remember the geometric meaning of A† b (resp. B † a), where b (resp. a) is a column in Rm ,
and use this for every column of the matrix B (resp. A).
d. BA† = AB † = 0.
Hint: Assuming (b) is true, this statement can be proved by plugging AT and B T into the
appropriate variables in (b).
e. (A + B)† = A† + B † .
Task. 4.
12 Linear systems
a. Prove that if AAT is an invertible matrix, then AT (AAT )−1 is the Moore–Penrose
inverse A† of the matrix A.
Task. 5.
Let
−1 1 1
A= 1 1 and −1 .
b=
−1 1 1
Task. 6.
We are given the following four points:
(0, 1), (−1, 0), (1, 2), (2, 3).
We would like to fit a function of the form ax2 + bx to these points.
a. Write down the matrix A of the corresponding system of linear equations.
b. Find the Moore-Penrose inverse A† .
c. Find the function of the above form that fits the points best according to the least
squares criterion.
d. Find one more generalized inverse of A.
Task. 7.
The system of equations
2x − y + z = 3,
−x + 2y − z = 1
can be expressed in the form Ax = b.
a. Find the Moore-Penrose inverse of A.
b. Describe the property uniquely characterizing the point A† b with respect to the
system.
c. Construct a matrix, which has the following matrices as their generalized inverses:
" # " #
3 2 0 0 0 0 3 2
, .
1 −1 0 0 0 0 1 −1
13
Task. 8.
Task. 9.
Let
−2 2
A=
−3 −2 .
−2 −3
a. Find the matrix B ∈ R3×2 of rank 1, which is the closest to A in the Frobenius
norm.
b. Calculate kA − BkF .
Task. 10.
Let
0 2
A=
−2 −1
−2 0
be a matrix.
a. Compute the truncated singular value decomposition of A.
b. Does there exist a matrix B ∈ R3×2 of rank 1 such that kA − BkF = 1? If yes,
compute it, otherwise justify, why it does not exist.
Task. 11.
Let A ∈ Rm×n , B ∈ Rp×r and C ∈ Rm×r be matrices. Consider the solutions of the matrix
equations:
(1) AXB = C.
Let G1 ∈ Rn×m and G2 ∈ Rr×m be generalized inverses of A and B, respectively.
a. Assume that C = AG1 CG2 B. Check that G1 CG2 solves (1).
b. Prove that if (1) is solvable, then C = AG1 CG2 B holds.
Hint: Multiply (1) from left and from right by appropriate matrices and use the definitions of
G1 , G2 .
c. Assume that (1) is solvable. Check that
X = G1 CG2 + Z − G1 AZBG2
solves (1) for any Z ∈ Rn×p .
CHAPTER 2
Nonlinear systems
Task. 12.
Perform one step of Gauss-Newton method to approximate the least squares solution of
the system
f (x, y) = (2, 3, 1),
where
1
f : R2 → R3 , f (x, y) = (x2 + y 3 + 2, x + ey−1 , sin x + y 2 − 3).
2
For the initial approximation take (x0 , y0 ) = (0, 1).
Task. 13.
Using one step of Newton’s method approximate the solution of the system
sin x + cos y + exy = arctan(x + y) − xy = 0,
with the initial approximation (x0 , y0 ) = (0, 0).
Task. 14.
Let " # " #
f1 (x, y) x2 + y 2 − 10x + y
F (x, y) := =
f2 (x, y) x2 − y 2 − x + 10y
be a vector function and a = (2, 4) ∈ R2 a point.
a. Calculate the Jacobian matrix of the function F in the point a.
b. Calculate the linear approximation of F in the point a.
c. Perform one step of Newton’s method to find the approximate solution of the
system " #
1
F (x, y) =
25
with the initial approximation a.
Task. 15.
Let
x2 + y = 37,
x − y 2 = 5,
x+y+z =3
h iT
be a nonlinear system and v (0) = 0 0 0 a vector.
a. Compute the approximation v (1) of the solution of the system using one step of
Newton’s method.
16 Nonlinear systems
b. Compute the tangent plane to the surface given by the equation z = f (x, y), where
f (x, y) = 8xy + 4,
in the point (1, 1).
Task. 16.
Let f (x, y, z) = x2 + 3xy + yz 3 be a function of three variables.
a. Compute the gradient ∇f .
b. Perform one step of Newton’s method to approximate the stationary point of f
1
using the initial approximation (x0 , y0 , z0 ) = 1, 0, 3 .
√
Task. 17.
Let
√ 1
π ln(x21 + x22 ) − √ sin(x1 x2 ) = ln(2π),
π
1
ex1 −x2 + √ cos(x1 x2 ) = 0,
π
h √ √ iT
be a nonlinear system and v (0) = π π a vector. Compute the approximation
v (1) of the solution of the system using one step of Newton’s method.
CHAPTER 3
Task. 18.
Let S be a surface given by z = g(x, y), where
g(x, y) = x3 − x2 y + y 2 − 2x + 3y − 2
is a differentiable function. Determine the tangent plane to S in the point (−1, 3) in the
parametric and implicit form.
Task. 19.
Sketch the closed curves given in polar coordinates by
r1 (ϕ) = 1 + cos ϕ and r2 (ϕ) = 1 + sin ϕ.
Compute the area of the intersection of the bounded regions determined by the curves.
Hint: You will need the formulas sin2 x = 21 (1 − cos 2x) and cos2 x = 21 (1 + cos 2x) to
compute the area.
Task. 20.
Let
r(t) = (2 sin(2t), 2 cos(2t), 3t)
be the curve in parametric coordinates with t ∈ [0, 2π].
a. Sketch the curve in R3 .
b. Sketch all three projections of the curve in the xy-, xz- and yz-coordinate planes.
c. Compute the arc length of the curve.
Task. 21.
For the parametric curve
" # " #
x(t) 2t − t2
f (t) = = ,
y(t) 3t − t3
where t ∈ R, solve the following:
a. Find intersections with coordinate axes.
b. Find points at which the tangent is horizontal or vertical.
c. Find points where x0 (t) = y 0 (t) = 0.
d. Determine the asymptotic behaviour (limits as t → ±∞).
18 Curves and surfaces
Hint: To notice that the curve does not have any self-intersections verify that the equality
1 − x(t) = 1 − x(s) implies that s = 2 − t and plug this into the equation y(t) = y(s).
Task. 22.
Let
r1 (ϕ) = 2 sin ϕ and r2 (ϕ) = 2 cos ϕ
be curves in polar coordinates.
a. Prove that both curves are circles and provide a sketch.
Hint. Try multiplying each equation by ri and expressing ri2 , ri sin ϕ and ri cos ϕ by x and y.
b. Compute the area of the region that lies inside both circles.
Task. 23.
Let
~r(t) = (x(t), y(t)) = (t3 − 4t, t2 − 4)
be the parametric curve.
a. Find all points where it intersects the coordinate axes.
b. Find the tangent to the curve at t = 1.
c. Find the points on the curve where the tangent is horizontal or vertical.
d. If there is a self-intersection, find it and compute the area inside the loop formed
by the curve.
e. Sketch the curve.
Task. 24.
Let
γ(t) = (t3 − t + 1, t2 )
be the parametric curve.
a. Find self-intersections of γ.
b. Find the angle at which γ intersects itself in the self-intersections.
c. Find the point at which γ reaches its global minimum in the direction of y-axis.
Task. 25.
Let
γ(t) = (2 cos(t), 2 sin(t), −t)T
be the parametric curve.
a. Sketch γ.
b. Parametrize γ with a natural parameter.
c. Find the length of γ between points (2, 0, 0) and (2, 0, 2π).
19
Task. 26.
Two surfaces in the upper halfspace z > 0 are given by the following equations:
z2
Π : x2 + y 2 = Σ : x2 + y 2 = z.
2
Curve γ is the intersection of surfaces Π and Σ. Let P = (1, 1, 2) ∈ γ.
a. Find the angle at which the surfaces intersect at P .
b. Find the line tangent to γ at P .
c. Find the plane that is tangent to Σ at (1, 2, 5).
Task. 27.
Let
f (t) = (sin t, cos(3t)), t ∈ [0, 2π]
be the parametric curve.
a. Find all points where the curve intersects the coordinate axes.
b. Find all points on the curve where the tangent is horizontal or vertical.
c. Sketch the curve.
Task. 28.
Let
f (t) = (t3 − 5t2 + 3t + 11, t2 − 2t + 3), t∈R
be the parametric curve.
a. Find all points on the curve, where the tangent is horizontal or vertical.
b. Find all self-intersections.
c. Sketch the curve.
Task. 29.
Sketch the curve given in polar coordinates by
r(ϕ) = 2 + 4 sin(ϕ)
and compute the area of the smaller bounded region determined by the curve.
CHAPTER 4
Differential equations
Task. 30.
Let
dy
(2) 2xy − 9x2 + (2y + x2 + 1) · =0
dx
be a differential equation.
a. Rewrite (2) in the form M (x, y)dx+N (x, y)dy = 0 and prove that this DE is exact
by checking the necessary and sufficient conditions involving partial derivatives of
M and N .
b. Solve the DE (2) with an initial condition y(0) = −3.
Task. 31.
Convert the differential equation
(3) y 00 + 11y 0 + 24y = 0
into the system of first order DEs, solve this system and recover the solution of the initial
DE (3).
Task. 32.
Solve the differential equation
1
3y 0 cos x + y sin x − = 0,
y2
given the initial condition y(0) = 1.
Hint: Note that this DE can be transformed into a first order linear nonhomogeneous DE
by multiplying it with an appropriate factor and introducing aZnew variable. To compute
R 1
tan x dx use the substitution u = cos x. Also remember that dx = tan x + C.
(cos x)2
Task. 33.
Find the general solution of the system
ẋ = 2x − 3y,
ẏ = x − 2y,
and sketch the phase potrait.
22 Differential equations
Task. 34.
Solve the differential equation
y 00 − 4y 0 + 5y = 8 cos x.
Find a solution to this DE which has a local extremum in the point (0, 2).
Task. 35.
Find the solution x(t), y(t) of the nonautonomous system of first order linear differential
equations
ẋ = 2x − y,
ẏ = −2x + y + 18t,
which satisfies x(0) = 1, y(0) = 0.
Hint: One of the particular solutions of the system above is of the form
xp (t) = At2 + Bt + C, yp (t) = Dt2 + Et + F,
where A, B, C, D, E, F are constants.
Task. 36.
Let
(4) y 0 = 2xy 2
be the differential equation with an initial condition y(0) = 1.
a. Find the exact solution of the DE (4).
b. Use Euler’s method with step size 0.2 to estimate y(0.4) and compare the result
to the exact value y(0.4).
Task. 37.
Find the general solution of the nonhomogeneous second order linear equation
ẍ + ẋ − 2x = t2 .
Task. 38.
Find the general solution of the differential equation
y 0 = 2x(1 + y 2 )
and the particular solution that satisfies y(1) = 0.
Task. 39.
For the system of nonlinear differential equations
ẋ = xy + 1, ẏ = x + xy,
solve the following:
a. Find stationary points.
b. Classify each stationary point as a saddle, source, sink or center.
c. Sketch the phase portrait of the system around each stationary point.
23
Task. 40.
Solve the differential equation
xy 0 = y + 2x3
with the initial condition y(2) = 3.
Task. 41.
Solve the differential equation
y 00 + y 0 − 6y = 36x
with the initial conditions y(0) = y 0 (0) = 1.
Task. 42.
Find the solution y of the differential equation
x2 y 0 + xy + 3 = 0
with the initial condition y(1) = 1.
Task. 43.
Solve the following system of differential equations:
x0 (t) = −2x(t) + 5y(t),
y 0 (t) = x(t) + 2y(t),
with the initial conditions x(0) = y(0) = 1.
Task. 44.
Solve the following exact differential equation
2xy + (x2 + 3y 2 )y 0 = 0.
Task. 45.
Solve the differential equation
y 00 + 9y = 2x2 − 1
with the initial condition y(0) = y 0 (0) = 1.
Task. 46.
Consider the system of nonlinear differential equations
ẋ = x(3 − x − 2y),
ẏ = y(4 − 3x − y).
Task. 47.
Let
ẋ1 (t) x1 (t)
ẋ2 (t) = A x2 (t) ,
ẋ3 (t) x3 (t)
where A ∈ R3×3 , be a system of differential equations with the following three solutions:
1 1 1
e−t
−1 , et 1 and e2t 2 .
1 1 4
a. Write down a general solution of the system.
b. Determine the matrix A.
c. Write down a third order differential equation with constants coefficients, which is
transformed into the above system.
Task. 48.
Solve the differential equation
(5) ẍ − ẋ − 4x = 2t + et .
Part 2
Solutions
Linear systems
a. The left upper 2×2 submatrix has determinant −1 and hence the first two columns
are linearly independent. The third column is the sum of the first two and so
rank A = 2.
We can check that A(Gb) = b and hence Gb is really a solution of the system. All
solutions are of the form
1 0 0 1 z1
Gb + (GA − I)z =
−1 + 0
0 1 z2
0 0 0 −1 z3
1 + z3
= −1 + z3 ,
−z3
where z1 , z2 , z3 ∈ R.
Solution of the task 3.
a.
0 = (AT B)i,j = dot product of the i-th row of AT and j-th column of B
= dot product of the i-th column of A and j-th column of B.
b. Two possible solutions to this part:
Geometrical solution: A† b is the vector with the smallest norm among all vectors
from the set
n 0
S(A, b) := x ∈ R : kb − Axk = min0 n
kb − Ax k .
x ∈R
28
c.
0 = (BAT )i,j = dot product of the i-th row of B and j-th column of AT
= dot product of the i-th column of B T and j-th column of AT .
Linear systems 29
−1
where we used that AT A is symmetric in the last equality.
30
−1
a. Since rank A = 2, the matrix AT A ∈ R2×s is invertible and hence A† = AT A AT .
So,
" #−1 " 3 1 #−1 " 1 1 #
†
3 −1 T 8 8 T 4 2
− 14
A = ·A = 1 3 ·A = .
−1 3 8 8
− 14 12 41
c. The vector x+ such that the error kAx+ − bk2 is the smallest possible, is
" #
− 12
A† b = 1
.
2
c. The solution a, b such that ax2 + bx fits the data best w.r.t. the least squares error
method is
1
" # " #
7 1 2 5
†
0 22 − 22 0
11 11
Ac= = 8 .
0 − 13
22
5
22
1 2
11 11
3
The kernel of
" # " #
T
25 0 −8 8
A A− =
0 25 8 −8
h iT
contains the vector 1 1 and hence
" #
1 1
v1 = √ .
2 1
Now the first column of U is
0 0
1 1 = √1 −1
u1 = Av1 = √ −5
5 5 2 2
−5 −1
Finally,
0 0 0
1 1 h i 5
B = 5u1 v1T = 5 · √ −1 · √ 1 1 = −1 −1
2 2 2
−1 −1 −1
and
kA − BkF = 3.
Solution of the task 10.
a. We have that
" #
8 2
AT A = ,
2 5
which implies
det(AT A − λI2 ) = (8 − λ)(5 − λ) − 22 = λ2 − 13λ + 36 = (λ − 9)(λ − 4).
So the eigenvalues of AT A are λ1 = 9, λ2 = 4. Hence, Σ in the SVD of A = U ΣV T
is equal to
3 0
0 2 .
0 0
The kernel of
" # " #
9 0 −1 2
AT A − =
0 9 2 −4
h iT
contains the vector 2 1 and hence
" #
1 2
v1 = √ .
5 1
Linear systems 35
Further on,
2
1 1
u1 = Av1 = √ −5 .
3 3 5
−4
The kernel of
" # " #
4 0 4 2
AT A − =
0 4 2 1
h iT
contains the vector 1 −2 and hence
" #
1 1
v2 = √ .
5 −2
Further on,
−4
1 1
u2 = Av2 = √ 0 .
2 2 5
−2
So, the truncated SVD of A is equal to
" #
h i 3 0 h iT
A = u1 u2 v1 v2 .
0 2
b. By the Eckart-Young theorem the matrix B of rank 1, which minimizes the norm
kA − BkF is equal to σ1 u1 v12 . The distance kA − BkF is kσ2 u2 v2T kF = σ2 = 2.
Hence, there does not exist a matrix B of rank 1 satisfying kA − BkF = 1.
Solution of the task 11.
a.
A(G1 CG2 )B = AG1 CG2 B = C.
b. We multiply (1) from left by AG1 and from right by G2 B to obtain
(8) AG1 AXBG2 B = AG1 CG2 B.
Since G1 (resp. G2 ) is a generalized inverse of A (resp. B), we have that AG1 A = A
(resp. BG2 B = B). Hence, (8) implies that
(9) C = AXB = AG1 CG2 B,
where in the first equality we used (1). This proves (b).
c.
AXB = A(G1 CG2 + Z − G1 AZBG2 )B
= AG1 CG2 B + A(Z − G1 AZBG2 )B
= C + AZB − AG1 AZBG2 B
= C + AZB − AZB = C,
36
where we used (b) in the second equality and the definitions of G1 , G2 in the third
equality.
Note: If (1) is solvable, then all solutions are of the form given in (c). Indeed,
if X solves (1), then X = G1 CG2 + X − G1 AXBG2 , which means that Z = X is
one appropriate choice.
Nonlinear systems
and
1
− 13 1 1 37
" # " #
x1 0 2 2 12
= − −2 = .
y1 1 1
0 0
7
2
3 −2 3
Nonlinear systems 37
We are approximating the zero f (x, y) = 0 of f using one step of Newton’s method with
the initial approximation (x0 , y0 ) = (0, 0). The Jacobian Jf (x, y) of f is
∂f1 ∂f1
∂x ∂y
cos x + yexy − sin y + xexy
Jf (x, y) = ∂f2 ∂f2
=
1 1
.
∂x ∂y (x+y)2 +1
−y (x+y)2 +1
−x
So
" # " #
x1 x0
= − (Jf (x0 , y0 ))−1 f (x0 , y0 )
y1 y0
" #−1 " #
1 0 2
=−
1 1 0
" #" # " #
1 0 2 −2
=− = .
−1 1 0 2
a.
" # " #
2x − 10 2y + 1 −6 9
JF (a) = (a) = .
2x − 1 −2y + 10 3 2
b.
" #
x−2
LF,a (x, y) = F (a) + JF (a)
y−4
" # " #" #
4 −6 9 x−2
= +
26 3 2 y−4
" #
−6x + 9y − 20
= .
3x + 2y + 12
" # " #
x1 x0
= − JG(a)−1 G(x0 , y0 )
y1 y0
" # " #−1 " #
2 −6 9 3
= −
4 3 2 1
" # " #" #
2 1 2 −9 3
= +
4 39 −3 −6 1
" #
1 25
= .
13 47
F1 (x, y, z) x2 + y − 37
2
F2 (x, y, z) = x − y − 5 .
F (x, y, z) =
F3 (x, y, z) x+y+z−3
−1
v (1) = v (0) − JF (v (0) ) F (v (0) ),
where
∂F1 (x,y,z) ∂F1 (x,y,z) ∂F1 (x,y,z)
∂x ∂y ∂z
2x 1 0
∂F2 (x,y,z) ∂F2 (x,y,z) ∂F2 (x,y,z)
JF (x, y, z) =
∂x ∂y ∂z
= 1
−2y 0
∂F3 (x,y,z) ∂F3 (x,y,z) ∂F3 (x,y,z)
∂x ∂y ∂z
1 1 1
0 1 0
JF (v (0) ) =
1 0 0 .
1 1 1
Nonlinear systems 39
−1
We compute JF (v (0) ) using Gaussian elimination:
0 1 0 1 0 0 1 0 0 0 1 0
1
0 0 0 1 0 ∼
|{z} 0 1 0 1 0 0
1 1 1 0 0 1 `1 ↔`2 1 1 1 0 0 1
| {z
}
(0)
JF (v ) I3
1 0 0 0 1 0
∼
|{z}
0 1 0 1
0 0
.
`3 =`3 −`1 −`2
0 0 1 −1 −1 1
| {z }
(0) −1
I3 JF (v )
So
0 1 0 −37 5
v (1) = −
1 00
−5 = 37 .
−1 −1 1 −3 −39
b. The surface is parametrized by
" # x x
x
7→ y = y .
y
f (x, y) 8xy + 4
a.
∂f
∂x
(x, y, z) 2x + 3y
∂f
∇f (x, y, z) = (x, y, z) = 3x + z 3 .
∂y
∂f
∂z
(x, y, z) 3yz 2
h iT
b. We are searching for the solution of ∇f (x, y, z) = 0 0 0 using Newton’s
method. We have that
−1
v (1) = v (0) − J(∇f )(v (0) ) (∇f )(v (0) ),
where
∂ 2 f (x,y,z) ∂ 2 f (x,y,z) ∂f (x,y,z)
∂x2 ∂x∂y ∂x∂z
2 3 0
∂ 2 f (x,y,z) ∂ 2 f (x,y,z) ∂f (x,y,z)
J(∇f )(x, y, z) = = 3 0 3z 2
∂x∂y ∂y 2 ∂y∂z
∂ 2 f (x,y,z) ∂ 2 f (x,y,z) ∂f (x,y,z)
∂x∂x ∂y∂z ∂z 2
0 3z 2 6yz
So
1
1 2
0 − 32 2
0
(1)
1
v 0 − 0 0
= 1
3 + 3 √3 = 0 .
0
√1 − 32 1 9 2
√
3 2 3 3
We are searching for the solution of F (x1 , x2 ) = 0 using Newton’s method. We have that
−1
v (1) = v (0) − JF (v (0) ) F (v (0) ),
where
∂F1 (x1 ,x2 ) ∂F1 (x1 ,x2 )
∂x1 ∂x2
JF (x1 , x2 ) =
∂F2 (x1 ,x2 ) ∂F2 (x1 ,x2 )
∂x1 ∂x2
√ √
π x22x+x1 2 − x2
√
π
cos(x1 x2 ) π x22x+x2 2 − x1
√
π
cos(x1 x2 )
1 2 1 2
=
x1 −x2 x2 x1 −x2 x1
e − √
π
sin(x1 x2 ) −e − √
π
sin(x1 x2 )
−1
We compute JF (v (0) ) using Gaussian elimination:
1
1 1 0
" #
2 2 1 0 2
∼
1 −1 0 1 |{z}
` 0 −2 − 1
1
| {z } `1 = 21 , 2
` =` − 1 `
JF (v (0) ) I2 2 2 2 1
1 0 14 21
∼ .
1 1
0 1 4 −2
|{z}
`2 =− 12 `2 ,
1
| {z }
`1 =`1 + 2 `2 −1
I2 JF (v (0) )
42
So
√ √
1 1
π 4 2
π ln(2π) − ln(2π)
v (1) = √ −
1
π 4
− 12 1− √1
π
√ √
π − 14 π ln(2π) + 41 ln(2π) − 21 + 1
√
2 π
= √ √
π − 14 π ln(2π) + 41 ln(2π) + 12 − 1
√
2 π
" #
1.20
≈ .
1.64
We have
Hence,
For the implicit form of the tangent plane we need its normal
1 0 −7
~n := fx (−1, 3) × fy (−1, 3) = 0 × 1 = −8 .
7 8 1
2.0
1.5
1.0
0.5
-0.5
-1.0
-1.5
Since sin ϕ and cos ϕ are periodic function with a period 2π, it is enough to restrict
ourselves to the interval [0, 2ϕ]. First we have to determine the points, where the curves
intersect. As seen from the sketch, one of the points is the origin (0, 0), where both polar
radii are 0. This is true for ϕ = π for r1 and ϕ = 3π 2
for r2 . The other intersections can
occur for nonzero radii, in which case they have to be the same at the same angle. We
have that
π 5π
r1 (ϕ) = r2 (ϕ) ⇔ sin ϕ = cos ϕ ⇔ ϕ ∈ , .
4 4
Further on,
Z 5π Z 5π
4 4
2
(1 + cos ϕ) dϕ = (1 + 2 cos ϕ + cos2 ϕ) dϕ
π π
4 4
5π4
√
3 1 3
= ϕ + 2 sin ϕ + sin 2ϕ = π − 2 2,
2 4 π 2
4
44
π
Z 2π Z
4
2
(1 + sin ϕ) dϕ + (1 + sin ϕ)2 dϕ =
5π
4
0
π
Z 0 Z
4
2
= (1 + sin ϕ) dϕ + (1 + sin ϕ)2 dϕ
−3 π4 0
Z π π4
4 3 2 1
= (1 + sin ϕ) dϕ = ϕ − 2 cos ϕ − sin 2ϕ
− 3π
4
2 4 −3π
4
3 √
= π − 2 2,
2
√
where we used sin2 x = 12 (1 − cos 2x) in the third equality. So, area = 23 π − 2 2.
15 15
10 10
-2 -1 1 2
5 5
-1
-2 -2 -1 1 2 -2 -1 1 2
a.
x(t) = 0 ⇔ 2t − t2 = 0 ⇔ t(t − 2) = 0 ⇔ t ∈ {0, 2},
√ √
y(t) = 0 ⇔ 3t − t3 = 0 ⇔ t(3 − t2 ) = 0 ⇔ t ∈ {− 3, 0, 3}.
b.
ẋ(t) = 0 ⇔ 2 − 2t = 0 ⇔ t = 1,
2
ẏ(t) = 0 ⇔ 3 − 3t = 0 ⇔ 1 − t2 = 0 ⇔ t ∈ {−1, 1}.
e. Assume that t 6= s.
1 − x(t) = 1 − x(s) ⇔ 1 − 2t + t2 = 1 − 2s + s2
⇔ (1 − t)2 = (1 − s)2
⇔ 1 − t ∈ {1 − s, s − 1}.
f. Using the information above, the sketch of the curve is the following:
-8 -6 -4 -2
-2
-4
-6
-8
a. We have
2.0
1.5
1.0
0.5
-0.5
-1.0
b. The area can be computed using elementary geometry or using the formula for
integrals of regions in polar coordinates. If A is the shaded region in the plot, then
1 π/2
Z Z π/2
2
A= (2 cos ϕ) dϕ = (1 + cos(2ϕ)) dϕ
2 π/4 π/4
π/2
sin(2ϕ) π 1
= ϕ+ = − ,
2 π/4 4 2
π
and the total area is 2A = − 1.
2
Solution of the task 23.
The tangent to the curve is vertical at the points where x0 (t) = 0. Hence,
2 2
x0 (t) = 0 ⇔ 3t2 − 4 = 0 ⇔ t4 = √ , t5 = − √ ,
3 3
48
The area A inside the loop formed by the curve between t1 = −2 and t2 = 2 is
1 2 3
Z
A= (t − 4t)2t − (t2 − 4)(3t2 − 4) dt
2 −2
1 2 4
Z
= −t + 8t2 − 16 dt.
2 −2
Since
t4 − 8t2 + 16 = (t2 − 4)2 = (t − 2)2 (t + 2)2 ,
we have that
4
−t + 8t2 − 16 = t4 − 8t2 + 16
-6 -4 -2 2 4 6
-1
-2
-3
-4
b. The angle at which γ intersects itself in the self-intersection is the angle between
the tangents γ1 , γ2 in (1, 1):
Hence,
h(2, 2), (−4, −2)i −8 − 4 −3
arccos = arccos √ √ = arccos √ ≈ 2.82.
k(2, 2)k k(−4, −2)k 8 20 10
So, the angle between the tangents is π − 2.82 ≈ 0.32.
b. The natural parameter s(t), which measures the arc length between the points
γ(0) and γ(t) is
Z t Z t
0
s(t) = kγ (u)k du = k(−2 sin u, 2 cos u, −1k du
0 0
Z tp
= 4 sin2 u + 4 cos2 u + 1 du
0
Z t√ √
= 5 du = t 5.
0
Hence, t(s) = √s and the parametrization of the curve with the natural parameter
5
s is
s s s
γ(s) = 2 cos √ , 2 sin √ , − √ .
5 5 5
c. The point (2, 0, 0) corresponds to t = 0, while (2, 0, 2π) to t = −2π.
√ Hence, the
arc length between this points equals by symmetry to s(2π) = 2π 5.
Solution of the task 26.
a. The angle at which the surfaces intersect at P is the angle between the normals to
their tangent planes at the point P , i.e., between their gradients at the point P :
h(grad Π)(P ), (grad Σ)(P )i
arccos
kgrad Π)(P )k kgrad Σ)(P )k
h(2x, 2y, −z)(P ), (2x, 2y, −1)(P )i
= arccos
k(2x, 2y, −z)(P )k k(2x, 2y, −1)(P )k
h(2, 2, −2), (2, 2, −1)i 10
= arccos = arccos √ √
k(2, 2, −2)k k(2, 2, −1)k 12 9
5
= arccos √ ≈ 0.28.
3 3
b. The intersection of the surfaces satisfies
(x2 + y 2 )2
x2 + y 2 = ⇒ 2 = x2 + y 2 ⇒ z = 2.
2
So this is a circle with the parametrization
√ √
γ(t) = 2 · cos t, 2 · sin t, 2 .
The tangent to this circle in the point (1, 1, 2), which corresponds to t = π4 , is
π
`(λ) = (1, 1, 2) + λ · γ 0
√4 √ π
= (1, 1, 2) + λ · − 2 · sin t, 2 · cos t, 0
4
= (1, 1, 2) + λ · (−1, 1, 0).
c. The tangent plane to Σ at Q := (a, b, c) = (1, 2, 5), which is given implicitly by the
equation
F (x, y, z) = 0,
where
F (x, y, z) := x2 + y 2 − z,
Curves and surfaces 51
is determined by
∂F ∂F ∂F
0= (Q) · (x − a) + (Q) · (y − b) + (Q) · (z − c)
∂x ∂y ∂z
= ((2x)(Q)) · (x − 1) + ((2y)(Q)) · (y − 2) + ((−1)(Q)) · (z − 5)
= 2(x − 1) + 4(y − 2) − (z − 5).
Solution of the task 27.
b. The curve has self-intersections, where f (t) = f (s) for t 6= s. We have that
t3 − 5t2 + 3t + 11 = s3 − 5s2 + 3s + 11
⇔ t3 − s3 = 5(t2 − s2 ) − 3(t − s)
(10) ⇔ t2 + ts + s2 = 5(t + s) − 3,
where we divided by t − s in the last line. Further on,
t2 − 2t + 3 = s2 − 2s + 3
⇔ t2 − s2 = 2(t − s)
(11) ⇔ t + s = 2,
where we divided by t − s in the last line. We use (11) in (10):
t2 + t(2 − t) + (2 − t)2 = 10 − 3 = 7
and hence
0 = t2 − 2t − 3 = (t − 3)(t + 1).
The solutions are t1 = 3, t2 = −1 with the correspoding s1 = −1 and s2 = 3. So
the only point of self-intersection is f (−1) = f (3) = (2, 6).
c. We compute
lim f (t) = (−∞, ∞) and lim f (t) = (∞, ∞).
t→−∞ t→∞
10
-10 5 10
3 4 5 6
-2
54
-3 -2 -1 1 2 3
We see from the sketch that the smaller bounded region enclosed by r(ϕ) is obtained by
restricting ϕ to the interval [ 7π6
, 11π
6
]. Its area A is
Z 11π Z 11π
1 6
2 1 6
A= r(ϕ) dϕ = (2 + 4 sin ϕ)2 dϕ
2 7π6 2 7π6
Z 11π
1 6
= (4 + 16 sin ϕ + 16 sin2 ϕ) dϕ
2 7π6
Z 11π
11π 11π 1 6
= 2 [ϕ] 7π + 8 [− cos ϕ] 7π +
6 6
(8 − 8 cos(2ϕ)) dϕ
6 6 2 7π6
4π √ 11π 11π 12π √
= − 8 3 + 4 [ϕ] 7π6 − 2 [sin(2ϕ)] 7π6 = − 8 3,
3 6 6 3
2 1
where we used that sin ϕ = 2 (1 − cos(2ϕ)) in the fourth equality.
Differential equations
Since M (x, y) and N (x, y) are differentiable functions for every (x, y) ∈ R2 , the
DE (2) is exact if and only if
∂M ∂N
(x, y) = (x, y).
∂y ∂x
Differential equations 55
We have
∂M ∂N
(x, y) = 2x = (x, y)
∂y ∂x
and hence the DE (2) is exact.
b. Solutions of the exact DE are level curves u(x, y) = C, C ∈ R, of the potential
function u(x, y), i.e., a function which satisfies
∂u ∂u
(x, y) = M (x, y) and (x, y) = N (x, y).
∂x ∂y
Hence,
Z
u(x, y) = M (x, y)dx = x2 y − 3x3 + C(y),
Z
u(x, y) = N (x, y)dy = y 2 + x2 y + y + D(x),
The eigenvalues of the matrix A are the roots of the following determinant
" #!
λ 0
det A − = (−λ)(−11 − λ) + 24 = λ2 + 11λ + 24 = (λ + 8)(λ + 3).
0 λ
So, λ1 = −8 and λ2 = −3.
The kernel of " # " #
−8 0 8 1
A− =
0 −8 −24 −3
contains the vector " #
1
u1 = .
−8
56
The eigenvalues of the matrix A are the roots of the following determinant
" #!
λ 0
det A − = (2 − λ)(−2 − λ) + 3 = λ2 − 4 = (λ − 1)(λ + 1).
0 λ
The kernel of
" # " #
1 0 1 −3
A− =
0 1 1 −3
The kernel of
" # " #
−1 0 3 −3
A− =
0 −1 1 −1
-1
-2
-3
-3 -2 -1 0 1 2 3
= 2A + B − 1.
So A = 1 and B = −1.
Differential equations 59
dy dy 1 1
= 2xy 2 ⇒ = 2x dx ⇒ − = x2 + C ⇒ y=− .
dx y2 y x2 +C
The solution passing through the point (0, 1) is obtained by
1 1
y(0) = 1 = − ⇒ C = −1 ⇒ y = .
C 1 − x2
b. Using Euler’s method to estimate y(0.4) we get:
y1 = y(0.2) = 1 + 0.2 · (0 · 12 ) = 1,
y2 = y(0.4) = 1 + 0.2 · (2 · 0.2 · 12 ) = 1.08.
The exact solution is
1
y(0.4) = ≈ 1.2.
1 − 0.16
Solution of the task 37.
First we solve the homogenenous part
ẍ + ẋ − 2x = 0.
The characterstic polynomial is p(λ) := λ2 + λ − 2 and hence
p(λ) = 0 ⇔ (λ − 2)(λ + 1) = 0.
So, the solution of the homogeneous part is
xh (t) = Ce2t + De−t ,
where C, D ∈ R are constants. To find one particular solution we use the form
xp = At2 + Bt + C.
Hence, ẋp = 2At + B and ẍp = 2A. Plugging this into the DE we obtain
2A + (2At + B) − 2 At2 + Bt + C = t2 .
(19)
Comparing the coefficients at 1, t, t2 on both sides of (19) we get the system
2A + B − 2C = 0, 2A − 2B = 0, −2A = 1,
with the solution
1 1 3
A=− , B=− , C=− .
2 2 4
Hence, the general solution of the DE is
1 1 3
x(t) = Ce2t + De−t − t2 − t − .
2 2 4
Solution of the task 38.
The DE can be solved by separation of variables:
dy
= 2x dx ⇒ arctan y = x2 + C.
1 + y2
The particular solution, which goes through the point (1, 0), is
arctan y(1) = arctan(0) = 0 = 12 + C ⇒ C = −1 ⇒ arctan y = x2 − 1.
Solution of the task 39.
Differential equations 61
ẋ = xy + 1 = 0 and ẏ = x + xy = 0 ⇔ xy = −1 and x = 1
⇔ y = −1 and x = 1.
b. To classify the stationary point (1, −1) we have to linearize the system. We denote
the right side of the system by
Hence,
" # " #
ẋ x−1
≈ ((Jf )(1, −1)) ·
ẏ y+1
" # ! " #
y x x−1
= (1, −1) ·
1+y x y+1
" #" #
−1 1 x − 1
=
0 1
y+1
" #
−x + y + 2
= .
y+1
The behaviour of the system depends on the eigenvalues of (Jf )(1, −1):
" #
−1 − λ 1
det ((Jf )(1, −1) − λI2 ) = = (−1 − λ)(1 − λ).
0 1−λ
Hence, the eigenvalues are λ1 = 1 and λ2 = −1. The solution of the system is of
the form
" #
t −t
−1
C · e · v1 + D · e · v2 + ,
1
where v1 , v2 are the eigenvectors of (Jf )(1, −1) for the eigenvalues 1, −1 and C, D
are constants. The point (1, −1) is a saddle.
-1
-2
-3
-3 -2 -1 0 1 2 3
Since in the initial conditin x > 0, we have K = ln x13 and yp (x) = ln x13 · x1 . So, the general
solution of the DE is
1 1
y(x) = yh (x) + yp (x) = K + ln 3 .
x x
The solution which passes through the point (1, 1) is
1 1
y(1) = 1 = K + ln 1 ⇒ K=1 ⇒ y(x) = 1 + ln 3 .
x x
Solution of the task 43.
The matricial form of the system is the following:
" # " #" #
x0 (t) −2 5 x(t)
= .
y 0 (t) 1 2 y(t)
| {z }
A
The kernel of
" # " #
−3 0 1 5
A− =
0 −3 1 5
contains the vector
" #
−5
u2 = .
1
where C1 and C2 are constants. The solution, which satisfies x(0) = y(0) = 1, is:
" # " # " #
1 −5 1
C1 + C2 = ⇒ C1 − 5C2 = 1, C1 + C2 = 1
1 1 1
⇒ C1 = 1, C2 = 0.
Differential equations 65
where C(y) and D(x) are functions of y and x. Hence, the solution of the DE is a family
of functions
u(x, y, K) = x2 y + y 3 + K,
where K ∈ R is a constant.
Solution of the task 45.
First we solve the homogeneous part of the DE:
y 00 + 9y = 0.
The characteristic polynomial is
p(λ) = λ2 + 9 = (λ − 3i)(λ + 3i)
with zeroes λ1 = 3i, λ2 = −3i. Hence, the solution of the homogeneous part is
yh (x) = Ce3ix + De−3ix ,
where C, D ∈ C are constants. Another way of expressing all solutions of the DE is
yh (x) = C cos (3x) + D sin (3x),
where C, D ∈ C are constants.
To obtain a particular solution we can try with the form
(25) yp (x) = ax2 + bx + c ⇒ yp0 (x) = 2ax + b ⇒ yp00 (x) = 2a.
Plugging (25) into the DE we obtain
(26) 2a + 9(ax2 + bx + c) = 2x2 − 1.
Comparing the coefficients at x2 , x, 1 on both sides of (26) we obtain a system
9a = 2, 9b = 0, 2a + 9c = −1,
with the solution
2 13
a = , b = 0, c=− .
9 81
Hence, the general solution of the DE is
2 13
y(x) = yh (x) + yp (x) = C cos (3x) + D sin (3x) + x2 − .
9 81
The one satisfying the initial conditions
13
y(0) = C − = 1,
81
y 0 (0) = 3D = 1,
66
Hence, h i
A= v1 v2 v3 · diag(−1, 1, −2) · P −1 .
| {z }
P
−1
Let us compute P using Guassian elimination:
1 1 1 1 0 0 1 1 1 1 0 0
−1 1 2 0 1 0 ∼ 0 2 3 1 1 0
|{z}
`2 =`2 +`1
1 1 4 0 0 1 `3 =`3 −`1 0 0 3 −1 0 1
|
{z }
P I3
1 1 0 43 0 − 13
∼
|{z}
0 2 0 2 1 −1
`1 =`1 − 13 `3
`2 =`2 −`3
0 0 3 −1 0 1
1 0 0 13 − 12 61
1 1
∼ 0 1 0 1 − .
|{z} 2 2
`1 =`1 − 12 `2
`2 = 21 `2
0 0 1 − 13 0 1
3
`3 = 13 `3
|
{z
}
−1
I3 P
So
1 1 1
1 1 1 −1 0 0 3 − 2 6
1 1
A = −1 1 2 0 1 0 1
2
−2
1 1 4 0 0 2 − 13 0 1
3
1 1 1
−1 1 2 3 − 2 6
1
= 1 1 4 1 − 12
2
−1 1 8 − 13 0 1
3
0 1 0
= 0 0 1 .
−3 0 2
c. Since the eigenvalues of the matrix A are −1, 1, 2, the corresponding third order
polynomial is
(λ + 1)(λ − 1)(λ − 2) = (λ2 − 1)(λ − 2) = λ3 − 2λ2 − λ + 2
and hence the differential equation with constants coefficients is
x(3) = 2x(2) + x(2) − 2x.
Solution of the task 48.
First we solve the homogenenous part
ẍ − ẋ − 4x = 0.
Differential equations 69