# How to determine how much time it will take to finish a cell expression?

I am trying to integrate a large matrix with elements that contain trigonometric expressions. The evaluation is taking a long time--4 days, and it is still running.

Is there anything I can do to find out how much time will it take to finish task?

• In general, there is no way to reliably predict how long a symbolic execution may take, and without additional details there isn't much that can be said. However, here's a piece of advice that you may find helpful when trying to integrate a matrix of symbolic expressions: don't do it. Instead, do the integral matrix-element-by-matrix-element. There are two reasons for this: first, if one of the matrix elements is badly-behaved on integration (takes too long, too much RAM, crashes the kernel, etc.) then you lose ALL the matrix element integrals that have previously been calculated. – DumpsterDoofus Nov 14 '14 at 1:59
• The second reason is that in the event that one of the matrix elements is causing problems, then you will have no idea which element of the array is causing trouble. In summary, doing it element-by-element prevents results from being destroyed (and thus often saves time) and assists in debugging. By isolating which part of your array is causing difficulty, you will have a far easier time diagnosing and fixing problems. – DumpsterDoofus Nov 14 '14 at 2:01
• @DumpsterDoofus Thanks for the help you have given. It has really made me think twice. I have matrix integration over size 72*72. I should do the integral matrix-element-by-matrix-element. However, I am sure enough that none of the matrix elements are badly behaved. As they all are quadratic expressions of trigonometric expression. So it makes sense that none of the matrix element will cause any problem. Hence, here the question arises on time. Should I go for whole integration or element by element considering that my elements are well behaved. Waiting for your answer, sir. Thanks in advance – Amandeep Nov 14 '14 at 7:03
• Do you need symbolic results from the integration, or can you use NIntegrate? – Marius Ladegård Meyer Nov 16 '14 at 18:13
• Maybe try: halting problem fix. – dionys Aug 25 '15 at 9:31