I have the following variable
s1:=(1/2/Pi+Q*cos(k*phi))^3*cos(k*phi)/(1+beta^2*(1/2/Pi+Q*cos(k*phi))^2)^2;
and then I make a substitution as follows
s2:= subs(cos(k*phi)=((1-u^2) / (1+u^2)),sin(k*phi)=((2*u) / (1+u^2)), s1)*1/(1 + u^2); -----(1)
Now if I set up a function f that maps u to the right hand side of (1) above as follows
f:=u->(1/2/Pi+Q*(1-u^2)/(1+u^2...