Smoothness vs. Singularity: Understanding the Transition in Mathematics & Physics
- Get link
- X
- Other Apps
From Smooth to Singular: When Functions Hit the Edge!
Ever thought about what happens when a perfectly smooth function suddenly hits a wall or takes a sharp jump? In the world of mathematics—especially in the theory of generalized functions and functionals—these "jumps" give rise to powerful phenomena called singular functionals.
They’re not just mathematical oddities. They show up everywhere—from shockwaves and point charges to PDEs, materials science, and numerical methods. Today, we’ll uncover what makes these singularities tick, with visuals, analogies, and a classic example: the Laplacian of \( 1/r\)
What Are Singular Functionals?
Imagine a perfectly still pond. Now toss a stone. Smooth ripples spread, but right where the stone hits—a sharp disturbance. That’s a discontinuity. And it’s exactly what singular functionals represent.
Take a function \( x_1,x_2 \) that is beautifully smooth inside a region ๐บ, but suddenly vanishes outside. It creates a sharp boundary: \[ f(x_1, x_2) =
\begin{cases}
\text{smooth}, & \text{if } (x_1, x_2) \in G \\
0, & \text{otherwise}
\end{cases}
\]
Visualization:
# Import necessary libraries
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon, FancyArrow
# Define function f(x1, x2) inside G
def f(x1, x2):
return np.exp(-((x1 - 1)**2 + (x2 - 1)**2)) # Example smooth function inside G
# Define grid using NumPy
x1 = np.linspace(0, 2, 40)
x2 = np.linspace(0, 2, 40)
X1, X2 = np.meshgrid(x1, x2)
F = np.where((X1 >= 0.5) & (X1 <= 1.5) & (X2 >= 0.5) & (X2 <= 1.5), f(X1, X2), 0)
# Create figure
fig, ax = plt.subplots(figsize=(6,6))
contour = ax.contour(X1, X2, F, levels=10, cmap='viridis') # Smooth contour lines
plt.colorbar(contour) # Add color bar for reference
# Define region G and boundary ฮ
G_x = [0.5, 1.5, 1.5, 0.5]
G_y = [0.5, 0.5, 1.5, 1.5]
# Shade region G
polygon = Polygon(list(zip(G_x, G_y)), closed=True, fill=True, alpha=0.3, color='gray')
ax.add_patch(polygon)
# Mark boundary ฮ
ax.plot(G_x + [G_x[0]], G_y + [G_y[0]], 'r-', linewidth=2, label="Boundary ฮ")
# Add arrow showing "crossing ฮ"
arrow = FancyArrow(1.2, 1.6, -0.3, -0.3, width=0.02, color='blue')
ax.add_patch(arrow)
ax.text(1.0, 1.7, "Crossing ฮ", color='blue', fontsize=12)
# Labels and display
ax.set_xlabel("$x_1$")
ax.set_ylabel("$x_2$")
ax.set_title("Contour Plot with Region G and Boundary ฮ")
ax.legend()
plt.show()
๐ก Try It Yourself! Now You can copy and paste directly into here Run SageMath Code Here
See signal discontinuity
Derivatives and Boundary Surprises
Let’s take the derivative \( \frac{\partial f}{\partial x_1} \) Normally, this is smooth. But here’s the twist—when we apply integration by parts, we get: \[\Bigg{\langle} \frac{\partial f}{\partial x_1}, \varphi \Bigg\rangle = - \iint_G f(x_1, x_2) \frac{\partial \varphi}{\partial x_1} \, dx_1 \, dx_2 \] After applying integration by parts, this becomes: \[ \iint_G \frac{\partial f}{\partial x_1} \varphi \, dx_1 \, dx_2 + \oint_\Gamma f(x_1, x_2) \varphi(x_1, x_2) n_1 \, d\gamma \]Here:
- The first term is the regular derivative in the interior.
- The second term is a singular functional supported on the boundary ฮ.
Analogy: Think of \( f(x_1, x_2)\) as the elevation of a landscape. The derivative is the slope. But if there’s a cliff at the boundary, the slope becomes infinite—that’s your singular functional!
Green’s Theorem and Generalized Functionals
Green’s theorem gives more insight:\[ \iint_G f \Delta \varphi \, dx = \iint_G \Delta f \varphi \, dx + \oint_\Gamma \left( f \frac{\partial \varphi}{\partial n} - \varphi \frac{\partial f}{\partial n} \right) \, d\gamma\] If ๐ is smooth in ๐บ and zero outside, then ฮ๐ becomes:
- A regular part: \( \Delta(f(x_1, x_2))\) inside G
- Two singular functionals:
- One from the jump in ๐
- One from the jump in \(\frac{\partial f}{\partial n}\)
Visualization:
# Import necessary libraries
from sage.all import *
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# Define function with a sharp cliff
def f(x1, x2):
if x1**2 + x2**2 < 1:
return exp(-x1**2 - x2**2)
else:
return 5 # Sharp rise near the boundary
# Define grid
x1_vals = np.linspace(-1.5, 1.5, 40)
x2_vals = np.linspace(-1.5, 1.5, 40)
X1, X2 = np.meshgrid(x1_vals, x2_vals)
# Compute function values
F = np.vectorize(f)(X1, X2)
# Compute gradient for slope arrows
grad_x1, grad_x2 = np.gradient(F)
grad_magnitude = np.sqrt(grad_x1**2 + grad_x2**2)
# Plot surface
fig = plt.figure(figsize=(8, 6))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X1, X2, F, cmap='viridis', alpha=0.8)
# Plot gradient vectors (slope arrows)
for i in range(0, len(x1_vals), 5):
for j in range(0, len(x2_vals), 5):
if grad_magnitude[i, j] > 3: # Show arrows only where the derivative is large
ax.quiver(X1[i, j], X2[i, j], F[i, j],
grad_x1[i, j], grad_x2[i, j], 0.5, color='red')
# Labels and display
ax.set_xlabel("$x_1$")
ax.set_ylabel("$x_2$")
ax.set_zlabel("$f(x_1, x_2)$")
ax.set_title("3D Surface Plot with Sharp Cliff and Gradient Vectors")
plt.show()
๐ก Try It Yourself! Now You can copy and paste directly into here Run SageMath Code Here
See how the derivative “blows up” at the boundary?
The Laplacian of \(\frac{1}{r}\):A Singular Example
Now for a classic: \( f(x)=\frac{1}{r} \) in 3D, where \[ r= \sqrt{{x_1}^2+{x_2}^2+{x_3}^2} \] Physically, this is the electric potential of a point charge or gravitational potential of a point mass.For \( r \neq 0\) , \(\frac{1}{r}\) is smooth. But at the origin, it blows up. What happens to its Laplacian? \[ \Delta \left(\frac{1}{r} \right) = -4\pi \delta(\mathbf{x}) \] Where \( \delta(\mathbf{x}) \) s the Dirac delta function—a singular functional that is zero everywhere except at the origin, where it’s "infinitely tall" and integrates to 1.
Exploring in SageMath (1D Analog)
We can’t plot \( \delta(x) \) directly, but we can approximate its behavior using symbolic tools.
# SageMath example: derivatives and delta approximation
x = var('x')
f = 1/x
# Derivatives
df = diff(f, x)
d2f = diff(df, x)
print("First derivative:", df)
print("Second derivative:", d2f)
# Plotting a delta-like Gaussian
plot(exp(-x^2 / (0.01^2)) / (0.01 * sqrt(pi)), (x, -1, 1),
title="Approximation of Dirac Delta Function")
๐ก Try It Yourself! Now You can copy and paste directly into here Run SageMath Code Here
What This Shows:
- The second derivative of 1/x (away from 0) reveals behavior similar to the singularity at the origin.
- A narrow Gaussian can visually approximate \( \delta(x) \)
Key points
- Singular functionals arise from discontinuities or sharp features in functions.
- Integration by parts exposes boundary terms that capture this singular behavior.
- The Laplacian of 1/r introduces the Dirac delta function, a singularity model used in physics and engineering.
- These ideas are crucial in solving PDEs, modeling physical sources, and building numerical algorithms.
Your Turn
Why is the Dirac delta function often called a “mathematical point charge”?
Now that you’ve seen how \( \Delta \frac{1}{r}=-4\pi\delta(x)\) , does that analogy make sense to you?
Share your thoughts in the comments! What other physical systems might involve singularities like this? Can you think of a case in engineering or nature where something changes "all at once"?
Real-World Systems with Singularities
Singular functionals aren't just theoretical—they underpin many real systems where abrupt changes or concentrations happen:- Electrostatics: The Coulomb potential 1/x models point charges, leading to singular charge distributions.
- Fluid Dynamics: Shock waves in supersonic flows create instantaneous discontinuities in pressure and velocity.
- Material Science: Cracks in solids concentrate stress at a single point before sudden failure—an ideal model for singular behavior.
- General Relativity: Near black holes, spacetime curvature becomes infinite—forming gravitational singularities.
- Quantum Mechanics: Wavefunction collapse on measurement is a discontinuous, singular transition in a system’s state.
- Engineering: Sudden phase transitions (like supercooling or nucleation in materials) exhibit sharp, singular behavior at critical points.
These examples show that singularities are not mathematical glitches—they're tools to model and understand the world when things change sharply, instantly, or irreversibly.
Next Time: Inside the Dirac Delta
Stay tuned! In our next post, we’ll explore the Dirac delta function in detail:
- Its formal definition and properties
- How it acts on test functions
- Why it's so central to physics, signals, and PDEs
- Get link
- X
- Other Apps
Comments
Post a Comment
If you have any queries, do not hesitate to reach out.
Unsure about something? Ask away—I’m here for you!