HU(omega) =
Why Does ifourier Not Return Equivalent Results for Equivalent Transforms?
Show older comments
Consider two expressions of a Fourier transform
syms t omega real
HU(omega) = -(exp(-omega*1i)*(exp(omega*1i) - 1)*(omega + 1i))/(omega*(omega^2 + 1))
Y(omega) = (exp(-omega*1i)*1i - 1i)/(omega*(1 + omega*1i))
The transforms are equivalent
simplify(HU(omega)-Y(omega))
so I would expect the inverse transforms to be equivalent.
Inverse transform of Y(omega)
y(t) = ifourier(Y(omega),omega,t)
Inverse transform of HU(omega)
hu(t) = ifourier(HU(omega),omega,t)
hu(t) looks complicated, but the primary concern is that Dirac delta in the first term in the numerator.
Simplify both expressions
s = @(z) simplify(rewrite(simplify(z),'heaviside'));
y(t) = s(y(t))
hu(t) = s(hu(t))
Sure enough, both time domain signals are the same with the exception that hu(t) includes that Dirac delta term.
Show that they are the same, except for the Dirac delta, by subtracting and using fplot that ignores Dirac delta terms:
figure
fplot(y(t)-hu(t),[-10,10]),ylim([-1e-16,1e-16])
Is this a bug, or is there a problem in the code, or am I misunderstanding what the results should be?
4 Comments
Taking a round trip fourier(ifourier(X)) is apparently not producing the same answer for hu -- they differ by a constant of 1
syms t omega real
HU(omega) = -(exp(-omega*1i)*(exp(omega*1i) - 1)*(omega + 1i))/(omega*(omega^2 + 1))
Y(omega) = (exp(-omega*1i)*1i - 1i)/(omega*(1 + omega*1i))
figure(1)
y(t) = ifourier(Y(omega),omega,t)
hu(t) = ifourier(HU(omega),omega,t)
yy = rewrite(simplify(y), 'heaviside')
symvar(yy)
YY = fourier(yy)
YY = subs(YY, symvar(YY), omega)
YY - Y
simplify(ans)
simplify(expand(ans))
C1 = collect(ans, omega)
symvar(C1)
fplot(C1, [0 5])
figure(2)
huhu = rewrite(simplify(hu), 'heaviside')
HUHU = fourier(huhu)
HUHU = subs(HUHU, symvar(HUHU), omega)
HUHU - HU
simplify(ans)
simplify(expand(ans))
C2 = collect(ans, omega)
symvar(C2)
fplot(C2, [0 5])
David Goodmanson
on 23 Feb 2026 at 22:39
Edited: David Goodmanson
on 23 Feb 2026 at 23:05
Hi Paul,
That would appear to be the case, especially since (putting things slightly differently and ignoring multiplicative constants),
lim{w-->inf} hu(w)
= lim{w-->inf} Ftrans(hu(t)) % supposed hu(t)
= lim{w-->inf} Ftrans(delta(t) + sum of heavisides)
= lim{w-->inf} (1 + O(1/w)) = 1 *
whereas
hu(w) = y(w) is O(1/w^2) as w-->inf
* Using O(1/w) for one heaviside and still O(1/w) for a sum of heavisides is a simple upper bound to illustrate the point. For a particular sum of heavisides the actual behavior could fall off faster, as it does here.
Paul
on 23 Feb 2026 at 22:55
Answers (1)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



















