Current term (Spring 2024)

This term I’m an instructor for the course “Calculus of Several Variables” (MATH 231) at Penn State. Further information about the course is available on the Canvas webpage.

Progressively updated lecture notes for the course will be soon available below.

Previous terms

Fall 2023

This term I’m an instructor for the course “Calculus with Analytic Geometry II” (MATH 141) at Penn State. Further information about the course is available on the Canvas webpage.

Lecture notes for the course are available here:

Lecture notes Calculus with Analytic Geometry II

Spring 2023

This term I’m an instructor for the course “Integral Calculus with Applications” (MATH 101) at UBC. Further information about the course is available on the Canvas webpage.

Here are some notes for the third-week class, concerning the substitution rule and the partial fraction decomposition.

This is an example, using GeoGebra, of implementation of the trapezoidal method to approximate definite integrals of functions whose values are only known at a given sample of points. Given a freehand-drawn function f\colon [-5,5]\to \mathbb{R}, the definite integral \int_{-5}^{5}f(x)\;\text{d}x is approximated with

    \begin{equation*}\frac{\Delta x}{2}(f(x_0)+2f(x_1)+\cdots +2f(x_{n-1})+f(x_n)) \end{equation*}

for the following increasing values of n: 5,20,40,80,160. Here, at each scale n,

    \begin{equation*}\Delta x=\frac{10}{n}, \quad  x_i=-5+i\Delta x \text{ for every }i=0,\dots,n \;. \end{equation*}

See this spreadsheet for examples of numerical integration of

    \begin{equation*}\int_{-2}^{2}\sin{x^2}\;\text{d}x$\end{equation*}

using Riemann sums, the trapezoidal method and Simpson’s rule at scale n=20. The resulting expressions are given, respectively, by

    \begin{equation*}\frac{1}{5}\sum_{i=1}^{20}\sin{\biggl(-2+\frac{i}{5}\biggr)^2}\;, \end{equation*}

    \begin{equation*} \frac{1}{10}\biggl(\sin{(-2)^2}+\sin{(2)^2}+2\sum_{i=1}^{19}\sin{\biggl(-2+\frac{i}{5}\biggr)}\biggr)\;, \end{equation*}

and

    \begin{equation*}\begin{split} \frac{1}{15}\biggl(\sin{(-2)^{2}}&+4\sin{\biggl(-2+\frac{1}{5}\biggr)^2}+2\sin{\biggl(-2+\frac{2}{5}\biggr)^2}+\cdots \\&+4\sin{\biggl(-2+\frac{19}{5}\biggr)^{2}}+\sin{(2)^2}\biggr)\;.\end{split}\end{equation*}

Week 6 class

First part: the logistic equation.

The logistic equation is a first-order differential equation describing a simple model of evolution of a population. It takes the following form:

(1)   \begin{equation*}     y'(t)=y(t)(1-y(t))\;, \end{equation*}

where the unknown y(t) is a real-valued function of the time t. In accordance with our interpretation of the model, we shall only be interested in initial conditions of the form

    \begin{equation*} y(0)=y_0\;, \quad y_0 \text{ a strictly positive real number }\;; \end{equation*}


y_0 represents the initial number of individuals of the population.

We would like to understand the long-term behaviour of y(t). To this end, we solve the differential equation in (1) using the method of separation of variables.

First, we examine separately the easiest possible solutions to the equation, represented by constant functions. A constant function y(t)\equiv C, C>0, solves (1) if and only if 0=C(1-C), that is, if and only if C=1 (because of the constraint y_0>0 we have placed). Hence, the function which is constantly equal to 1 is a solution to (1), corresponding to the initial condition y_0=1.

Remark: by a general theorem on existence and uniqueness of solutions to differential equations, it is the only function which solves (1) for the initial condition y_0=1.

We may now assume that y_0\neq 1, and thus divide both sides of (1) by the right-hand side y(t)(1-y(t)), which by continuity of the function y(t)(1-y(t)) (solutions need to admit first derivatives, and hence are in particular continuous) is non-zero for t close to the initial time 0. We get

(2)   \begin{equation*} \frac{y'(t)}{y(t)(1-y(t))}=1\;; \end{equation*}


taking antiderivatives (that is, indefinite integrals) on both sides, this is equivalent to

(3)   \begin{equation*}\int \frac{y'(t)}{y(t)(1-y(t))}\;\text{d}t=\int 1\;\text{d}t\;.\end{equation*}

On the one hand, we obviously have

    \begin{equation*}  \int 1 \;\text{d}t=t+C\;, \quad C\in \mathbb{R}. \end{equation*}

On the other hand, the substitution y=y(t) allows to take care of the indefinite integral on the left-hand side of (2) as follows:

    \begin{equation*} \int \frac{y'(t)}{y(t)(1-y(t))}\;\text{d}t= \int \frac{1}{y(1-y)}\;\text{d}y=\int \frac{1}{y}\; \text{d}y \;+\;\int\frac{1}{1-y}\;\text{d}y\;, \end{equation*}

where the last equality follows from the method of partial fractions, observing that the equation

    \begin{equation*} \frac{1}{y(1-y)}=\frac{A}{y}+\frac{B}{1-y} \end{equation*}

in the unknowns A and B is solved for A=B=1.
Since \int \frac{1}{y}\;\text{d}y=\log{|y|}+C_1 and \int \frac{1}{1-y}\;\text{d}y=-\log{|1-y|}+C_2, with C_1,C_2\in \mathbb{R}, we deduce that (3) holds if and only if

(4)   \begin{equation*}\log{\biggl|\frac{y(t)}{1-y(t)}\biggr|}=t+C\;.\end{equation*}

Remark: strictly speaking, we have

    \begin{equation*} \int \frac{y'(t)}{1-y(t)}\;\text{d}t=\log{\biggl|\frac{y(t)}{1-y(t)}\biggr|}+C_3\;, \quad C_3\in \mathbb{R}, \end{equation*}

but we incorporate the constant C_3 into C to ease notation in (4).

Now (4) is equivant, taking exponentials on both sides, to

    \begin{equation*}\biggl|\frac{y(t)}{1-y(t)}\biggr|=e^{C}e^{t}\;,\end{equation*}

removing the absolute values, the latter amounts to

    \begin{equation*}\frac{y(t)}{1-y(t)}=\pm e^{C}e^{t} =De^{t}\;,\end{equation*}

calling D=\pm e^{C}, so that D can be any non-zero real number. It remains to solve the previous equation for y(t):

    \begin{equation*}y(t) =De^{t} (1-y(t))\;,\end{equation*}


which yields

    \begin{equation*}(1+De^{t})y(t)=De^{t} \implies y(t)=\frac{De^{t}}{1+De^{t}}\;.\end{equation*}


Dividing numerator and denominator by the non-zero quantity De^{t}, we get the simplified expression

(5)   \begin{equation*}y(t)=\frac{1}{1+Ae^{-t}}\end{equation*}

for the solution, where we have set A=1/D.

Notice that we recover the constant solution y(t)\equiv 1, singled out at the beginning, by allowing A to be equal to 0. Furthermore, imposing the initial condition y(0)=y_0 in (5) allows to determine A in terms of y_0. Indeed, we get

    \begin{equation*} y_0=\frac{1}{1+A}\implies 1+A=\frac{1}{y_0}\implies A=\frac{1}{y_0}-1=\frac{1-y_0}{y_0}\;. \end{equation*}

We have reached the following conclusion: the general solution to the logistic equation (1) with strictly positive initial conditions is given by

    \begin{equation*} y(t)=\frac{1}{1+Ae^{-t}}\;, \quad A\in \biggl\{ \frac{1-y_0}{y_0}:y_0>0 \biggr\}\;. \end{equation*}

We now examine the limit of y(t), as given in the last displayed formula, as t tends to +\infty. Since \lim_{t\to+\infty}e^{-t}=0, we have

    \begin{equation*} \lim\limits_{t\to+\infty}y(t)=1 \end{equation*}


irrespective of the value of A, that is, regardless of the initial condition y_0.

Second part: the logistic equation with proportional harvesting.

The logistic equation with proportional harvesting is obtained from the logistic equation by adding a factor which takes into account the consumption of resources of the environment, assumed to be proportional to the number of individuals of the population. It takes the form

(6)   \begin{equation*}y'(t)=y(t)(1-y(t))-Ky(t)\;,\end{equation*}

where K>0 is a constant of proportionality.

In order to understand the asymptotic behaviour of the solutions, where we again assume that the initial condition is y(0)=y_0>0, we proceed exactly in the same way as for the logistic equation. Before turning to actual computations, observe that it is reasonable to surmise that, in view of the additional consumption of resources, the environment will not allow an equilibrium state equal to 1 any longer; if K is sufficiently small, we might guess that there will still be an equilibrium state for the system, which is strictly smaller than 1, whereas if K is large enough we might predict that the population eventually dies out. We shall see that this is precisely the case.

First, we deal with possible constant solutions. A function y(t) which is constantly equal to a certain value C solves (6) if and only if C is a root of the polynomial (in the variable Y) Y(1-Y)-KY=Y(1-K-Y), that is, if and only if C=0 or C=1-K. As we disregard the initial conditions y_0\leq 0, this yields the only value C=1-K. Therefore, y(t)\equiv 1-K is the unique constant function solving (6) for an initial condition y_0\geq 0.

Assuming now y_0\neq 1-K, we can divide both sides of (6) by the right-hand side y(t)(1-K-y(t)), which is non-zero by continuity for t sufficiently close to 0: we thus get

    \begin{equation*} \frac{y'(t)}{y(t)(1-K-y(t))}=1\;. \end{equation*}


Taking indefinite integrals, the previous equality is verified if and only

(7)   \begin{equation*}G(y(t))=\int 1\;\text{d}t=t+C \quad \text{for some }C\in \mathbb{R},\end{equation*}


where G(y) is any fixed antiderivative of \frac{1}{y(1-K-y)}. To find G(y), we consider two different cases, which are solved by different methods of integration:

First case: K=1. In this case G(y) is an antiderivative of -\frac{1}{y^{2}}, so that we can take G(y)=\frac{1}{y}. Therefore, (7) is equivalent to

    \begin{equation*} \frac{1}{y(t)}=t+C\;, \end{equation*}


which amounts to

    \begin{equation*} y(t)=\frac{1}{t+C}\;. \end{equation*}


Plugging the initial condition y(0)=y_0 into the last displayed equation, we obtain

    \begin{equation*} y_0=\frac{1}{C}\;, \quad \text{ that is,} \quad C=\frac{1}{y_0}. \end{equation*}

We deduce that

    \begin{equation*} \lim\limits_{t\to\infty}y(t)=0 \end{equation*}


for every initial condition y_0, that is, the population eventually dies out.

Seeond case: K\neq 1. We apply the method of partial fractions and decompose

    \begin{equation*}\begin{split} \frac{1}{y(1-K-y)}&=\frac{a}{y}+\frac{b}{1-K-y}=\frac{a(1-K-y)+by}{y(1-K-y)}\\&=\frac{(b-a)y+a(1-K)}{y(1-K-y)}\;, \end{split}\end{equation*}


where we need to find a,b. The previous equation is satisfied when the conditions

    \begin{equation*}b-a=0\;, \quad  a(1-K)=1 \end{equation*}

are simultaneously met, which gives

    \begin{equation*} a=b=\frac{1}{1-K}\;. \end{equation*}

Equality

    \begin{equation*} \int \frac{y'(t)}{y(t)(1-K-y(t))}\;\text{d}t=\int {1}\;\text{d}t \end{equation*}


is thereby equivalent to

    \begin{equation*} \frac{1}{1-K}(\log{|y(t)|}-\log{|1-K-y(t)|})=t+C\;, \quad C\in \mathbb{R}. \end{equation*}


We now solve the previous equation for y(t): equality

    \begin{equation*} \frac{1}{1-K}\log{\biggl|\frac{y(t)}{1-K-y(t)}\biggr|}=t+C \end{equation*}


implies, multiplying both sides by 1-K, taking exponentials and removing the absolute value, that

    \begin{equation*} \frac{y(t)}{1-K-y(t)}=\pm e^{(1-K)C}e^{(1-K)t}\;. \end{equation*}


Calling D=\pm e^{(1-K)C}, which can be an arbitrary nonzero real number, and multiplying by the denominator 1-K-y(t) on the left-hand side of the last displayed equation, we obtain

    \begin{equation*} y(t)=De^{(1-K)t}(1-K-y(t))\;, \end{equation*}


which amounts to

    \begin{equation*} y(t)(1+De^{(1-K)t})=(1-K)De^{(1-K)t}\;, \end{equation*}


that is, to

(8)   \begin{equation*} y(t)=\frac{(1-K)De^{(1-K)t}}{1+De^{(1-K)t}}=\frac{1-K}{1+Ae^{-(1-K)t}}\;, \end{equation*}

where the last equality follows by dividing numerator and denominator by the nonzero quantity De^{-(1-K)t} and calling A=1/D. Observe that, when A is allowed to be equal to 0, we recover the constant solution y(t)\equiv 1-K examined at the beginning.

Plugging the initial condition y(0)=y_0 in (8), we get

    \begin{equation*} y_0=\frac{1-K}{1+A}\;, \end{equation*}


from which we readily find

    \begin{equation*} A=\frac{1-K}{y_0}-1=\frac{1-K-y_0}{y_0}\;. \end{equation*}


Finally, we conclude that the unique solution to (6) (for K\neq 1) with initial condition y(0)=y_0>0 is given by

    \begin{equation*} y(t)=\frac{1-K}{1+\frac{1-K-y_0}{y_0}e^{-(1-K)t}}\;. \end{equation*}

Now observe that we have different asymptotic behaviours of the solution, depending on whether K is larger or smaller than 1. If K>1, then

    \begin{equation*} \lim\limits_{t\to+\infty}e^{-(1-K)t}=+\infty\;,\end{equation*}

from which it follows that

    \begin{equation*} \lim\limits_{t\to+\infty}y(t)=0\end{equation*}

for every initial condition y_0>0. On the other hand, if K<1, then

    \begin{equation*} \lim\limits_{t\to+\infty}e^{-(1-K)t}=0\;,\end{equation*}

so that

    \begin{equation*}\lim\limits_{t\to+\infty}y(t)=1-K\end{equation*}

for every initial condition y_0>0.

To sum up, our analysis has brought to the fore the presence of three distinct regimes for the logistic equation with proportional harvesting.

  • In the case K<1, the evolution does not involve an overwhelming consumption of resources, so that the system allow an equilibrium state at the value 1-K, to which every solution tends asymptotically. Observe that, consistently with the underlying intuition, the very fact that there is consumption of resources (K>0) corresponds to the equilibrium state 1-K being strictly smaller than the corresponding one for the logistic equation without harvesting.
  • At the value K=1, a phase transition occurs for the given model: the population does not stabilise towards a positive value any longer, but instead dies out irrespective of the initial number of individuals. Furthermore, the explicit expression of the solution enables us to understand that the rate of decay of the number of individuals is polynomial, that is, y(t) tends to zero with the same speed as the function 1/t.
  • Finally, in the case K>1, the population eventually dies out once again. However, if the qualitative behaviour of the solution y(t) (namely the fact that it tends to 0) matches the case K=1, the quantitative behaviour substantially tells the two cases apart. Indeed, in this case, y(t) tends towards the limiting value 0 with the same speed as the function e^{(1-K)t}, hence much faster than 1/t does; in other words, the rate of decay is exponential.

Here are the phase lines both for the standard logistic equation and for the logistic equation with proportional harvesting. Observe that, from a qualitative perspective, the asymptotic behaviour of the solutions can be entirely read off from the phase line, without solving the equation explicitly. However, finer information such as the speed of convergence to equilibria cannot be inferred from the phase line.

Past courses

This is a list of the courses and seminars for which I was teaching assistant in the last five years at ETH:

During the academic year 2021-2022 I co-organized the Geometry Graduate Colloquium in the mathematics department at ETH: the webpage is here.