Hi,
> > Is this a supported way of constructing symbolic integrals?
You could use the "Integral" command to construct
the noun form explicitely, avoiding computation of
the integral with symbolic parameter l.
--------------------------------------------------------------
from sympy import *
var("l R alpha t")
f = (2*l+1) / (2*t) * Integral(legendre(l, (1-R**2+t**2) / (2*t)) *
exp(-alpha*R), (R, 1-t, 1+t))
for _l in range(5):
#print r"\begin{equation}"
#print r"s_%d =" % _l
expr = f.subs(l, _l).doit().simplify() / exp(-alpha)
expr = expr.series(alpha, 0, 4)
pprint(expr)
#print latex(expr)
#print r"\end{equation}"
--------------------------------------------------------------
which then prints out the following series approximations:
--------------------------------------------------------------
2 2
α ⋅t ⎛ 4⎞
1 + ───── + O⎝α ⎠
6
2 3 3 3
α ⋅t α ⋅t ⎛ 4⎞
t + α⋅t + ───── + ───── + O⎝α ⎠
10 10
⎛ 4 2⎞ 3 4
2 2 2 ⎜t t ⎟ α ⋅t ⎛ 4⎞
t + α⋅t + α ⋅⎜── + ──⎟ + ───── + O⎝α ⎠
⎝14 3 ⎠ 14
⎛ 5 3⎞ ⎛ 5 3⎞
3 3 2 ⎜t 2⋅t ⎟ 3 ⎜t t ⎟ ⎛ 4⎞
t + α⋅t + α ⋅⎜── + ────⎟ + α ⋅⎜── + ──⎟ + O⎝α ⎠
⎝18 5 ⎠ ⎝18 15⎠
⎛ 6 4⎞ ⎛ 6 4⎞
4 4 2 ⎜t 3⋅t ⎟ 3 ⎜t 2⋅t ⎟ ⎛ 4⎞
t + α⋅t + α ⋅⎜── + ────⎟ + α ⋅⎜── + ────⎟ + O⎝α ⎠
⎝22 7 ⎠ ⎝22 21 ⎠
--------------------------------------------------------------
I hope this helps.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.