-2
$\begingroup$

The output of below codes are different when I run them. Does any one knows what could be the reason? They should be the same, because it shouldn't depend on order of expansion. Could anyone discover the source of difference? Any answers is highly appreciated.

f2x = Import["https://pastebin.com/RAPC8KpX"];

   F1=  Series[
        Series[f2x, {r12, Infinity,2}] // Normal, {z, Infinity, 1}] // Normal;


   F2=  Series[
        Series[f2x, {z, Infinity,1}] // Normal, {r12, Infinity, 2}] // Normal;
$\endgroup$
  • 3
    $\begingroup$ So what is f2x? Clearly we cannot answer this question without this basic information. $\endgroup$ – David G. Stork Jul 6 '18 at 6:38
  • 1
    $\begingroup$ @HolgerMate: Please give us a representative function for f2x. Again, we can't help at all without some function here. $\endgroup$ – David G. Stork Jul 6 '18 at 12:50
  • 1
    $\begingroup$ I also cannot reproduce the problem, neither in version 11.0.1 nor in version 11.3 for macOS. $\endgroup$ – Henrik Schumacher Jul 6 '18 at 14:48
  • $\begingroup$ No, you should hope somebody else does with this non-explanation. I'm not going to try any more. You make it impossible for me to help you. $\endgroup$ – rhermans Jul 6 '18 at 15:33
  • $\begingroup$ @HolgerMate Also please delete the comments that have become obsolete. This question will be here forever, try to make it readable for future visitors. $\endgroup$ – rhermans Jul 6 '18 at 15:34
4
$\begingroup$

I get the same result in any case (Mathematica 11.3 Win 7 64). I think you may have a lingering definition, try starting with a clean kernel.

f2x = Import["https://pastebin.com/raw/Q6pW366F"];

ser1 = Series[Series[f2x, {r12, Infinity, 2}] // Normal, {z, Infinity, 1}] // Normal;

ser2 = Series[Series[f2x, {z, Infinity, 1}] // Normal, {r12, Infinity, 2}] // Normal;

ser3 = Normal@Series[f2x, {z, Infinity, 1}, {r12, Infinity, 2}];

FullSimplify[ser1 == ser2 == ser3]
(* True *)

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ I have used your code for another f2x presented in below link, The output is not true anymore! pastebin.com/RAPC8KpX $\endgroup$ – Holger Mate Jul 7 '18 at 12:33
  • $\begingroup$ Your code doesn't work in this case :( $\endgroup$ – Holger Mate Jul 7 '18 at 12:56
  • $\begingroup$ @HolgerMate It is True when I run it on a clean kernel. $\endgroup$ – rhermans Jul 7 '18 at 13:06
  • $\begingroup$ I am completely confused :(. When I use quit kernel and then run the code I put in the above link, the out put is: some code==0. It doesn't returns True. Do you know why does it happens? $\endgroup$ – Holger Mate Jul 7 '18 at 13:09
  • $\begingroup$ It returns: (a G H (G + H) (4 G^2 H^2 (G + H)^2 (G (2 Gd + Hd) + H (Gd + 2 Hd)) - 12 a G H (G + H) (G^3 (2 Gd + Hd) + G^2 H (3 Gd + Hd) + H^3 (Gd + 2 Hd) + G H^2 (Gd + 3 Hd)) + 3 a^2 (3 G^5 (2 Gd + Hd) + 3 H^5 (Gd + 2 Hd) + G^3 H^2 (12 Gd + 5 Hd) + G^4 H (15 Gd + 8 Hd) + G^2 H^3 (5 Gd + 12 Hd) + G H^4 (8 Gd + 15 Hd))) Cos[ th] (3 + Cos[2 tp]) (-1 + 3 Cos[2 (th + tp)]))/((-4 G^2 H^2 (G + H)^2 + 4 a G H (G + H) (G^2 + 3 G H + H^2) + 3 a^2 (G^4 - 2 G^3 H - 5 G^2 H^2 - 2 G H^3 + H^4)) r12 z) == 0 $\endgroup$ – Holger Mate Jul 7 '18 at 13:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.