2
$\begingroup$

I am trying to simplify an expression and taking the real part only. However Mathematica use ages to run the command (if it is able to do so in the end). The problem is that the expression I am working with is extremely huge (centerElectron, about 400 000 characters).

simplifiedCenterElectron = Simplify[ComplexExpand[Re[centerElectron]]]

Do anyone have any hints as to how I could make Mathematica run this faster? And will it be able to do so in the end for a 400 000 character expression?

$\endgroup$
4
  • 2
    $\begingroup$ Once the expression has gotten that large you have already lost the battle. If not done already, try simplifying upstream. Can you identify negligible terms that can be ignored? $\endgroup$
    – Bob Hanlon
    Dec 9, 2018 at 16:40
  • $\begingroup$ I can't ignore more terms without loosing out on some physical phenomena. I have been trying to simplify earlier expressions, and also have problems with expressions about 80 000 characters. Any idea about if it will be possible to simplify expressions of such a length? $\endgroup$
    – user61819
    Dec 9, 2018 at 16:45
  • $\begingroup$ Try looking for common terms. Try looking for simplifications you might apply by hand. Would a series approximation help? Is there any reason to expect the result to simplify to something small? $\endgroup$
    – mikado
    Dec 9, 2018 at 17:50
  • 1
    $\begingroup$ Collect with Simplify as the third argument sometimes finds simplifications that Simplify alone cannot. $\endgroup$
    – bbgodfrey
    Dec 10, 2018 at 2:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.