Hilbert transform

### 21.4.6 Hilbert transform

Hilbert transform of a function f of a single real variable x is defined by:

H{f}(x)= |
1
π
| ∫ |
+∞
−∞
f(ξ)
x−ξ
| dξ, (1)

with the integral being taken as a Cauchy principal value. (Note that this implies H{const}=0.) The operator H is anti-involution, i.e. the inverse transform can be obtained by using the identity

H | ⎧ ⎨ ⎩ | H{f} | ⎫ ⎬ ⎭ | =−f. (2)

Other basic properties include, letting g=H{f}:

- linearity: H{α1f1(x)+α2f2(x)}= α1H{f1}(x)+α2H{f2}(x),
- time shifting: H{f(x−a)}=g(x−a),
- scaling: H{f(ax)}=sgn(a)g(ax),
- derivative: H{df/dx}=dg/dx,
- orthogonality: ∫−∞+∞ f(x)g(x)dx=0.

The hilbert command finds Hilbert transforms. See Section 14.2.2 and Section 21.4.7 for other uses of hilbert.

- to compute (1), hilbert takes one mandatory argument and one optional argument:
  - expr, an expression defining the function f.
  - Optionally, x, a (real) variable (by default, x=x).
- hilbert(expr ⟨,x ⟩) returns the Hilbert transform H{expr} of expr with respect to the variable x. If hilbert unable to find the transform, the inert variant Hilbert will appear in the result. If the transform does not exist, then undef is returned.

#### Examples

There is no dedicated Xcas command for the inverse Hilbert transform, so one has to use the identity (2). Indeed:

Hy:=hilbert(y(x),x)

Hx | ⎧ ⎨ ⎩ | y | ⎛ ⎝ | x | ⎞ ⎠ | ⎫ ⎬ ⎭

-hilbert(Hy,x)

y | ⎛ ⎝ | x | ⎞ ⎠

For example:

h:=hilbert(cos(a*x))

sign | ⎛ ⎝ | a | ⎞ ⎠ | sin | ⎛ ⎝ | a x | ⎞ ⎠

-hilbert(h)

cos | ⎛ ⎝ | a x | ⎞ ⎠

Other examples of Hilbert transform pairs follow.

Proper rational functions without poles can be transformed (since they have zero limit at infinity) as long as their denominator factorizations are simple enough. For example:

assume(a>0):; hilbert(a/(t^2+a^2),t)

t
a2+t2

rf:=sqrt(2)*(x-x^3+1)/(1+x^4)

√ |
2
|  | ⎛ ⎝ | −x3+x+1 | ⎞ ⎠
x4+1

hrf:=hilbert(rf,x)

x3+2 x2+x
x4+1

To demonstrate the orthogonality property, enter:

int(rf*hrf,x=-inf..inf)

0 |  |  |  |  |  |  |  |  |  |

To demonstrate the derivative invariance, enter:

ratnormal(hilbert(diff(rf))-diff(hrf))

0 |  |  |  |  |  |  |  |  |  |

Examples with transcedental functions:

purge(a):; hilbert(exp(-i*a*x),x)

i sign | ⎛ ⎝ | a | ⎞ ⎠ | e−i a x

hilbert(sinc(t),t)

−cost+1
t

hilbert(sin(t)/t^3,t)

Output (after expansion):

−π δ | ⎛ ⎝ | t,1 | ⎞ ⎠ | − |
cost
t3
| − |
1
2 t
| + |
1
t3

Characteristic function transform:

hilbert(boxcar(-2,1,x))

−ln | ⎪ ⎪ | −x+1 | ⎪ ⎪ | +ln | ⎪ ⎪ | −x−2 | ⎪ ⎪
π

All of the above transforms can be transformed back by applying hilbert again and changing the sign.