Axel Vogt

5936 Reputation

20 Badges

20 years, 257 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are replies submitted by Axel Vogt

Just a sketch (had an ugly working day), may be helps (as I do not
quite understand where your problems are ... just have a break?).

  h:=hypergeom([-1/2*p, 1/2*p+1/2],[1/2],x^2);
  convert(%,FormalPowerSeries,x=0,dummy=k); convert(%,GAMMA);
  op(1,%); 
  subs(x=1,%); # <-----------
  a:=unapply(%,k);

                                                           k
                    GAMMA(- p/2 + k) GAMMA(p/2 + 1/2 + k) 4
        a := k -> --------------------------------------------
                  GAMMA(- p/2) GAMMA(p/2 + 1/2) GAMMA(2 k + 1)


Then (here) your have h = Sum(a(k)*x^k, k=0 ... infinity), *as far as
that converges* (which is true for |x| < 1 at least, see below).

  a(k)/a(k-1); simplify(%): [numer(%),denom(%)]: collect(%,k): %[1]/%[2];

                       2
                    4 k  - 6 k + (-2 - p) (-1 + p)
                    ------------------------------
                                 2
                              4 k  - 2 k

Note: if h *is* a polynomial, then you can not write down the quotient
(division by 0) and that will be the case if p = multiple of 2 (or so),
this is is a general assumption in the criterion ...

Otherwise you can consider the limit

  limit(%,k=infinity);
                                  1

This is proved in Analysis 1 (and told at school without proof ~ 11th
class ~ 17 years) for rational functions, so either I missunderstood
your problem ... or you just need some coffee break :-)

But if it is a polynomial, then the series terminates and it will
converge in the plane.

Note the formula for a(k) and p = even causes formal problems, since
Maple works with GAMMA and unfortunately not with 1/GAMMA (so you will
need assumptions already there, which Maple does not tell you), you
may heal it through limits (or: look at pochhammer before GAMMA).

Das freut mich und es ist eine gute Wahl: ich gratuliere Doug Meade!

you should not do it that way, but write limit( n1/d1, k = infinity), which is like k^2/k^2 ... or more formally quotient of polynomials (in k) and the limit is given through the highest coeffiecents

which obviously is 1 so for abs(x) < 1 the series converges and in x=1 ...

but as Alejandro already said: for your case the coefficients are zero for high order (your initial formula is not quite correct)

you should not do it that way, but write limit( n1/d1, k = infinity), which is like k^2/k^2 ... or more formally quotient of polynomials (in k) and the limit is given through the highest coeffiecents

which obviously is 1 so for abs(x) < 1 the series converges and in x=1 ...

but as Alejandro already said: for your case the coefficients are zero for high order (your initial formula is not quite correct)

you have to look closer into try .. catch - if the procedure fails, you have to skip it ... it needs some patients to use it, try with simple examples first ... so it is only a sketch what I have posted

for your actual problem I would use timelimit = 2 sec (!) or less and 'i' only up to 3 or so, so see what happens (it will fail) and how you handle the case of failings

anyway: I do not have the Toolbox ...

Edited to add an example

  semiendless:=proc(n) while type(n,'even') do end do; return(n); end proc;
  # endless waiting loop if n is even, otherwise return input
  for i from 0 to 5 do
    try
      k:=timelimit( 0.5, semiendless(i));
    catch: #"time expired":
      print(i, "can not wait"); # error processing
      next
    finally
      # do nothing 
    end try;
  print(`this is ok, result`=[i,k^2]); # do it here
  end do;
 
                         0, "can not wait"
                     this is ok, result = [1, 1]
                          2, "can not wait"
                     this is ok, result = [3, 9]
                          4, "can not wait"
                     this is ok, result = [5, 25]
This way you can treat the good and bad results.

 

you have to look closer into try .. catch - if the procedure fails, you have to skip it ... it needs some patients to use it, try with simple examples first ... so it is only a sketch what I have posted

for your actual problem I would use timelimit = 2 sec (!) or less and 'i' only up to 3 or so, so see what happens (it will fail) and how you handle the case of failings

anyway: I do not have the Toolbox ...

Edited to add an example

  semiendless:=proc(n) while type(n,'even') do end do; return(n); end proc;
  # endless waiting loop if n is even, otherwise return input
  for i from 0 to 5 do
    try
      k:=timelimit( 0.5, semiendless(i));
    catch: #"time expired":
      print(i, "can not wait"); # error processing
      next
    finally
      # do nothing 
    end try;
  print(`this is ok, result`=[i,k^2]); # do it here
  end do;
 
                         0, "can not wait"
                     this is ok, result = [1, 1]
                          2, "can not wait"
                     this is ok, result = [3, 9]
                          4, "can not wait"
                     this is ok, result = [5, 25]
This way you can treat the good and bad results.

 

This is nice ... I was not aware, that an LU decomposition as Cholesky factorization G = L.L^t gives the orthonormalization via pullback from the standard base (which is the linear Algebra beyond that, ignoring functions ... and it works for bilinear forms quite general, especially reasonable weights).

Do you have a reference for it?

This is nice ... I was not aware, that an LU decomposition as Cholesky factorization G = L.L^t gives the orthonormalization via pullback from the standard base (which is the linear Algebra beyond that, ignoring functions ... and it works for bilinear forms quite general, especially reasonable weights).

Do you have a reference for it?

quite likely Alec is not supposing that ancient eastern Germanics attacked the Wiki :-)

If you convert to rationals before, you may go the following way:

  KummerM(mu, nu, z); convert(%,hypergeom); convert(%,KummerM);

                          KummerM(mu, nu, z)
                       hypergeom([mu], [nu], z)
                          KummerM(mu, nu, z)

This says: you can use 'KummerM' instead.

And rationals will give you what you want:

For the (once) posted example I have no problems with an immediate
answer (while for floats it is a pain):

  KummerM(a,b,z); subs(a=1,b=1.5,z= -1/10^6,%); evalf(%);
                             0.9999993333

  hypergeom([1],[1.5],-1/10^6);
                             0.9999993333

If you convert to rationals before, you may go the following way:

  KummerM(mu, nu, z); convert(%,hypergeom); convert(%,KummerM);

                          KummerM(mu, nu, z)
                       hypergeom([mu], [nu], z)
                          KummerM(mu, nu, z)

This says: you can use 'KummerM' instead.

And rationals will give you what you want:

For the (once) posted example I have no problems with an immediate
answer (while for floats it is a pain):

  KummerM(a,b,z); subs(a=1,b=1.5,z= -1/10^6,%); evalf(%);
                             0.9999993333

  hypergeom([1],[1.5],-1/10^6);
                             0.9999993333

It is a bit vague and I am afraid it can be done only partially
and to be 'activated' only on demand (it may make things slow):

have a syntax check like in compiling environments, immediate or
on call, even possible typos

provide warnings for dangerous use (say: assumptions on a variable
which is used in a definition, but invisible is altered)

solving equations or using transforms may report their assumptions
(like a*x + b = 0 ---> "a not 0")

integrals should show up conditions under which they *can* be done
(well, why only integrals ...)

a help system with intelligent search function (case insensitive,
semantic distances for typos, allowing combinations, s.th. like
Google)

a dictionary, which refers also back to Maple ("nice to know what
it is - but what to do in Maple?")

enlarging the Function Advisor (and why restrict to functions? it
is a good resource ... cross connection to 'methods' doable?)

beyond: give a reasonable chance to find something in the Maple
Application Center or at MaplePrimes


And last, but not least: do not let die the slim functionality of
the classical interface, bring it to Java (to reduce costs), but
kick off all the gimmicks in that case


"Dear Santa Claus - I know you are used to lists and not to items
only. Please be aware of possible, further updates. Also I hope
you will care for wishes of my comrades, as we often share gifts."

PS: sorry, if this is beyond/besides your intention ..
acer,

I got trapped, sorry ... here is why: 

Working with fractions instead of floats gives the integrand as

S := sin(2323/8*Pi*cos(theta))^2/cos(theta)^2*sin(theta)^3*
       BesselJ(0,2967279/5996*Pi*sin(theta));

Hence I shouted 'division by zero!'.

But that's likely only a numerical singularity, since

limit(S, theta=Pi/2)=5396329/64*Pi^2*BesselJ(0,2967279/5996*Pi).


Observing that S is symmetric in theta=Pi/2 one needs only half
of the interval and for that your approach needs half the time
(or better and resulting in your number).
Axel
acer,

I got trapped, sorry ... here is why: 

Working with fractions instead of floats gives the integrand as

S := sin(2323/8*Pi*cos(theta))^2/cos(theta)^2*sin(theta)^3*
       BesselJ(0,2967279/5996*Pi*sin(theta));

Hence I shouted 'division by zero!'.

But that's likely only a numerical singularity, since

limit(S, theta=Pi/2)=5396329/64*Pi^2*BesselJ(0,2967279/5996*Pi).


Observing that S is symmetric in theta=Pi/2 one needs only half
of the interval and for that your approach needs half the time
(or better and resulting in your number).
Axel

I find it quite funny, that M$ introduces just that format as standard for Office application (Word, Excel), while they consider it as harmfull (at the server side) and do not even offer the possiblity to save such as attachment (as any reasonable software would do) - but at the same time it is trivial to circumvent all that through zipping files (which would never outwit protection SW at the server) ...

First 163 164 165 166 167 168 169 Last Page 165 of 209