I'm using maple 13.
The expression that I paste below is quite large and subsequent expressions are also swelling. This is causing maple to slow down and in some instances I get a message saying the kernel has disconnected (maple just times out) I want a way to programmatically reduce the size of the output. I have tried simplify(expr,size) and this has helped some. I don't want to use simplify(expr,symbolic) because of the presence of the square roots. Is there anything I can do to reduce its size ? Here beta and Q are real.
expr:=(1/2*((1/2592)*Q*((Q*Pi-1/2)^2*beta^2+Pi^2)^5*((((Q*Pi-1/2)^2*beta^2+Pi^2)*((((Q^2*Pi^2-1/2)*(1/2+Q*Pi)^2*(Q*Pi-1/2)*beta^5+(I*Pi^5*Q^4-(1/4*I)*Pi^3*Q^2+I*Pi^4*Q^3+(1/8*I)*Pi)*beta^4+((1/2)*Q^2*Pi^4+(1/2)*Pi^2+Q*Pi^3+3*Pi^5*Q^3)*beta^3+(3*I)*Pi^3*(1/3+Q^2*Pi^2)*beta^2+(2*Q*Pi^5+Pi^4)*beta+(2*I)*Pi^5)*cos(k*theta)+(1/2)*Q*Pi*beta^2*((1/2+Q*Pi)^2*(Q*Pi-1/2)*beta^3+I*Pi*(Q*Pi-3/2)*(1/2+Q*Pi)*beta^2+(Q*Pi^3+(3/2)*Pi^2)*beta+I*Pi^3))*exp(sigma^2*k^2)*exp(-(1/2)*sigma^2*k^2)-(1/2)*Q*Pi*beta^2*((1/2+Q*Pi)^2*(Q*Pi-1/2)*beta^3+I*Pi*(Q*Pi-3/2)*(1/2+Q*Pi)*beta^2+(Q*Pi^3+(3/2)*Pi^2)*beta+I*Pi^3)*exp(sigma^2*k^2)-((Q^2*Pi^2-1/2)*(1/2+Q*Pi)^2*(Q*Pi-1/2)*beta^5+(I*Pi^5*Q^4-(1/4*I)*Pi^3*Q^2+I*Pi^4*Q^3+(1/8*I)*Pi)*beta^4+((1/2)*Q^2*Pi^4+(1/2)*Pi^2+Q*Pi^3+3*Pi^5*Q^3)*beta^3+(3*I)*Pi^3*(1/3+Q^2*Pi^2)*beta^2+(2*Q*Pi^5+Pi^4)*beta+(2*I)*Pi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