I calculated an integral g when printed grives:

Piecewise((sin(w/2)/w - 2*cos(w/2)/w**2 + 4*sin(w/2)/w**3, Ne(w, 0)), (2/3, 
True)) + 2*Piecewise((-sin(w/2)/(2*w) + cos(w/2)/w**2 + sin(w/2)/w**3 - 
sin(3*w/2)/w**3, Ne(w, 0)), (1/6, True))

First, how can I extract from g (without cutting and pasting the output) 
what I really want which is:

(sin(w/2)/w - 2*cos(w/2)/w**2 + 4*sin(w/2)/w**3)+2*(-sin(w/2)/(2*w) + 
cos(w/2)/w**2 + sin(w/2)/w**3 - sin(3*w/2)/w**3)

Secondly,  I can substitute y = w/2.  In the resulting expression force 
expansion of sin(3*y). trigsimp doesn't do that.  I know the answer is 
supposed to be of the form (sin(y)/y)**3.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/498806a0-bc5d-490f-acba-c7bb265acbcbn%40googlegroups.com.

Reply via email to