Message Boards Message Boards

0
|
4148 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

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

Posted 5 years ago

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:
POSTED BY: Alex Token
2 Replies
Posted 5 years ago

Thank you very much.

POSTED BY: Alex Token

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]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract