This is related to the question (Integrate many simple terms fast) I had before, where Nasser gave me an answer which worked 'most of the time' but not always. Context: Map[Integrate[#,x]&,Expand@func[x]] works much faster for func[x] a huge sum of easy to integrate terms than just using Integrate.
There is one problem though: This cannot handle single terms, that is terms like: x^2 or E^x x^20. It needs to have at least one sum/difference in it, like x^2+1.
Is there a way to either Check if my expression is of the form 'a single term' (NOT atomic, since x^2 is not atomic)
or a work-around of this problem? (adding and subtracting e.g. 1 does not work, as Mathematica will cancel them.)
NOTE: adding {} around Expand@func[x] is NOT a viable solution, since this eliminates the whole reason for Map in the first place: Speeding up calculations. Adding {} will make it treat as one whole expression rather than each one separately, as intended.
Distribute does not speed up the calculation (as tested).
