• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest Jun 27th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. ClearAll[p, b];
2. \$Assumptions = {b > 0};
3. p[m_, n_] := p[n, m] = If[ m < 1 || n < 1 || n > m + 1, 0 # &,
4.             Module[{s}, Integrate[Exp[(# - s) b n]
5.                 (KroneckerDelta[m, 1] KroneckerDelta[n, 2] b
6.                  + b n p[m, n + 1][s] + If[m < 2, 0,
7.                    b n (n - 1) (p[m - 1, n - 2][s] + p[m - 1, n - 1][s]
8.                                 +p[m - 1, n][s])]),
9.                 {s, 0, #}] &]];
10.
11. In[5]:= p[5, 6][t] // AbsoluteTiming
12.
13. Out[5]= {83.3974,
14.  15 + 86 E^(b t) - 47350 E^(5 b t) + 5034 E^(6 b t) +
15.   3240 E^(3 b t) (34 + 15 b t) + 10 E^(2 b t) (361 + 30 b t) +
16.   5 E^(4 b t) (-14311 + 21216 b t)}
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.

Top