calculus and analysis – Heuristics, tricks, and hacks in symbolic math

Mathematica sometimes fails to compute symbolic solutions when posed in the direct or obvious code, but succeeds when the same fundamental problem is posed in a slightly different way, or when assumptions are made explicit, or other tricks and hacks.

Example (v. 11.3):

 ((I E^(I t) + 2 I E^(I x)) PolyLog(2, 1 - E^(I (t - x))))/(E^(I (t + 2 x))), 

fails to integrate, but if it is split into the two component integrals in the natural way, it succeeds. (The two component answers can be added and then FullSimplifyed.)

As a result, there must be cases where users have given up in frustration when the proper hack or trick would have solved their problem.

As a service to the community (and for my own use), I’d like to collect in one place examples of such tricks and hacks that have yielded symbolic solutions when the direct or “obvious” approach failed.

(I’m not interested in numerical hacks… as these are of a fundamentally different sort.)

Some of the tricks I’ve come across include:

  • expressing constraints in novel ways
  • solving a “simpler” integral symbolically and then taking the limit of some variable to the desired value
  • forcing a “smart” change of variables
  • breaking an integral into component parts (as above)

Again, I’d like to limit consideration to symbolic computational mathematics, so I expect most answers will involve Integrate, D, Solve, DSolve, Simplify, and such.