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?

  • $\begingroup$ 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. $\endgroup$ – DumpsterDoofus Nov 14 '14 at 1:59
  • $\begingroup$ 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. $\endgroup$ – DumpsterDoofus Nov 14 '14 at 2:01
  • $\begingroup$ @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 $\endgroup$ – Amandeep Nov 14 '14 at 7:03
  • $\begingroup$ Do you need symbolic results from the integration, or can you use NIntegrate? $\endgroup$ – Marius Ladegård Meyer Nov 16 '14 at 18:13
  • $\begingroup$ Maybe try: halting problem fix. $\endgroup$ – dionys Aug 25 '15 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.