Sunday, April 28, 2024

Weak formulation of boundary value PDE and its meaning

Energy functional
An energy functional is a mapping from a function space (often a Sobolev space) to the real numbers, which assigns a "total energy" value to each function in the space. The energy assigned typically depends on the function and its derivatives, reflecting physical or geometrical properties like potential energy, kinetic energy, or strain energy in various physical contexts.

\begin{equation}
  J(u) = \frac{1}{2} \int_{-1}^1 |u'(x)|^2 dx - \int_{-1}^1f(x)u(x)dx
\end{equation}
over \(\mathring{H^1}(-1,1)\) where this Sobolev space is for functions that go to $0$ at boundary points for weak formulation.

Find \(u \in \mathring{H^1}(-1,1)\)such that
\begin{equation}
   \int_{-1}^1u'(x)v'(x) =  \int_{-1}^1 f(x)v(x), v(x) \in \mathring{H^1}(-1,1)
\end{equation}

Weak Formulation of a Boundary Value Problem

We consider a boundary value problem where we seek to find a function \( u \) that satisfies the differential equation
\[
-u''(x) = f(x) \quad \text{on} \quad (-1, 1),
\]
with boundary conditions
\[
u(-1) = u(1) = 0.
\]
Multiplying by a Test Function
To derive the weak form, multiply the differential equation by a test function \( v(x) \), which is smooth and vanishes at the boundaries \( (-1, 1) \), hence \( v(-1) = v(1) = 0 \). This test function \( v(x) \) belongs to the space \( \mathring{H}^1(-1, 1) \), a subspace of \( H^1(-1, 1) \). We obtain:
\[
-u''(x)v(x) = f(x)v(x).
\]
Integration Over the Domain
Integrate both sides over the interval \( (-1, 1) \):
\[
-\int_{-1}^1 u''(x) v(x) \, dx = \int_{-1}^1 f(x) v(x) \, dx.
\]
Integration by Parts
Use integration by parts on the left-hand side:
\begin{align*}
-\int_{-1}^1 u''(x) v(x) \, dx &= \left[ -u'(x)v(x) \right]_{-1}^1 + \int_{-1}^1 u'(x) v'(x) \, dx \\
&= 0 + \int_{-1}^1 u'(x) v'(x) \, dx,
\end{align*}
                                                                                                        where the boundary terms vanish because \( v(-1) = v(1) = 0 \).
Weak Formulation
Thus, we have the weak formulation of the boundary value problem:
\[
\int_{-1}^1 u'(x) v'((x) \, dx = \int_{-1}^1 f(x) v(x) \, dx.
\]
This equation must hold for all test functions \( v(x) \in \mathring{H}^1(-1,1) \).
Meaning of the Weak Formulation
In this form, the differential equation \( -u'' = f \) is translated into an integral equation that does not require the function \( u \) to be twice differentiable. Instead, \( u \) needs only to have its first derivative in \( L^2(-1, 1) \). This allows the inclusion of functions with less smoothness, accommodating more general solutions such as those exhibiting weak derivatives.

Saturday, April 27, 2024

Simplest two-point boundary value problem

  

 Previous blog discussed Sobolev space definition and example

Here we focus on Simplest two-point boundary value problem.

Simplest two-point boundary value problem
\begin{equation}
  -u^{''}(x) = f(x), -1 < x < 1, u(-1)=u(1)=0
\end{equation}
Energy functional
An energy functional is a mapping from a function space (often a Sobolev space) to the real numbers, which assigns a "total energy" value to each function in the space. The energy assigned typically depends on the function and its derivatives, reflecting physical or geometrical properties like potential energy, kinetic energy, or strain energy in various physical contexts.

\begin{equation}
  J(u) = \frac{1}{2} \int_{-1}^1 |u'(x)|^2 dx - \int_{-1}^1f(x)u(x)dx
\end{equation}
over \(\mathring{H^1}(-1,1)\) where this Sobolev space is for functions that go to $0$ at boundary points for weak formulation.

Find \(u \in \mathring{H^1}(-1,1)\)such that
\begin{equation}
   \int_{-1}^1u'(x)v'(x) =  \int_{-1}^1 f(x)v(x), v(x) \in \mathring{H^1}(-1,1)
\end{equation}

 Example

Imagine a fluid flowing between two long, parallel plates separated by a distance, typically normalized for simplicity. The flow is assumed to be steady (unchanging with time) and laminar (smooth with no turbulence).
The fluid is driven by a pressure gradient or external force such as gravity.
 
 Navier-Stokes Equations: For an incompressible, steady flow with no change in flow direction, the Navier-Stokes equations can simplify significantly. For a flow driven by a pressure gradient in the x-direction, or an external force such as gravity, and assuming no dependence on the y coordinate (2D flow), the equation simplifies to:
 \begin{equation}
   -\mu \frac{d^2u}{dx^2} = \frac{dp}{dx}+f
 \end{equation}
 where \(\mu)\) is viscosity of the fluid, \(\frac{dp}{dx}\) pressure gradient, \(f\) additional force such as gravity.

 Assuming constant pressure gradient and assuming \(f\) is constant, we can rewrite above equation as
 \begin{equation}
   -u^{''}(x) = g(x)
 \end{equation}
 where \(g(x) = \frac{1}{\mu}( \frac{dp}{dx}+f) \).
 Assume walls are at $x=-1,x=1$ and the flow is zero here, that is $u(-1)=u(0)=0$

 

Friday, April 26, 2024

Sobolev Space definition with example

 Sobolev spaces are essential in functional analysis and partial differential equations.

 The space \( H^1(-1,1) \) is a specific Sobolev space defined on the interval \((-1, 1)\) on the real line.

Definition of \( H^1(-1,1) \)

The Sobolev space \( H^1(-1,1) \) includes functions \( u \) that satisfy both the function itself and its first derivative being in \( L^2(-1,1) \). Specifically, the space is defined as follows:


  •    A function \( u \) belongs to \( L^2(-1,1) \) if:

  \[
  \int_{-1}^1 |u(x)|^2 \, dx < \infty
  \]

  •   The first weak derivative \( u' \) must also be in \( L^2(-1,1) \), which means:

  \[
  \int_{-1}^1 |u'(x)|^2 \, dx < \infty
  \]


Weak derivatives are used to accommodate functions that might not be differentiable in the classical sense everywhere on the interval, including functions that are continuous and differentiable almost everywhere but may have points of derivative discontinuity.


Norm in \( H^1(-1,1) \)}

The norm in the Sobolev space \( H^1(-1,1) \) is defined to incorporate both the function and its derivative, given by:
\[
\|u\|_{H^1} = \left( \int_{-1}^1 |u(x)|^2 + |u'(x)|^2 \, dx \right)^{1/2}
\]

Importance and Applications

Sobolev spaces such as \( H^1(-1,1) \) are crucial in the study of partial differential equations (PDEs), as they frequently arise as the solution spaces for various PDEs. Understanding Sobolev spaces is foundational for advanced studies in fields such as mathematical physics, engineering, and applied mathematics.


Example Function for \( H^1(-1,1) \)

Working with a concrete example clarifies above definitions.

Consider the function \( u(x) = x^2 \) as an example for a function in the Sobolev space \( H^1(-1,1) \). We will verify that both \( u \) and its first derivative \( u' \) belong to \( L^2(-1,1) \).

\Verification of \( u \in L^2(-1,1) \)
First, we check if the function \( u(x) = x^2 \) is square integrable over \((-1,1)\):

\[
\int_{-1}^1 |u(x)|^2 \, dx = \int_{-1}^1 x^4 \, dx
\]

Calculate the integral:

\[
\int_{-1}^1 x^4 \, dx = \left[ \frac{x^5}{5} \right]_{-1}^1 = \frac{1}{5} - \left(-\frac{1}{5}\right) = \frac{2}{5}
\]

This result confirms that \( u(x) = x^2 \) is in \( L^2(-1,1) \) as the integral is finite (\( < \infty \)).

Verification of \( u' \in L^2(-1,1) \)
Next, compute the derivative of \( u(x) \) and check its square integrability:

\[ u'(x) = 2x \]

Check if \( u'(x) = 2x \) is square integrable:

\[
\int_{-1}^1 |u'(x)|^2 \, dx = \int_{-1}^1 (2x)^2 \, dx = 4 \int_{-1}^1 x^2 \, dx
\]

Computing the integral:

\[
\int_{-1}^1 x^2 \, dx = \left[ \frac{x^3}{3} \right]_{-1}^1 = \frac{1}{3} - \left(-\frac{1}{3}\right) = \frac{2}{3}
\]

Thus:

\[
4 \int_{-1}^1 x^2 \, dx = 4 \cdot \frac{2}{3} = \frac{8}{3}
\]

Since this integral is also finite, \( u'(x) = 2x \) is in \( L^2(-1,1) \).

Conclusion
The function \( u(x) = x^2 \) and its derivative \( u'(x) = 2x \) are both in \( L^2(-1,1) \), confirming that \( u(x) = x^2 \) is a valid example of a function in the Sobolev space \( H^1(-1,1) \).


Sunday, March 31, 2024

Field Extension - Simple example

 Real numbers for a Field, so do complex numbers and rationals. What is deeply interesting is that we can construct several other fields based on an existing field. These are called Field extensions.

Standard example of such Field extension goes like this. Let $Q$ be a rational field. Consider polynomial $X^2 -2 \in Q$. Clearly roots of the this polynomial $X=\sqrt{2}$ and $X=-\sqrt{2}$ don't belong to $Q$ as there are irrationals.

One nice things we can do is to extend $Q$ by adding these roots to form a new field. Let's call it $Q(\sqrt{2})$. Now $Q(\sqrt{2})$ consists of roots of polynomials in $Q[X]$ whose roots involve $\sqrt{2}$. 

For example, a polynomial $

Elements: We can add any two elements and resulting element is still in

This setup allows for the exploration of linear algebra concepts within field extensions, including the basis, dimension, and linear transformations, offering a rich framework for understanding more complex algebraic structures.

Thursday, March 31, 2022

References for Undecidability

 References:

The blog posts Diophantine set, Listable sets, Halting problem, DPRM Theorem are based on superb article by B Poonan. - Undecidability in Number Theory.
As the article points out, the undecidability problem was studied not only for Integers, but also for Rationals, Rings etc.,

One of the questions, Poonan posed earlier in the article - does $x^3+y^3+z^3=33$ has integer solutions? At the time of writing article answer to this question was unknown. The article prompted search for solution to above equation. In fact an integer solution was now found.

Wednesday, March 30, 2022

DPRM theorem & Hilberts 10th problem

DPRM theorem(Davis, Putnam, Robinson, Matiyasevich):

A subset of $\mathcal{Z}$ is listable iff it is diophantine.

Listable means that there is an algorithm that prints the subset. Diophantine set consists of integers for which diophantine equations has solutions. 

Undeciability of the halting problem yields a listable set that is not computable. By DPRM theorem, listable implies diophantine. Hence, diophantine set is not computable.

By definition of diophantine set, we have a polynomial $p(t,\overrightarrow{x})$ such that there is no algorithm for deciding for which values of $a \in \mathcal{Z}$ the equation $p(a,\overrightarrow{x})$ has a solution.

Thus, there is no algorithm for deciding the existence of integer solutions to all polynomial equations.

Tuesday, March 29, 2022

Computable sets and Halting problem

 A set A Z is computable if there is an algorithm for deciding membership in A.

Deciding membership in $A$ means algorithm should respond back Yes/No for the given input element.

First thing to notice is that any computable set is listable. Listable set implies there is an algorithm that prints $L \in \mathcal{Z}$. Then, checking if a given input is there in the $L$ is simple. 

However, not very clear if every listable set is computable.

Assume for a moment, that the algorithm is very complicated and takes long time to output list elements. For example, say it takes a day to print each element of the list. Then, for a given integer say $42$, if the algorithm didn't print that yet, it is impossible to say if it will print this at all.

Once we agree that every listable set is not computable, next step is to see if we can identify listable sets that are not computable.

This leads to Halting problem:

Halting problem asks a simple question. Given a program $p$ and an input $x$, the question Halting problem seeks is can $p$ terminate or will it continue for ever?

Say our program $p$ is

while (true) {

    do something;

}

This is an infinite loop. Our Halting algorithm (if we can build one) returns NO to the question if $p$ terminates.

Similarly if $p$ is the following expression in Mathematica,

FindInstance[k == x^3 + y^3, {x, y}, PositiveIntegers, 2]

Our Halting algorithm returns YES to the question if $p$ terminates for $k=1729$.

Theorem: The halting problem is undecidable.

Proof is clever. Since, halting problem takes as input a program $p$ and input $x$, say we do have a program $A$ which returns true if $p$ halts and false otherwise.

Since, the universe of inputs is any possible program one can conceive, I can write a devilishly cunning program ($DCP$) that runs forever while indicating to $A$ that it will terminate and vice-versa.

Then, $DCP($A$) returns true while running forever and false while terminating which is a contradiction. This proves that the halting problem is undecidable.

Corollary identifies a set $A$ consisting of $2^p3^x$ such that program $p$ halts on input $x$. By above theorem, $A$ is not computable. However $A$ is listable.

The following algorithm shows how to make $A$ listable.

For input $N=0,1,2...$ and during iteration $N$, 

foreach $p$

    run $p$ on input $x \leq N$ in $N$ steps

    print $2^p3^x$ if program terminates within these $N$ steps.

 


 

Weak formulation of boundary value PDE and its meaning

Energy functional An energy functional is a mapping from a function space (often a Sobolev space) to the real numbers, which assigns a "...