Mathematica Mathematica NMinimize Program Running Slow - What's Wrong?
- Thread starter shafieza_garl
- Start date
-
- Tags
- Mathematica
Click For Summary
The discussion focuses on optimizing a Mathematica program that uses NMinimize for numerical minimization. The original code suffers from performance issues, primarily due to the definition of the function H, which involves complex nested integrals that significantly slow down computation. Suggestions include changing assignments to delayed assignments for proper variable substitution and replacing Integrate with NIntegrate for numerical efficiency. The rewritten code aims to address these issues, but still encounters challenges with numerical integration speed. It is noted that simplifying expressions, such as avoiding unnecessary square roots, has minimal impact on performance. The primary bottleneck remains the H function, which, despite being well-defined, continues to be a time-consuming element in the minimization process.
Similar threads
- · Replies 4 ·
- · Replies 2 ·
- · Replies 5 ·
- · Replies 1 ·
- · Replies 3 ·
- · Replies 9 ·
- · Replies 5 ·
- · Replies 1 ·
- · Replies 2 ·