why so long?

• To: mathgroup at smc.vnet.net
• Subject: [mg22983] why so long?
• From: Otto Linsuain <linsuain+ at andrew.cmu.edu>
• Date: Sat, 8 Apr 2000 14:44:49 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```  Hi all. I am trying to solve a system of 2 coupled integral equations
by iterations. I wonder why it takes so long to do the integrals. Here
is an outline of what is happening.

Want to find two functions A[x], B[x] that solve the equations.

Define A[1][x], B[1][x] as my initial guess, these are just constant
positive functions, they are of course not the final solutions, but they
are not a bad starting point.

Need to define some (4) combinations of A and B that go into the
integrals, they look like:

f[n][y,x]= A[n-1][y x] (B[n-1][y x] +/- B[n-1][x])/(y x A^2[n-1][y x] +
B^2[n-1][y x])

and similar stuff. Notice the recursive step in n, also notice that the
f's are not linear in A and B.

These functions then get multiplied by some Hypergeometric2F1[a,b,c,y]
or Hypergeometric2F1[a,b,c,1/y] (a,b,c are constants) and the new A,B
are defined as:

A,B[n_][x_]:=A,B[n][x]=Some Constants+(x^(1-a)) Some Constants
NIntegrate[f[n][y,x] Hypergeometric2F1[a,b,c,y],{y,0,Infinity}], with
different f's for A and B. Notice that I make Mathematica remember the
values of A and B already calculated, namely to save time, at the
expense of memory.

There are no singularities in the integration, I know that there are
singularities in the Hypergeometric2F1[a,b,c,y] for y between 1 and
Infinity, but the integration is actually broken from 0 to 1 the
Hypergeometric is in y and from 1 to Infinity it is in 1/y. The cases
that could be singular around one and the integration out to Infinity
are treated separatelly. The numerical integration is cut a little away
from one and at a big number and those contributions to the integrals
are estimated by a procedure that does not involve numerical crunching
on the behalf of Mathematica. My philosophy here has been that
Mathematica integrates the big chunk of well behaved functions
(conputationally easy, mathematically hard) and I estimate analitically
the rest. I then ask Mathematica to plot A,B[2],[3],[4] and so on in a
finite region of x. I understand that Mathematica might need to go back
and compute A and B [2] at more additional points in order to compute A
and B [3], but it just takes too long.

It takes about 1-15 min to do the first plots A and B [2], but then I
have been waiting 48 hours for the next one, still waiting... No error
messages, there used to be some but I have changed the procedures and
debugged the code. I am working on a pretty new Linux station with 2
CPU's and two other jobs runnung in it. All three jobs are niced to 15
to allow live users to run other jobs. I understand this all takes CPU
time but still.

Any suggestions?, maybe my entire approach to the problem is not very
efficient. Any help will be much appreciated.

Otto Linsuain.

```

• Prev by Date: Re: Re: Q: Axes on top of graphics primitives?
• Next by Date: Re: RE:graphics export to LAtek and Word
• Previous by thread: Selecting cells
• Next by thread: selfdefined operators