Simplification of expressions involving Dirac delta distribution

### 10.1.6 Simplification of expressions involving Dirac delta distribution

The simplifyDirac command simplifies expressions involving Dirac delta distribution (see Section 7.3.10).

- simplifyDirac takes one mandatory argument and a sequence of optional arguments:
  - expr, an expression.
  - Optionally, x, a variable with respect to which the simplification is done (by default, x=x).
- simplifyDirac(expr ⟨,x ⟩) returns a simplified form of expr as a linear combination of Dirac delta and its derivatives, with coefficients being simplified by using simplify.

#### Examples

Since δ(x)=−x δ′(x):

simplifyDirac(Dirac(x,1)*x)

−δ | ⎛ ⎝ | x | ⎞ ⎠

(x−2)3δ(3)(1−x/2) simplifies to:

simplifyDirac((x-2)^3*Dirac(1-x/2,3))

12 δ | ⎛ ⎝ | x−2 | ⎞ ⎠

By using the identity xnδ(n)(x)=(−1)nn! δ(x), x δ(x)=0 and Laurent series expansions, expressions of the form f(x) δ(n)(x−a) can be written as linear combination of delta function and its derivatives with constant coefficients. For example, with f(x)=tan(x−π/2), a=0 and n=2:

simplifyDirac(sin(1-cos(2x))*Dirac(x,2))

4δ | ⎛ ⎝ | x | ⎞ ⎠

simplifyDirac(tan(x-pi/2)*Dirac(x,2))

− |
2 δ | ⎛ ⎝ | x,1 | ⎞ ⎠
3
| + |
δ | ⎛ ⎝ | x,3 | ⎞ ⎠
3

If f(x)=p(x)/q(x) is rational with p(x)=(x−x1)(x−x2)⋯(x−xn), xi≠ xj for i≠ j, and q(x)≠ 0 ∀ x∈ℝ, then δ(f(x)) expands to ∑k=1nδ(x−xk)/f′(xk). For example:

simplifyDirac(Dirac(x^2-x-6))

δ | ⎛ ⎝ | x+2 | ⎞ ⎠
5
| + |
δ | ⎛ ⎝ | x−3 | ⎞ ⎠
5