daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Operator = (1 + x^3) D[#, {x, 2}] - 6 x # &;
  2. n = 20;
  3. Sumb = Sum[Subscript[alpha, k] x^k, {k, 0, n}];
  4. Alpha = Table[Subscript[alpha, k], {k, 0, n}];
  5. res = Operator[Sumb] /. {Subscript[alpha, 0] -> Subscript[a, 0],
  6. Subscript[alpha, 1] -> Subscript[a, 1]};
  7. coefs = CoefficientList[res, x];
  8. equs = Thread[coefs == 0];
  9.  
  10. For[k = 1; Alphas = {}; equsk = equs[[1]]; subs = {},
  11.     k <= Length[equs] - 1, k++,
  12.     solalphak = Solve[equsk, Subscript[alpha, k + 1]];
  13.     AppendTo[Alphas, Subscript[alpha, k + 1] /. solalphak][[1]];
  14.     AppendTo[subs, solalphak];
  15.     equsk = equs[[k + 1]] /. Flatten[subs]
  16. ]
  17.  
  18. Alphas0 = Flatten[Alphas];
  19. series = Subscript[a, 0] + x Subscript[a, 1] +
  20. Sum[Alphas0[[k]] x^(k + 1), {k, 1, Length[Alphas0] - 2}]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top