-----maxima-bounces at math.utexas.edu wrote: -----
>I'd like to use Maxima to calculate the Hilbert transform of some
>functions. I looked in the manual maxima-5_15.pdf but the Hilbert
>transform
>is not listed. Do I have to define the transform myself (any hints?) or is
>there a simpler method.
Yes, you must define it yourself. You can try something like:
hilbert_transform(f) := block([t : ?gensym(), x : ?gensym(), ht],
ht : ldefint((f(x - t) - f(x + t))/(%pi * t),t,0,inf),
buildq([x,ht], lambda([x], ht)));
For user documentation for ldefint, enter ? ldefint). The input and
output to hilbert_transform is a lambda form. You might like to change
that to expression / variable name form. (We debate such things once
or so per year...)
Example:
(%i2) hilbert_transform(lambda([s],1/(1+s^2)));
Is g33341 positive, negative, or zero? pos;
(%o2) lambda([g33341],g33341/(g33341^2+1))
The question "Is g33341 positive, .." is obnoxious---a user has no way
of knowing how to answer. We can transform the transform---it works!
(%i3) hilbert_transform(%);
Is g33739 positive, negative, or zero? pos;
(%o3) lambda([g33739],-1/(g33739^2+1))
The function ldefint isn't all that smart :(
(%i4) hilbert_transform('sin);
(%o4) < huge noun form>
A smart table lookup method could be much better than ldefint ...
Barton