The scope of the docstring is all code within the docstring, so perhaps a variable was defined a certain way that you are not aware of some lines away from the test of interest. When I try these, the name for x_2 doesn't make any difference, but making n an integer does:
plain n >>> simplify(integrate(x_2*sin(n*pi*x_2/L)**2*2/L, (x_2, 0, L))) L*(pi**2*n**2 - 2*pi*n*sin(pi*n)*cos(pi*n) + sin(pi*n)**2)/(2*pi**2*n**2) integer n >>> n=Symbol('n',integer=1) >>> simplify(integrate(x_2*sin(n*pi*x_2/L)**2*2/L, (x_2, 0, L))) L*cos(pi*n)**2/2 /c -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.