Axel Vogt

5936 Reputation

20 Badges

20 years, 247 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are questions asked by Axel Vogt

With Maple 12 the compiler accepts complex complex floats.
However there is some limitation in using compiled results:

  # a simple function to be called by another
  foo1:=proc(z::complex[8])::complex[8]; return z*I end proc;
  foo:=proc(z::complex[8])::complex[8]; return foo1(z); end proc;

Now compile:

  cp1:=Compiler:-Compile(foo1);
  cp:=Compiler:-Compile(foo);

The first call works, the second gives an error:

    Error, (in printtab[CodeGeneration:-Names:-FunctionCall])

There is a very nice sheet by Sergej Moiseev Orthogonal Functions, Orthogonal Polynomials, and Orthogonal Wavelets series expansions of function at the Application Center, www.maplesoft.com/applications/app_center_view.aspx.

Int(exp(-1/100+1/1000*I*u)/(4*u^2+1)*exp(1/2*I*u),u = 0 .. 1)

The integrand has positive real and imaginary parts over the
range (just use plot it) and numerical evaluation gives it as
0.53434219089626 + 0.98249392969436e-1 * I (using Digits:=14).

A symbolic integration and using evalf gives the same.

Now writes this as

  tstData:=[a=0, b=1, m=1/2, b0 = -1/100, b1 = 1/1000];

  J:=Int(exp(b0+b1*u*I)/(4*u^2+1)*exp(u*m*I),u = a .. b);
  eval(J,tstData...
I want a continous anti-derivate (cos(2*u*m)-alpha*u*sin(2*u*m))/(4*u^2+1)
w.r.t. u, for alpha and m Reals, 0 < u.

What I get with Maple in terms of Ci and Si jumps in m=0 (and for m=0 it
is not defined, due to Ci).

The best I got was

  Si(-conjugate(v))-Si(v); eval(%, v=m*(2*u+I));
  psi:= unapply(%, u,m);
  chi:= (u,m) -> piecewise(0 <= m, -Ci((2*u-I)*m)+Ci(m*(2*u+I)), 

I wanted to use (one of the variouos) cosine transforms DCT, but only find FFT in Maple12.

Googling did not give me more (except there seem to recipes to reduce my theme in some
brute (?) ways to a FFT problem).

Is there any Maple solution around (even if I can use Clenshaw's algorithm having only a
moderate size - but want to see some generalisation ...)?

3 4 5 6 7 8 9 Page 5 of 12