Comment #5 on issue 3793 by smi...@gmail.com: Integrate hangs
http://code.google.com/p/sympy/issues/detail?id=3793
use expand on the simpler one
integrate(expand(sin(pi*(x - S(1)/2)))**2, x)
(pi*x/2 + sin(pi*x)*cos(pi*x)/2)/pi
and in comment #2
integrate(expand(sin(pi*(3*x/5 - S(2)/5))**2), x)
x*sin(3*pi*x/5 + pi/10)**2/2 + x*cos(3*pi*x/5 + pi/10)**2/2 +
5*sin(3*pi*x/5 + p
i/10)*cos(3*pi*x/5 + pi/10)/(6*pi)
and on the OP expression:
i = integrate(expand(f), (x, 0, L), (y, 0, L), (y, 0, L))
print filldedent(i)
L*(12*pi**2*L**2*c**2*(L*sin(2*pi*L**2*c - pi*c)**2/2 +
L*cos(2*pi*L**2*c - pi*c)**2/2 + sin(2*pi*L**2*c -
pi*c)*cos(2*pi*L**2*c - pi*c)/(4*pi*L*c))**2*cos(2*pi*L*c*z - pi*c)**2
+ 6*pi*L*c*(L*sin(2*pi*L**2*c - pi*c)**2/2 + L*cos(2*pi*L**2*c -
pi*c)**2/2 + sin(2*pi*L**2*c - pi*c)*cos(2*pi*L**2*c -
pi*c)/(4*pi*L*c))*sin(pi*c)*cos(pi*c)*cos(2*pi*L*c*z - pi*c)**2 +
3*sin(pi*c)**2*cos(pi*c)**2*cos(2*pi*L*c*z - pi*c)**2/4)
So it looks like the integration routine should try work with the expanded
expression. I wondered if this is because of changes to simplify wherein a
factored expression is returned more often, but I checked out a commit
before those changes and the expression I checked still hangs.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.