Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Subscript[c, 2 + n] == -(Subscript[c, n]/((n + 1) (n + 2)))
  2.  
  3. f[x_] := f[x] = f[x - 1] + f[x - 2]
  4.  
  5. f[0] = f[1] = 1
  6.  
  7. sol = c[n] /. RSolve[ {c[n + 2] ==
  8. -c[n]/((n + 1) (n + 2)),
  9. c[0] == c0, c[1] == c1}, c[n], n][[1, 1]];
  10. sol /. n -> # & /@ Range[0, 5] // InputForm
  11.  
  12. {c0, c1, -c0/2, -c1/6, c0/24, c1/120}
  13.  
  14. ClearAll[c];
  15. c[0] = c0; c[1] = c1;
  16. c[m_] := c[m] = With[{n = m - 2},
  17. -c[n]/((n + 1) (n + 2))];
  18. c /@ Range[0, 5] // InputForm
  19.  
  20. ClearAll[y,x];
  21. ode = y''[x] + y[x] == 0;
  22. sol = AsymptoticDSolveValue[ode, y[x], {x, 0, 5}];
  23. sol /. {C[1] -> y[0], C[2] -> y'[0]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement