Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solving a system of coupled iterative equations containing lots of heavy integrals and derivatives

Hello all,

I am trying to solve a system of coupled iterative equations, each of which containing lots of integrations and derivatives.

First I used Sage to solve it analytically, but the solution was too dependent on the initial guesses for my unknown functions in the iterative loops, constant values for initial guesses yielded in Sage answering back almost immediately whereas symbolic functions when were used as initial guesses caused the system to go deep into calculations, sometimes seemingly into never ending ones.

However, what I tried with Sage was actually a simplified version of my original equations so I thought it might be the case that I have no other choice rather than to treat the integrations and derivatives numerically, however, I had some not ignorable problems:

  1. integrations were only allowed to have numerical limits and variables were not allowed as e.g. their upper limits (I thought maybe a numerical method algorithm is faster than the analytic one even-though I leave a variable or parameter in its calculations, but it just didn't work so).

  2. integrands couldn't also admit extra variables and parameters w.r.t. which not being integrated.

  3. the derivative function was itself a big obstacle, as I wasn't able to compute partial derivatives or to use a derivative in the integrand of an integral.

To get rid of all the problems with numerical derivative I substitute it by the symbolic diff() function and the speed improvement was still hopeful but the problems with numerical integration persist.

Now I have three questions:

a- Is it right to conclude there is no other way for me rather than to discretize the equations and do a complete numerical treatment instead of a mixed one?

b- If so then is there any way to do this automatically? My equations are not DE ones to use ODEint or else, they are iterative equations, I have integrations and derivatives only to update my unknowns at each step to their newer values.

c- If my calculations are so huge in size is there any suggestion on switching from python to fortran or things like that as well?

Best Regards