Student Support Forum > General > > "Reduced question of last one"

 Post Reply: Name: Email Address: Please send email when my message is replied to. Url (optional): Subject: Message: view original message? Attachment (optional): Please answer this: 2+3 =

 Original Message (ID '128571') By Nasser M. Abbasi: Why the out put of: Simplify[Integrate[f[x, z] Sin[\[Theta]], {z, 0, 1}] - Sin[\[Theta]] Integrate[f[x, z] , {z, 0, 1}]] is not 0? How to let the out put=0? -------------------------------------------- Becuase f[x,z] is not defined, hence it could evaluate to anything. Hence integrand can be anything and Mathematica can't extract Sin[] out before hand. To force the simplication you want, you need to add an explicit rule to help Integrate. ------------------------------- Unprotect[Integrate]; Integrate[any_*f_,dom_]:=any*Integrate[f,dom]; Protect[Integrate]; Integrate[f[x,z] Sin[theta],{z,0,1}]-Sin[theta] Integrate[f[x,z],{z,0,1}] 0 -------------------------------- However, the above is not a robust thing as it stands (it can be made more robust, since if `any` happened to be a function of `z`, then you do not want that removed out from the integration. So, the above assumes that the multiplier inside the integrand does not depend on the integraion parameter.