Result of integrating a function x,z = symbols('x z', real=True); x,z px,pz = symbols('p_x p_z'); px,pz xxe = exp( pz*z + px*x ); xxe xxe.integrate(z) in second case of PieceWise doesn't include the multiplier ( exp(px*x) ) In the first case, PieceWise contains it; in the second, it does not. Why? Continue reading...