# Speed up this series expansion?

Posted 1 month ago
351 Views
|
4 Replies
|
1 Total Likes
|
 Hi, I wonder why the following commands: Fun1[s_] := (1 - BesselK[0, Sqrt[s + gam]]/BesselK[1, Sqrt[s + gam]])/(s*Sqrt[s + gam]); ser1 = Series[Fun1[s], {s, ?, 60}]; are still not completed after a day of calculations on a supercomputer? Is there any way to speed up the computations? Leslaw
4 Replies
Sort By:
Posted 1 month ago
 Only comment. Comparison with Maple 2019.2.1, takes only 251.297 second. Regards M.I.
Posted 1 month ago
 My first guess has to be with "s+g" that Mathematica doesn't know if it is two independent variables or a variable and a constant (noting you have separate J(x) - will s or g be constant or in which?). If J is designed for only one variable and tries to "solve" (rather than use table) with two - it could easily just end up in an infinite loop somewhere trying to perform it and waiting for a result it will not get.Is there a proof the series, using J0(s,g) as you suggest terminates? The book and page citing it? Fun1[s_] := (1 - BesselK[0, Sqrt[x]]/BesselK[1, Sqrt[x]])/(s*Sqrt[x]); In[19]:= Series[Fun1[s], {s, \[Infinity], 60}] // Timing Out[19]= {0.001181, SeriesData[ds, DirectedInfinity[1], { dv^Rational[-1, 2] (1 - BesselK[0, dv^Rational[1, 2]]/BesselK[ 1, dv^Rational[1, 2]])}, 1, 61, 1]} (Is there some reason you cannot, here, say %/.x->(g+s)) ?)I could ask questions like whether (s*Sqrt[g+s]) ends up being a solution to another besselK but have no time - but I understand such inputs to J are common after converting an ODE to a bessel form ODE by substitution.I wonder at times why Mathematica doesn't seem to use a larger "table of equations" solutions to produce what (doesn't need to be solved because it's in a table). on the other hand i know some sol'n by mm are by table - but the tables seem to be "brief" when working in certain areas (where try to constrain variables doesn't seem to find more applicable sol'n).