Message Boards Message Boards

0
|
3340 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Pick factors from Taylor expansion?

Posted 6 years ago

Hello! I have this code:

genus[Q_, n_Integer] := 
  Module[{z, x}, 
   SymmetricReduction[
      SeriesCoefficient[
       Product[ComposeSeries[Series[Q[z], {z, 0, n}], 
         Series[x[i] z, {z, 0, n}]], {i, 1, n}], n], 
      Table[x[i], {i, 1, n}], Table[Subscript[c, i], {i, 1, n}]][[
     1]] // FactorTerms];
AgenusTotal[n_Integer] := 
  Total[Table[
    genus[(Sqrt[#]/2)/Sinh[Sqrt[#]/2] &, i] /. c -> p, {i, 0, n}]];

Which generates certain polynomials. For example for n=3 I get:

$-\frac{p_1}{24}+\frac{7 p_1^2-4 p_2}{5760}+\frac{-31 p_1^3+44 p_2 p_1-16 p_3}{967680}+1$

I need to take the square root of this expression (as a Taylor expansion) and group together terms of similar order (here by order I mean $p_1^3$, $p_1p_2$ and $p_3$ are, for example, of order 3 (each $p_i$ is a polynomial of degree i of another variable), the same way they are grouped in the expression itself. I have this code by now:

Series[Series[
  Series[Sqrt[AgenusTotal[3]], {Subscript[p, 1], 0, 5}], {Subscript[p,
     2], 0, 5}], {Subscript[p, 3], 0, 5}]
SeriesCoefficient[
  SeriesCoefficient[
   SeriesCoefficient[
    Series[Series[
      Series[Sqrt[AgenusTotal[3]], {Subscript[p, 1], 0, 
        5}], {Subscript[p, 2], 0, 5}], {Subscript[p, 3], 0, 5}], 2], 
   2], 1];

It works for individual examples, but I would like something more independent and ideally without putting a lot of Series[Series[Series[ terms or SeriesCoefficient[SeriesCoefficient[SeriesCoefficient[ terms by hand (which would be tedious for n large). Also I would like to pick the right terms automatically, without specifying the SeriesCoefficient by hand (as in this way I might miss certain terms). Can someone help me? Thank you!

POSTED BY: Silviu Udrescu

You can weight the $c_i$ with an indeterminate t^i, and compute the series as a function of t:

genus[Q_, n_Integer] := 
  Module[{z, x}, 
   SymmetricReduction[
      SeriesCoefficient[
       Product[ComposeSeries[Series[Q[z], {z, 0, n}], 
         Series[x[i] z, {z, 0, n}]], {i, 1, n}], n], 
      Table[x[i], {i, 1, n}], 
      Table[Subscript[c, i] t^i, {i, 1, n}]][[1]] // FactorTerms];  (* <-- weights t^i *)
AgenusTotal[n_Integer] := 
  Total[Table[genus[(Sqrt[#]/2)/Sinh[Sqrt[#]/2] &, i] /. c -> p, {i, 0, n}]];
Series[Sqrt[AgenusTotal[3]], {t, 0, 5}]

enter image description here

You can also take the square root of the series:

Sqrt[Series[AgenusTotal[3], {t, 0, 5}]]

To get rid of the t, extract the coefficients; they can be added together with Total:

CoefficientList[Sqrt@Series[AgenusTotal[3], {t, 0, 5}], t] // Simplify

enter image description here

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

Group Abstract Group Abstract