Infinite Solutions in Math: Understanding When Equations Have Infinite or No Solutions
- Get link
- X
- Other Apps
Derivatives of the Dirac Delta Function: What Happens When an "Infinitely Sharp" Impulse Gets Differentiated?
Introduction: The Pulse, the Jolt, and the Mystery of Its Derivative
Ever wondered how engineers model a lightning strike, a sudden tap on a touchscreen, or the precise instant a camera shutter clicks? The Dirac delta function is the mathematical tool used to describe such instantaneous impulses.
But what happens when you differentiate something that's already infinitely sharp? Does it vanish, or transform into something even stranger?
In distribution theory, the derivative of the delta function plays a crucial role. In this post, we will:
- Understand how the derivative of the delta function acts on smooth test functions.
- Visualize its structure using SageMath.
- Verify distributional identities numerically.
The "Action" of the Delta Function's Derivative
The Dirac delta is not a conventional function — it's a distribution that acts on test functions through integration:\[ \langle \delta(x), \varphi(x) \rangle = \int_{-\infty}^{\infty} \delta(x) \varphi(x) ,dx = \varphi(0) \]Now let’s examine its first derivative: \[ \langle \delta'(x - h), \varphi(x) \rangle = \int_{-\infty}^{\infty} \delta'(x - h) \varphi(x) ,dx \] Using integration by parts (and assuming \( \varphi(x) \) is smooth and vanishes at the boundaries):\[ \int_{-\infty}^{\infty} \delta'(x - h) \varphi(x) ,dx =\int_{-\infty}^{\infty} \delta(x - h) \varphi'(x) ,dx = -\varphi'(h) \]
Interpretation
- \( \delta'(x) \) does not sample the value of \( \varphi(x) \) at \( x=h \).
- Instead, it samples the slope at \( x=h \) and flips its sign!
For higher-order derivatives: \[ \langle \delta^{(k)}(x - h), \varphi(x) \rangle = (-1)^k \varphi^{(k)} (h) \] This shows that the \( k^{\text{th}} \) derivative of the delta function extracts the \( k^{\text{th}} \) derivative of \( \varphi(x) \) at the singular point x=h .
Approximating \( \delta(x) \) and \( \delta'(x) \) in SageMath
Since \( \delta(x) \) isn’t a standard function, we approximate it using a narrow Gaussian: \[ \delta_{\epsilon}(x)=\frac{1}{\sqrt{\pi {\epsilon}^{2}}}.e^{-\frac{x^{2}}{{\epsilon}^{2}}} \] As \(\epsilon \to 0\), this approximates a sharp impulse at \(x=0\).
SageMath Code for Visualization:
from sage.all import var, exp, sqrt, pi, diff, plot, show
# Define variables with proper domain
x, epsilon = var('x'), var('epsilon', domain='positive')
# Gaussian delta approximation
delta_approx = 1 / sqrt(pi * epsilon^2) * exp(-x^2 / epsilon^2)
# First derivative
delta_derivative = diff(delta_approx, x)
# Show a simplified version of the derivative
show(delta_derivative.simplify_full())
# Define epsilon value for plots
epsilon_val = 0.01
# Plot approximation and its derivative
p1 = plot(delta_approx.subs(epsilon=epsilon_val), (x, -3, 3), color='blue', legend_label="Approx ฮด(x)")
p2 = plot(delta_derivative.subs(epsilon=epsilon_val), (x, -3, 3), color='red', linestyle="--", legend_label="Approx ฮด'(x)")
show(p1 + p2)
๐ก Try It Yourself! Now You can copy and paste directly into here Run SageMath Code Here
Behaviors of ( \delta'(x) ):
- Positive and Negative Peaks – The function exhibits sharp opposing lobes centered around \( x = 0 \), resembling the shape of a wavelet.
- Sharper and Taller Peaks as \( \epsilon \to 0 \) – As the regularization parameter shrinks, the function concentrates more energy into an infinitely thin impulse.
- Acts Like a Slope Detector – Instead of extracting the value of \( \varphi(x) \), it focuses on how fast \( \varphi(x) \) changes at the singular point.
This characteristic makes \( \delta'(x) \) fundamental in signal processing, physics, and differential equations, where sharp transitions need to be analyzed.
Numerical Verification: Testing the Distributional Identity
We verify:\[\int_{-\infty}^{\infty} \delta'(x) \varphi(x) ,dx=-\varphi'(0) \]Let’s choose \(\varphi(x)= e^{-x^2}\).Then : \[\varphi'(x) =-2xe^{-x^2} , \varphi'(0) =0 \]
from sage.all import numerical_integral, var, exp, sqrt, pi, diff
# Define variables
x, epsilon = var('x'), var('epsilon')
# Define test function
varphi = exp(-x^2)
# Define Gaussian delta approximation
delta_approx = 1 / sqrt(pi * epsilon^2) * exp(-x^2 / epsilon^2)
# Compute its first derivative
delta_derivative_approx = diff(delta_approx, x)
# Substitute `epsilon = 0.001` before integration
epsilon_value = 0.001
integral_result = numerical_integral(
delta_derivative_approx.subs(epsilon=epsilon_value) * varphi, -5, 5
)
# Print results
print(f"Numerical integral result: {integral_result[0]:.6f}")
print("Expected theoretical value: 0")
Perfect! Your numerical computation confirms the expected theoretical value—the integral of \( \delta'(x) \) times \( \varphi(x) \) evaluates to zero, aligning with the distributional identity: \[ \int_{-\infty}^{\infty} \delta'(x) \varphi(x) ,dx = - \varphi'(0) = 0 \] Since \( \varphi(x) = e^{-x^2} \) is symmetric around \( x = 0 \), its derivative at \( x = 0 \) is zero, making the integral vanish.
Testing with a Non-Symmetric Function
Since \( \varphi(x) = e^{-x^2} \) was symmetric, its derivative at \( x = 0 \) was zero. But what if we use an asymmetric function like: \[ \varphi(x) = x e^{-x^2} \] This function is not symmetric and has a nonzero derivative at \( x = 0 \), which should result in a nonzero integral for \( \delta'(x) \). Here’s the SageMath implementation:
from sage.all import numerical_integral, var, exp, sqrt, pi, diff
# Define variables
x, epsilon = var('x'), var('epsilon')
# Define asymmetric test function
varphi = x * exp(-x^2)
# Define Gaussian delta approximation
delta_approx = 1 / sqrt(pi * epsilon^2) * exp(-x^2 / epsilon^2)
# Compute its first derivative
delta_derivative_approx = diff(delta_approx, x)
# Substitute `epsilon = 0.001` before integration
epsilon_value = 0.001
integral_result = numerical_integral(
delta_derivative_approx.subs(epsilon=epsilon_value) * varphi, -5, 5
)
# Print results
print(f"Numerical integral result: {integral_result[0]:.6f}")
print("Expected theoretical value: {-varphi'(0)}")
This confirms that the distributional identity holds numerically, as the integral evaluates very close to \( -\varphi'(0) \)
Interactive Playground: Exploring \( \delta(x) \) Behavior
Let’s visualize how ( \delta(x) ) and ( \delta'(x) ) change as ( \epsilon ) varies:
from sage.all import var, exp, sqrt, pi, diff, numerical_integral, plot, show
# Define variables
x, epsilon = var('x'), var('epsilon')
# Define test function
varphi = x * exp(-x^2)
# Define Gaussian delta approximation
delta_approx = 1 / sqrt(pi * epsilon^2) * exp(-x^2 / epsilon^2)
# Compute its first derivative
delta_derivative_approx = diff(delta_approx, x)
# Interactive plot to vary epsilon
@interact
def visualize_delta(epsilon=(0.001, 0.1, 0.001)):
p1 = plot(delta_approx.subs(epsilon=epsilon), (x, -3, 3), color='blue', legend_label=f"Approx ฮด(x), ฮต={epsilon}")
p2 = plot(delta_derivative_approx.subs(epsilon=epsilon), (x, -3, 3), color='red', linestyle="--", legend_label=f"Approx ฮด'(x), ฮต={epsilon}")
show(p1 + p2)
๐ก Try It Yourself! Now You can copy and paste directly into here Run SageMath Code Here
Conclusion: A Deep and Powerful Tool
The Dirac delta function and its derivatives are more than mathematical curiosities—they are essential tools in:
- Physics: Modeling forces, charges, and quantum states.
- Signal Processing: Filters, impulse responses, and Fourier analysis.
- Control Theory: Impulsive systems and discontinuities.
With SageMath, we can simulate, visualize, and numerically validate the behavior of delta functions—bridging abstract mathematical theory with computational experiments.
- 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!