# [✓] Get identical symbolic expressions after simplifying them differently?

Posted 1 month ago
296 Views
|
2 Replies
|
2 Total Likes
|
 Dear Community, I have two complicated functions, one stated as x1, the other as x2. Technically, they are the same (albeit simplified differently). When I subtract x2 from x1, I expect to get zero, but that does not happen. Can you please let me know what I am doing wrong? Thank you. P.S. The file is attached. Attachments:
2 Replies
Sort By:
Posted 1 month ago
 Mathematica does not extract symbolic factors from integrals. You can force it to do it: extractConstants = (Integrate[a_*b_, {u_, lmts__}] /; FreeQ[a, u]) :> a*Integrate[b, {u, lmts}]; Simplify[x1 - x2 //. extractConstants]