MA1506 Mathematics II Tutorials
Tutorial 1: First order differential equations
The aim of this tutorial was to introduce some elements of differential equations such as definition, types of equations, related physical problems, etc. The slides used in the class can be downloaded from here .
As the main objective of this tutorial is about ODEs, I would like to mention some basic idea of ODEs. Let take an example from the lecture notes.
Example. Solve .
It is not hard to see that this ODE is of separable form and one can easily solve it using integration. After several steps, one gets that the general solution of the above ODE is
As noticed in the lecture notes, this ODE basically has infinitely many solution as you can see from the above formula, the presence of some constant . In fact, such an ODE illustrates lots of flows so that each flow represents a particular constant . In addition, each particular constant can be determined using the so-called “initial value”. Roughly speaking, you may set the value of at a particular point . Since there is a unique flow passing though this “initial value”, the corresponding value can be found.
To support my explanation, I have used Maple to plot the following picture (called phase portrait)
If you are interested in Maple, you can read this, and the code that I have used iswith(DEtools): NLC := diff(y(x),x) = (1+y(x)^2)*exp(x); ivs := [y(0)=-10,y(0)=0,y(0)=10]; DEplot(NLC, y(x), x=-10..10, ivs, arrows=medium, linecolor=magenta, color=blue);
As you can see, I have used three initial values: , , and . In the picture above, we have three pink curves corresponding to these three “initial values”: , , and , to be exact, to three particular curves: , , and . Besides, we also have blue arrows in the above picture. These arrows present other flows associated to other initial values. As such, we may think that general solution of ODE presents a collection of flows.
Q1. This question is standard since they are of separable form. In order to solve it, you use integration. However, there was one thing that I left during the class concerning part (d). In order to prove the statement saying that either or at all points, we have the following phase portrait associated to the ODE
Three pink curves correspond to three initial values , , and . As you can see, there is a unique curve with . In order to prove the statement, you need to adopt something. Roughly speaking, any solution with a particular initial value is a continuous curve. This is not true in general, but in the case of our equation above, this is okay.
We now prove by contradiction. Without loss of generality, we may assume that and for some , i.e., the solution will be nonzero at some close enough to . In addition, by using the ODE, there holds . Using the continuity of solution, there holds for any .
By going back to the ODE, there holds
where the constant depends only on . Therefore, by the fundamental theorem of calculus, there holds
By taking sufficiently small, we have a contradiction. In other words, for a sufficiently small neighborhood of a zero point of , vanishes. By shifting, vanishes at all points.
Q2. The only thing in this question is that why do we need a negative sign in the following ODE
where is constant. This is easy since is decreasing in time and as the initial temperature of the ball is greater than its of environment. If you are still not sure, by replacing by , eventually you arrive at
which immediately implies that .
Q3. Same as in the previous question, we still need a negative sign in either
since is decreasing in time and is positive.
Q4. I think the slides and the answer paper are clear enough. The only thing that you probably worry is that eventually you arrive at
which is not well-defined at . This corresponds to the case, as in the picture from wikipedia, when . Fortunately, if this is the case, it is immediate to see that the moth flies around the candle.
Q5. This is a standard question, I omit it. Notice that in part (b), we can use but later on, the corresponding integral will cost you some trouble.
Tutorial 2: First order differential equations (cont’)
Q1. This question is standard and I don’t want to spend much time on this. However, it seems that some of you may have trouble with the following integrals
where are positive integers. Notice that by a variable change , we can easily rewrite these integrals as
For the sake of simplicity, we only need to consider these integrals with . Regarding to the first integral, we do the following, by integration by parts,
As you can see, we have just raised to by combining and . By repeating this procedure, eventually we arrive at which is easily calculated.
For the second integral, we do the same trick. However, since the term has a positive exponent, we need to lower . To this purpose, instead of combining and , we have to combine and
Q2. As I have already mentioned during the class, this question typically considers the integral form of ODEs which can easily deduce to the original form by differentiating. Within this question, we have already touched a second order ODE which basically needs two conditions in order to find a particular solution. We shall consider these ODEs in the next tutorial.
Keep in mind that for a second order ODE, the general solution mainly depends on two parameters. As such, in order to find those parameters, we need two conditions, one involves and the other involves .
Q3, Q4, Q5. Please follow the slides used during the class.
f1:= plot::Function2d(2-2*exp(-1/3*x), LegendText = "2-2*exp(-1/3*x)", x = -10/10 .. 57/10, Color = RGB::Blue): f2:= plot::Function2d(2-2*exp(1/3*x), LegendText = "2-2*exp(1/3*x)", x = -10/10 .. 57/10, Color = RGB::Red): plot(f1, f2, LegendVisible = TRUE, Scaling = Constrained)
In this blog, we have talked about MuPAD several times, you can find these posts here.
Tutorial 3: Second order differential equations
Q4. I think I should mention two things concerning to this question: the sign of and the way we calculate the required time .
As you can see from the slides, it is necessary to find the precise sign for .
Physically, due to gravity (since we have the presence of massive body, like the Sun), the earth has the so-called gravitational potential energy. Once the Earth falls to the Sun, such potential energy starts decreasing. According to the conservation law of energy, the lost potential energy will transform to the kinetic energy. That kinetic energy will speed up the Earth. In other words, the speed of falling will increase from time to time. Since the distance function is measuring based on the Sun, that function itself is decreasing (the Earth is approaching the Sun). And since the speed of falling is increasing, it is obvious to see that the function is also decreasing in time. As such, we have to choose the negative sign for .
Concerning to the formula for after solving the separable ODE, as you can see, we eventually arrive at
The point is that what does this formula mean? In fact, the above formula gives us a relation between time , as a function of the distance and the distance itself. To see this more precise, we play another game. Assuming you have two points and . It is known that some body is moving from to . We assume further that the arrival time for both and is a function of some distance to some fixed point, say . That is to say, where is measuring based on . If
are moments that the body meets and respectively. Then it is clear to see that is the time travel from to . In other words, that time is nothing but
Let us go back to our problem. If we denote by the right hand side of the formula for , i.e.,
we then immediately see that the time travel is
But thanks to the fundamental theorem of calculus, there holds
And this is what we need. Notice that we have used the following
Q1, Q3: I think we don’t have any trouble with these two questions.
Q2: I have used a slightly different approach for finding a particular solution using the method of undetermined coefficients.
Tutorial 4: The harmonic oscillator
The aim of this tutorial was to consider the harmonic oscillator. The slides used in the class can be downloaded from here . I want to emphasize something about the stability of equilibrium points for ODEs. At first, any second order ODEs can be transformed into a system of first order ODEs as shown below
In this way, it suffices to study the stability of equilibrium points for the following system
where and are functions. Assuming is an equilibrium point for the above system. In other words, there holds
As we have discussed in the class, in order to study the stability of equilibrium points, it is important to consider its linearized system, that is,
In terms of vectors, the above system is usually written as
where and .
Hyperbolic equilibrium point.
An equilibrium point is called a hyperbolic equilibrium point of the system if none of the eigenvalues of the matrix
have zero real part.
Sink equilibrium point. This is the case when all of the eigenvalues of the matrix have negative real part.
Source equilibrium point. This is the case when all of the eigenvalues of the matrix have positive real part.
Saddle equilibrium point. This is the case when the matrix has at least one eigenvalue with a positive real part and at least one with a negative real part.
Example. Let us classify all of the equilibrium points of the nonlinear system
We obviously have two equilibrium points and . In terms of matrix, we have
Thus, is a source and is a saddle. To illustrate this, following is the phase portrait
Obviously, for the transformed system for , its linearized system is nothing but
Therefore, if , the equilibrium point cannot be hyperbolic.
Non-hyperbolic equilibrium point.
The stability of nonhyperbolic equilibrium points is typically more difficult to determine. A method, due to Liapunov, that is very useful for deciding the stability of nonhyperbolic equilibrium points is presented here.
A Lyapunov candidate function. A continuous scalar function is called be a Lyapunov-candidate-function at if it is a locally positive-definite function. That is,
Once we have the function in hand, we can easily calculate the so-called time derivative of , that is,
For example, with one can see that .
Stable equilibrium. If the time derivative of the Lyapunov-candidate-function is locally negative semidefinite in a neighborhood of , that is,
then is proven to be a stable equilibrium point.
Locally asymptotically stable equilibrium. If the time derivative of the Lyapunov-candidate-function is locally negative definite in a neighborhood of , that is,
then is proven to be locally asymptotically stable.
Globally asymptotically stable equilibrium. If the time derivative of the Lyapunov-candidate-function is globally negative definite in a neighborhood of , that is,
then is proven to be globally asymptotically stable.
Unstable equilibrium. If the time derivative of the Lyapunov-candidate-function is locally positive definite in a neighborhood of , that is,
then is proven to be a unstable equilibrium point.
Notice that the difference between asymptotically stability and stability is that for the latter case, the solution stays in a neighborhood of the equilibrium point while in the former case, it is required that the solution needs to converge to the equilibrium point.
Example. Let us go back to the ODE where the continuous function verifies for any . In this case, the following Lyapunov function
is well-known. For example, if then
Obviously, . Thus, the origin is stable.
Example. For the system
the following is the phase portrait
Tutorial 5: The Malthusian and logistic growth models
There is one thing that I should mention here is the No-Crossing Principle. In fact, we have already used once in Tutorial 1 when we deal with the following ODE
As you may see, is a trivial solution. Thus, if a solution has no zero, it is non-zero everywhere.
Tutorial 6: The Malthusian and logistic growth models (cont’)
In Q1, to help you understand better, when , the general solution for the following IVP
with , and is nothing but
As you may see, this function will decrease very fast.
In Q5, when we talk about the number of molecules of being destroyed by the reaction inside the small piece of tube, we need to consider the volume of that piece. Although we can consider that piece as a cylinder, thus giving us the volume , since is small, we can consider a general situation.
In the literature, the volume of that piece is nothing but
In other words, if you know the area of its cross-section, you simply integrate to get the volume. As such, the term is simply transformed to
and after dividing by , we force to find
Thanks to the L’Hopital rule, this is easy as shown below
Another important stuff lying in this tutorial is about understanding phase portraits. As I have mentioned in the class when we was talking about Q5, it is important to find equilibrium points, to identity whether they are stable or unstable, to find the behavior of the population, etc.
Tutorial 7: The Laplace transformation
The aim of this tutorial was to introduce basic notations about the Laplace transformation. The slides used in the class can be downloaded from here . I only want to emphasize that in Q5, since the force is exerted suddenly, this suggests that we need a Dirac delta function. Therefore, the force will be proportional to , that is,
Although the coefficient function is unclear, after taking the Laplace transform, we only need information about at . Indeed, by using the integral equation
one can see that . Let us consider the corresponding ODE
By taking the Laplace transform of both sides we get that
Thus, as one can see, plays the central role in our argument. Since the value of at any can be arbitrary, one can assign to be the constant function .
In Q6, suppose that we don’t want to assume that the wave hits instantaneously: we want to model the situation by assuming that the momentum is imparted to the ship over a short but nonzero period of time starting at . In this context, instead of using the Dirac delta function, the force will be proportional to which is just a cut-off function as mentioned during the class. Consequently, one can write
Notice that although we don’t know anything about , since is quite small, we can assume that is constant for any , i.e., the change of is not much within this interval of time. Therefore, by integrating
one easily gets that for all . In particular, our ODE is nothing but
To take the Laplace transform of both sides, we only need to consider the extra part, . In fact, one gets by definition that
Again, as you can see from the previous argument, the values for when and play no role as you eventually integrate over . Thus, we can assume is nothing but for all . This is the reason why I was able to write the formula for the force where was replaced by as shown in the slides.
Tutorial 8: The theory of matrices
The aim of this tutorial was to introduce basic notations about linear transformation, matrices, rotation and shearing. The slides used in the class can be downloaded from here . I would like to highlight that throughout the tutorial, we have touched several matrix decomposition. I would take this chance to introduce more decompositions. For those who are interested in, please click this.
As you can see, we have use the Jordan normal decomposition in the last question. We shall come back to this in the next tutorial when we deal with the role of the eigenvalue 1 in the Markov processes.
Tutorial 9: The theory of matrices (cont’)
The aim of this tutorial was to introduce basic notations about Markov chains, eigenvalues and eigenvectors. The slides used in the class can be downloaded from here . I just want to emphasize that if is a Markov matrix then any is also a Markov matrix. This gives a contradiction to the last part of Q5.
Indeed, suppose is a matrix which is given below
We shall prove by induction. Assuming is a Markov matrix, we need to prove that is also a Markov matrix. To simplify our calculation, we denote
In order to prove that is also a Markov matrix, it suffices to show that
for each fixed . To do this, we calculate . In fact, since
we find that
We now switch the double sum appeared in the preceding identity, we get
Thus by induction, the matrix is Markov.
Tutorial 10: Systems of first order ODEs
for with some initial condition and . In terms of matrices, we can rewrite the above system as the following
I just realized that there is no typical approach for solving the above system in the lecture notes. I propose here an approach in the case the coefficient matrix has two distinct eigenvalues, say and .
By the Jordan decomposition, if we denote and are two eigenvectors associated to the two eigenvalues and respectively, we have the following
Using this and multiply both sides of the system by on the left, we get that
Therefore, if we think that
is a new variable, we then get the following decouped system for and as the following
Since the preceding system is decoupled, we can solve and solely. To get and , we do the reverse
A careful analysis shows that the solution is of the following form
In the general case, the following is the so-called fundamental fact for the initial value problem
Let be an matrix. For each , the initial value problem
has a unique solution for all which is given by
Now we turn to the case when is a matrix. When we diagonalize , we may face one of the following three cases: either
Respectively, we may have one of the followin: either
We now list the various phase portraits that result from thesesolutions, grouped according to their topological type with a finer classificationof sources and sinks into various types of unstable and stable nodesand foci:
Case 1. Suppose that
In this case, we have a saddle at the origin. The only difference between and is that the arrow will be opposite.
Case 2. Suppose that either
In this case, we have stable node at the origin.
Case 3. Suppose that
In this case, we have a stable focus at the origin, i.e., a spiral sink.
Case 4. Suppose that
In this case, we only have a center at the origin.
If you have time, please read this note. Now it’s time to enjoy some music. Following is my favorite song, Les Rois Du Monde (king of the world), please enjoy