Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Integrating a Matrix
Replies: 6   Last Post: Nov 29, 2013 3:48 AM

 Messages: [ Previous | Next ] Topics: [ Previous | Next ]
 Murray Eisenberg Posts: 2,105 Registered: 12/6/04
Re: Integrating a Matrix
Posted: Nov 29, 2013 3:48 AM

I forgot what the ref/NIntegrate explicitly shows, in the Examples >
Basic Examples section: that NIntegrate will apply directly to the
individual entries of a vector or matrix =97 or, presumably,
higher-order array. So now flattening at start, restructuring at end, is
required.

It would be nice to have this automatic threading documented in some way
other than in two examples. But that sort of thing is a shortcoming of a
lot of the documentation.

On Nov 28, 2013, at 2:22 AM, Murray Eisenberg <murray@math.umass.edu> wrote:

> Perhaps something like the following (very simple example)?
>
> mat = Table[f[i, j][x], {i, 1, 3}, {j, 1, 3}]
> Partition[(NIntegrate[#, {x, 0, 1}] &) /@ Flatten[mat], 3]
>
>
> On Nov 27, 2013, at 1:24 AM, David Barnes <barnes@pullman.com> wrote:
>

>> I have a 3X3 matrix of functions fij[x], for i,j = 1,2,3, and I want to NIntegrate all nine elements over 0<x<1 to get a matrix of constants. Is there an easy way to do this other that doing 9 individual NIntegration's?
>>

>
> ---
> Murray Eisenberg
> murray@math.umass.edu
> Mathematics & Statistics Dept.
> University of Massachusetts
> 710 North Pleasant Street
> Amherst, MA 01003-9305
>
>
>
>
>
>

Date Subject Author
11/28/13 Bob Hanlon
11/28/13 Murray Eisenberg
11/29/13 Alexei Boulbitch
11/29/13 Murray Eisenberg