Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.4K Views
|
8 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Calculate this series expansion with Bessel functions?

Posted 6 years ago

Hi, I am trying to execute the command:

Series[(BesselK[1, Sqrt[s + gam]]/BesselK[0, Sqrt[s + gam]] - 1)/(2*s*Sqrt[s + gam]), {s, ?, 8}]

which according to all my knowledge is formulated correctly, but for unclear reason it does not execute (note that I put * between 2, s and Sqrt[s+gam] in the denominator, which is not shown in the post preview). The same problem occurs in Wolfram Alpha. Any help? Leslaw

POSTED BY: Leslaw Bieniasz
8 Replies

After more intensive testing I now think (although I am not absolutely sure) that one reason for my difficulties was that the first command in my batch file program was placed immediately at the beginning of the file. Putting some comments before the first command seems to help. It is a pity the there seems to be no manual explaining such details. This I discovered doing some other calculations. The problem described here remains unsolved; I avoided solving it by means of a different approach. Leslaw

POSTED BY: Leslaw Bieniasz
Posted 6 years ago

Limiting variable names to single characters and sometimes limiting names to x,y,z seem to make it more likely that WolframAlpha can provide you an answer. Even with these changes it has difficulties returning what you have asked for, but does return a Puiseux series. Please see if this is sufficient for your needs.

WA link

POSTED BY: Bill Nelson

As @BillNielson notes, simpler variable names can help W|A. This gives terms up to order 5 in Alpha:

Series[(BesselK[1, Sqrt[s + g]]/BesselK[0, Sqrt[s + g]] - 1)/(2*s*Sqrt[s + g]), {s, ?, 5}]

I was not able to get more terms when I changed 5 to e.g. 8.

POSTED BY: Daniel Lichtblau

I'd be prefer to use our resources, but I have to understand what happens. I have decomposed my code into steps, and it seems now that the series for BesselK[0,z] is obtained, but there is still a problem with BesselK[1,z]. I wonder if Mathematica yields any errors or warnings while calculating the series for BesselK[1,z] in the interactive mode? Maybe in the batch mode the command execution is terminated when a warning occurs. I am attaching the (still wrong) results. Leslaw

Attachments:
POSTED BY: Leslaw Bieniasz

Hi, I did more testing, which convinces me that the series command is not executed in the batch mode (I am attaching my program and result files). I think it's MATHEMATICA 10 that we have. Is there any limitation on what can be done in the batch mode, compared to the interactive mode? In the attached program I also call SeriesCoefficient with a negative order (I cannot find any information how to handle asymptotic expansions in this respect; in former versions of MATHEMATICA using positive orders gave coefficients corresponding to the negative powers of the variable in an asymptotic series, but maybe this behavior was changed, as the documentation says one can obtain series in which there are both positive and negative powers of the variable). However, this has no effect as the series object is not obtained. Leslaw

Attachments:
POSTED BY: Leslaw Bieniasz

Maybe you can try executing you code on WOLFRAM CLOUD.You must only sign in.

Using version 12.0,I have:

$Version
(* "12.0.0 for Microsoft Windows (64-bit) (April 6, 2019)"*)

ser = Series[(BesselK[1, Sqrt[s + g]]/BesselK[0, Sqrt[s + g]] - 1)/(2*s*Sqrt[s + g]), {s, Infinity, 8}];
analcoeffs = Table[Together[Simplify[SeriesCoefficient[ser, -i/2]/Gamma[i/2]]], {i, 0, 16}]
(* {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} *)

ser = Series[(BesselK[1, Sqrt[s + g]]/BesselK[0, Sqrt[s + g]] - 1)/(2*s*Sqrt[s + g]), {s, Infinity, 8}];
analcoeffs = Table[Together[Simplify[SeriesCoefficient[ser, i/2]/Gamma[i/2]]], {i, 0, 16}]
(*{0, 0, 0, 0, 1/4, -(1/(12 Sqrt[\[Pi]])), 
 1/32 (1 - 4 g), (-25 + 24 g)/(480 Sqrt[\[Pi]]), 
 1/384 (13 - 8 g + 16 g^2), (-1073 + 500 g - 240 g^2)/(
 13440 Sqrt[\[Pi]]), (
 103 - 39 g + 12 g^2 - 16 g^3)/1536, (-375733 + 120176 g - 
  28000 g^2 + 8960 g^3)/(1935360 Sqrt[\[Pi]]), (
 23797 - 6592 g + 1248 g^2 - 256 g^3 + 
  256 g^4)/122880, (-24650571822575 + 14183445823488 g - 
  2268246048768 g^2 + 352321536000 g^3 - 84557168640 g^4)/(
 89292370083840 Sqrt[\[Pi]]), (-165590879286011 - 511036683714560 g + 
  70781061038080 g^2 - 8933531975680 g^3 + 1374389534720 g^4 - 
  1099511627776 g^5)/3166593487994880, (
 760044411225953 + 17354002563092800 g - 4992572929867776 g^2 + 
  532281739444224 g^3 - 62008590336000 g^4 + 11905649344512 g^5)/(
 74291251909754880 Sqrt[\[Pi]]), \
(1/2837267765243412480)(-8732708285675473 + 127173795291656448 g + 
   196238086546391040 g^2 - 18119951625748480 g^3 + 
   1715238139330560 g^4 - 211106232532992 g^5 + 140737488355328 g^6)}*)
POSTED BY: Mariusz Iwaniuk

Well, thank you, but the problem is that I cannot open and execute your file, because I have a remote access to MATHEMATICA in batch mode only, so that I can only execute programs written as text files, and I don't get any error diagnostics. I need to execute a sequence:

ser = Series[(BesselK[1, Sqrt[s + gam]]/BesselK[0, Sqrt[s + gam]] - 1)/(2*s*Sqrt[s + gam]), {s, ?, 40}];
analcoeffs = Table[Together[Simplify[SeriesCoefficient[ser, i/2]/Gamma[i/2]]], {i, 0, 80}];
Export["lowx_coeffs.txt", analcoeffs, "List"];

But even if I reduce the number of terms down to let's say 8 instead of 80, this program produces a list of "formal" coefficients:

0
SeriesCoefficient[ser, 1/2]/Sqrt[Pi]
SeriesCoefficient[ser, 1]
(2*SeriesCoefficient[ser, 3/2])/Sqrt[Pi]
SeriesCoefficient[ser, 2]
(4*SeriesCoefficient[ser, 5/2])/(3*Sqrt[Pi])
SeriesCoefficient[ser, 3]/2
(8*SeriesCoefficient[ser, 7/2])/(15*Sqrt[Pi])
SeriesCoefficient[ser, 4]/6
(16*SeriesCoefficient[ser, 9/2])/(105*Sqrt[Pi])
SeriesCoefficient[ser, 5]/24
(32*SeriesCoefficient[ser, 11/2])/(945*Sqrt[Pi])
SeriesCoefficient[ser, 6]/120
(64*SeriesCoefficient[ser, 13/2])/(10395*Sqrt[Pi])
SeriesCoefficient[ser, 7]/720
(128*SeriesCoefficient[ser, 15/2])/(135135*Sqrt[Pi])
SeriesCoefficient[ser, 8]/5040 

as if the series expansion command was not performed at all. In fact, when I try to enter the Series[] command into Wolfram Alpha, it incorrectly reinterprets it as some sequence of Log Sqrt Log functions and produces nothing. Replacing "gam" by "g" overcomes this problem under Wolfram Alpha, but under MATHEMATICA I still get the list of formal coefficients. This is damned frustrating. Leslaw

POSTED BY: Leslaw Bieniasz

For me works fine.

Series[(BesselK[1, Sqrt[s + gam]]/BesselK[0, Sqrt[s + gam]] - 1)/(2*s*Sqrt[s + gam]), {s, \[Infinity], 8}]
(*a long expression *)

See attached file

Regards M.I.

Attachments:
POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard