Thursday, October 6, 2016

Classical Mechanics - Lagrangian

Joseph-Louis Lagrange (1736-1813) was a mathematician, physicist and astronomer which made important contributions to analysis, number theory and classical and celestial mechanics. Mécanique analytique (1788) was his treatise where he first introduced the analytical mechanics. He first invented the Lagrangian function which verify the Lagrange equations. The Lagrangian is a reformulation of the classical mechanics, which simplify the calculations.

But before going directly to the Lagrange equations, let's start with the virtual displacement. Consider a system made of a pipe which rotate on a fixed at one end, and where some particles come from the fixed end of the pipe and get out from the pipe by the other end. The real displacement of the particles will be the rotating displacement plus the centrifugal force. This displacement, is commonly denoted as dr. The virtual displacement is the displacement if all the forces and constraints acting on the system do not change. This is, if for an infinitesimal amount of time, the pipe will not rotate. Then, the particle will only have the centrifugal force, which made only the radius vector. This displacement is commonly denoted as δr.

Let's now return to the Lagrange equations. The second law of Newton says that the force on a particle is:
Newton's second law

If we decompose the force into the applied force Fa, and the constraints force f, the Newton's law becomes:

Considering a system in equilibrium, the total work of the system will be zero. As the work is the force multiplied by the displacement, the virtual work will be also zero:


In the case of a rigid body, the multiplication of a contraint force of a single particle of the rigid body with its virtual displacement will be zero; as the virtual displacement will be perpendicular to the constraint force. Imagine a particle on a pendulum, the contraint force will from the particle to the fixed point of the string, and the virtual displacement will be tangent to the circle made by the rotating string. This leads the previous equation to the principle of virtual work:

Principle of virtual work

We also know that the force is the derivative of the momentum:


Substituting this on the principle of virtual work, we have the D'Alembert principle:

D'Alembert principle

The D'Alembert principle states the dynamic equilibrium of a system of particle.

Let's now consider a holonomic contraint ri(q1, q2, ..., qN, t) = 0. A holonomic constraint is all the equations which restrict the movement of our particles system where the time is involved in those equations. This means that each coordinate ri can be defined by some equations where generalized coordinates qi are defined.
Then we can define the velocity as:
Velocity in generalized coordinates

And the virtual displacement as:
Virtual displacement in generalized coordinates

Note that the time does not appear here, since the virtual displacement, by definition, considers only displacements of the coordinates. Going back again to our equation of the virtual work, we can use generalized coordinates:

Here, Qk is called the generalized force as it depends on the generalized coordinates. Note that q does not necessarily have the dimension of force as Q does not necessarily have the dimension of force, but the product of both must have the dimension of work (it might be the torque for Q and the angle for q).
Let's go back to the D'Alembert principle and use the generalized coordinates for the momentum:


Consider now the following relation:


For the last term, we can interchange the differentiation variable to obtain the velocity:

Substituting this result in the previous equation:

From the above equation obtained of the velocity, we know that this equality is true:


Substituting all this, we get:

Reordering this equation:

In the previous equation, we can now see the term of the kinetic energy T:


Making the adequate substitutions in the D'Alembert principle with the generalized coordinates:

Let's now use a potential function. Consider the forces are derivable from a scalar potential function V as follows:

By definition of the generalized force, we can link the potential function as follows:

Which lead to the final equation:
Lagrange's equation

I've also included V in the first term of the equation, which does not affect the result as the potential field does not depend on the generalized velocities. This lead to the Lagrange's equation with the substitution of L = T - V which is known as the Lagrangian.

But what's the Lagrangian and the Lagrange's equation for? From the values of the kinetic and the potential energies, we can easily get the equation of movement of a system of particles. With the Lagrange's equation we'll have a system of equations (one per generalized coordinate) which is only composed by the kinetic and potential energy (which are quite easily to obtain in most of the cases).

To see this, let's solve an exercice.

Classical Mechanics - Lagrangian exercise

Let's use the Lagrangian to solve a simple exercise.
Two blocks of equal mass that are connected by a rigid bar of length l move without friction along a given path. The attraction of the earth acts along the negative y-axis. Find the equation for the generalized coordinate α.

 First, let's try to get the relation between the Cartesian coordinates and our generalized coordinate:


To get the Lagrangian, we need the potential and kinetic energies.


And the potential:

Now we can write the Lagrangian as L = T - V:

And the Lagrange equation remains as:

And finally, we get the equation of the system based on the generalized coordinate α:


We can solve the previous differential equation knowing that α is a time dependent variable, or let the equation as this.

As we can see, the Lagrangian help us getting the equation of the system with simple methods. Solving this problem with the Newtonian mechanics could lead to more complicated calculus.


Thursday, September 29, 2016

Functional Analysis - Hilbert spaces

Starting from some definitions of the metric and normed spaces (here), we can start by defining the inner product spaces which will lead us to the Hilbert spaces. 

We all know the scalar product from two (or more) vectors x, y ∈ ℝn:
This can be considered as an inner product for a vectorial space. As for the norm in a normed space, the inner product space (also named pre-Hilbert space) is a pair of a set of vectors and the definition of an inner product. The inner product on a space X is a mapping of X ✕ X into a scalar field K. We write the inner product as
 
An inner product must follow a set of axioms:
The third axiom refers to the complex conjugate. If both x and y are real, the inner product is commutative. For the forth axiom, it is equals to zero, only if x is the zero vector.

Remembering the definition of a complete space (from here), we can now define the Hilbert space as a complete inner product space. Hilbert spaces are Banach spaces with a norm that is derived from an inner product, so they have an extra feature in comparison with arbitrary Banach spaces, which makes them still more special.

Let's see now some properties of an inner product:
  • Parallelogram equality: starting from the norm and with the axioms of the inner product, we easily reach to the parallelogram equality: || x + y ||2 + ||x - y||2 = 2(||x||2 + ||y||2)
  • Orthogonality: when two elements x, y are in a space X, we say they are orthogonal if ⟨ x, y⟩ = 0. Also written as x ⊥ y
  • Polarization identity: this helps us to get the inner product from a norm. Re⟨x, y⟩ = 1/4(||x + y||2 - ||x - y||2) and Im⟨x, y⟩ = 1/4(||x + iy||2 - ||x - iy||2). Those formulas correspond to the complex inner product, for a real inner product, only the first equation will remain.
  • Schwarz inequality: remembering the triangle inequality, we have with the inner product, the Schwarz inequality: |⟨ x, y⟩| ≤ ||x|| ||y||
The projection, or orthogonal projection, is another concept commonly used in Hilbert spaces, but first we have to explain some other related concepts. 
Let be a space X with an element x and a subset M ⊂ X. The distance from x to the subset M will be δ = inf ||x - y|| where y ∈ M. This sounds quite familiar, as it's the distance in an Euclidean space. But let me introduce more details to the previous definition to be sure of the uniqueness of y: the subspace M must be complete and convex for the solution being unique. This result can be easily demonstrate with the parallelogram equality.
Given the distance from the subset M to the space X, we get the vector z = x - y which is orthogonal to the subset M. Reordering the vectors sum as y = x + z we can see now that the vector y is the orthogonal projection of x on M.

Monday, September 26, 2016

Functional Analysis - Metric and Normed spaces

A metric space is a set for which all the distance between all members of the set are defined. What does that mean? Let's take a set of values, the natural ones ℕ, and let's take a distance between elements d(x, y) = |x - y|, well, this is a metric space. Another metric space will be the same distance but another set of elements, or another distance for the same set of elements.
What does that mean at all? Most of the people think in a Euclidean space when taking about distances, but when you're in a non-Euclidean space, the distance between two points has a different calculation. For example, in a sphere, the (minimal) distance between two points is not the difference of its rectangular coordinates, the same occurs in a hyperbolic plane.
The important point in metric spaces is the definition of the metric, which in topology must follow some rules:
  1. d(x, y) ≥ 0: the distances will always be positive.
  2. d(x, y) = 0 ⇔ x = y: if a distance is zero, it means that both elements are equals.
  3. d(x, y) = d(y, x): the distance is the same no matter from which point we start.
  4. d(x, z) ≤ d(x, y) + d(y, z): this is the triangle inequality.
Let's now see the normed spaces. A normed space is applied to vector space instead of a set elements as the metric space. So, the metric spaces, consists in a vectors space plus a definition of a norm. What's a norm? Is the definition of length or size of a vector. The norm also follows a set of rules similar to the metric:
  1. ||x|| ≥ 0: the norm must always be positive.
  2. ||x|| = 0 ⇔ x = 0: if the norm is zero, then the vector is the zero vector.
  3. ||ax|| = |a| ||x||: let a be a scalar, the value of the norm of a vector multiplied by a scalar is equal to the norm of the vector multiplied by the modulo of the same scalar.
  4. ||x + y|| ≤ ||x|| + ||y||: this is the triangle inequality.
A normed space also defines a metric as d(x, y) = ||x - y|| which is called a metric induced by the norm.

Before continuing, let's try to see some examples of both spaces.
  • Real line ℝ: this is a one dimensional set (so, we can't define a normed space here). A common metric will be d(x, y) = |x - y|
  • Euclidean plane ℝ2: considering each element as a vector of two dimensions, we can define a metric as d(x, y) = ((x1-y1)2 + (x2-y2)2)1/2. Here we can also define a norm, as the elements of the set are vectors. The norm in this case will be ||x|| = (x12 + x22)1/2
  • Sequence space l∞: consider a set of elements where each element is composed by a sequence of bounded values, x = (x1, x2, x3, ...) or x= (xj) where |xj| ≤ cx (cx is a real number). A common metric for a space as describe here is d(x, y) = sup|xj - yj|, where sup means the supremum (least upper bound). And a norm as ||x|| = sup|xj|. This example shows how the concept of metric and norm are surprisingly general.

Let's now see some important concepts which play an important role with metric spaces.

  • Boundary: consider a bounded set of values, the union of all the values which are in the border of the set are considered the boundary. Consider a ball B(x0, r) with center at x0 and radius r, the boundary will be the set of values as d(x, x0) = r.
  • Open set: an open set consists of a bounded set where the boundary does not belong to the set.
  • Closed set: a closed set consists of a bounded set where the boundary also belong to the set.
  • Convergence: given a sequence (finite or infinite), it's said to converge if the values, as we progress into the sequence, tends to approach to a defined value. Given a sequence (xn), it's said that it converges to x if lim d(x, xn) = 0
  • Cauchy Sequence: given a sequence (xn) if there is an ε where d(xn, xm) < ε for n, m > N. What does that mean? For every element from N to infinity of the sequence, the distance between each element is less that a value ε, where ε is more than zero and less than infinity; that's there is no point in the infinity for the sequence from indexes higher than N.
  • Completeness: a metric space is said to be complete, if every Cauchy sequence of the space converges.
Now that we have all those concepts, we can define a Banach space. A Banach space complete normed space. The concept of complete space can also be applied to a normed space, as from a norm we can obtain a metric (the metric induced by norm). The Banach spaces are very used in functional analysis, as all the properties which it involves are of particular interest.

Friday, July 29, 2016

Classical Mechanics - Coriolis Acceleration

The Coriolis acceleration is a phenomena which appears when the reference system where the coordinates are taken is under a rotating acceleration. If the reference system isn't affected by a rotating acceleration, it's an inertial system, otherwise (in this case) it's a non-inertial system. Let's try to see this starting with the Newton's laws:

Newton's law

As I said, our reference system is under a rotating acceleration, so the velocity vector must be adapted (I will use the subscript L to name the "Laboratory system" which is the inertial system, and the subscript M to name the "Moving system" which is the non-inertial system):

Velocity vector on non-inertial system

As we see, the angular velocity of the moving system must be added to the linear velocity of the moving system. Let's derive the previous equation to obtain the acceleration. To do so, I will first introduce the operator D:




And now the derivative can be obtained easily:


Substituting the D operator:

Non-inertial system acceleration

The first term of the result is the linear acceleration. We can see easily that if it were no angular velocity, this will be the unique remaining term; which means that the acceleration has the same value independently of the reference system (in an inertial system). The second term is angular acceleration. The third is the Coriolis acceleration. And the last term is the centripetal acceleration.

Now we can rewrite the Newton's law for a non-inertial system just multiplying the previous equation by the mass:

Non-inertial system Newton's law

If we leave the main force over the particle in the left hand of the equation (and omitting the M subscript):

Equation of mechanics in rotating coordinates

Let's do an exercice to apply the obtained equation.

A river of width D flows on the northern hemisphere at the geographical latitude φ toward the north with a flow velocity v0. By which amount is the right bank higher than the left one?


First of all, let's examine each term of the equation for our case. The force vector will represent the gravitational force. The angular acceleration is zero as our angular velocity is the earth rotation which is constant. And the centripetal acceleration can be omitted, as the r vector is small compared with the radius of the earth (which is present the the gravitational force). This leads us to the simplified equation:

Coriolis effect on earth

Let's now define the force vector, the angular velocity and the linear velocity in the non-inertial system. I will consider the orthonormal basis u'x (from north to south coordinate), u'y (from west to east coordinate) and u'z (the up-down coordinate) as the basis on the non-inertial system.


Now we can rewrite the motion of the river equation:



Here, we can appreciate two forces, one downward the earth, and the other to the east. This make a vector which pulls the surface of the water in this direction. With the modulus of this force, and one of its component, we can obtain the angle of this force. This angle, with the width of the river gives us the difference of high between one side to the other of the river.


Thursday, July 28, 2016

Complex Analysis - Cauchy Goursat Theorem

When talking about integrals in the complex analysis, the Cauchy Integral Formula is very important. Rather than putting the formula here, and then explain it, I'll try to reach to the formula with the help of other theorems, which will give more explanation about its importance.

First of all, let's see an integral on the complex plane:

Complex Integral

This is an integral over a closed contour (counterclockwise). I assume that f is analytic at each point interior to and on C. If we define f(z) and z(t) as a real and imaginary parts:


we can now substitute it on the integral and separate the real part and the imaginary part:


We know that ux' is udx which is the real part of a function derived by the real component, and vy' is vdy which is the imaginary part of a function derived by the imaginary component, and so on. This remains as:


Let's now apply the Green's Theorem to the preceding integral:

Green's Theorem

From an integral over a closed contour, we reach to a double integral over the domain interior of the contour with partial derivatives. Applying this to our case:


As we have partial derivatives, we can apply the Cauchy-Riemann equations ux = vy and uy = -vx.

Cauchy-Goursat Theorem

As we see, the Cauchy-Goursat Theorem tells us that an integral over a positive closed contour of a function which is analytic on the contour and inside is zero.

Thursday, July 21, 2016

Classical Mechanics - The Tensor of Inertia

The tensor of inertia is a tensor very used to describe the rigid body motion. But what's a tensor? And what's the inertia? The inertia is basically the "force" a rigid body has to avoid accelerations. If a rigid body has a high inertia, it's difficult to move it (or to stop it if is in movement); and if a rigid body has a low inertia, you can easily move it or stop it. Basically, the inertia is represented as:

Inertia

It's the integral over the mass of the rigid body of the position squared. Analyzing the definition giving at the beginning, we can see that for two bodies of the same size, the heaviest have a higher inertia as it's more difficult to move it or stop it.

Ok, but what's the tensor of inertia? And what's a tensor? As said in our definition of inertia, this is related with the movement, as the angular velocity. Thus, the angular momentum also defines the structure of a body, the difficulty to move or stop it. All this three magnitudes are related as follows:

Relation of angular moment and inertia

The equation continues verify our definition of the inertia, as if a body with a high inertia with a high angular velocity has a higher force (angular momentum) than the same body with lower angular velocity.

And the definition of the tensor? Here we go. Let the body move in three dimensions, have an angular velocity on the three axis. This will lead to three angular momentum, one per axis. This means that the inertia multiplied by the angular velocity (which has three components) is equal to the angular momentum (which also has three components). So, what type of structure can allow this vector multiplication? A matrix. A tensor is a matrix, is a vector with an addition dimension. As the vector has an additional dimension over a scalar value, a matrix has an additional dimension over a vector. It's quite difficult to imagine a tensor in the real life but let's try it. When you throw an object in the air, rotating it only in one axis, you will see as it turns in other axis. You give to the object an angular velocity with only one component, but as the object turns in the three axis when it's in the air, this means that the inertia of the object absorbs the movement of a single dimension and reflect it in three dimensions. It's quite hard to imagine it, but try with your mobile phone, you'll see as it rotates in more than one axis when you throw it (and util it crashes on the ground).

Ok, let's now build a tensor of inertia. Here is how it looks like:

Tensor of Inertia

First of all, the tensor of inertia is symmetric, this means that Ixy = Iyx. But how to calculate all those values? With the formula given at the beginning, the formula of the inertia. We only have to substitute r by the adequate coordinate of the matrix. Let's see it:

Components of the tensor of inertia

But why are there negative signs? This comes from the definition of the angular momentum.

Angular moment

Well, I think it's time for an example to complete the definition. Let's try to obtain the tensor of inertia of a square covered with mass. The square has only two dimensions (let's suppose the square in the X-Y plane), this means that all the components of the tensor inertia which are multiplied by the Z component are zero. Let's determine the others


With those components, we've got the tensor of inertia: