[SciPy-user] Numerical integration of a matrix
Pearu Peterson
pearu at cens.ioc.ee
Thu May 16 13:59:49 EDT 2002
On Thu, 16 May 2002, Nils Wagner wrote:
> Hi all,
>
> How do I integrate the following matrix elements in an efficient manner
> with scipy
>
> c_{j,k} = \int\limits_0^\pi \varepsilon a(x) \sin (k x) \sin (j x) dx
> (Latex notation)
>
> j, k = 1, ..., 9
>
> \varepsilon = 0.1
>
> a(x) = x^2 (\pi-x)^2 - \delta, \delta = 201.0
I think you can do it also analytically (use some CAS, for example).
But if you insist it to be done numerically then look at quadpack
functions QAWO and QAWF. Or disrcetize a(x) and use FFT.
Pearu
More information about the SciPy-User
mailing list