Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrate a matrix-function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27478] Re: [mg27454] Integrate a matrix-function
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Tue, 27 Feb 2001 00:37:30 -0500 (EST)
  • References: <200102260156.UAA13488@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I found no problem with straightforward integration of the {n, n}matrix. For
example, suppose

In[1]:=
Clear[f]; f[s_, t_] := Table[Sin[i*s + j*t], {i, 3}, {j, 3}];

so that

In[2]:=
f[s, t]
Out[2]=
{{Sin[s + t], Sin[s + 2 t], Sin[s + 3 t]}, {Sin[2 s + t], Sin[2 s + 2 t],
    Sin[2 s + 3 t]}, {Sin[3 s + t], Sin[3 s + 2 t], Sin[3 s + 3 t]}}

In[3]:=
Integrate[f[u, t], {u, s, t}]
Out[3]=
{{Cos[s]*Cos[t] - Cos[t]^2 - Sin[s]*Sin[t] + Sin[t]^2, Cos[s]*Cos[2*t] -
Cos[t]*Cos[2*t] -
    Sin[s]*Sin[2*t] + Sin[t]*Sin[2*t], Cos[s]*Cos[3*t] - Cos[t]*Cos[3*t] -
Sin[s]*Sin[3*t] +
    Sin[t]*Sin[3*t]}, {1/2*Cos[2*s]*Cos[t] - 1/2*Cos[t]*Cos[2*t] -
1/2*Sin[2*s]*Sin[t] +
    1/2*Sin[t]*Sin[2*t], 1/2*Cos[2*s]*Cos[2*t] - 1/2*Cos[2*t]^2 -
1/2*Sin[2*s]*Sin[2*t] + 1/2*Sin[2*t]^2,
   1/2*Cos[2*s]*Cos[3*t] - 1/2*Cos[2*t]*Cos[3*t] - 1/2*Sin[2*s]*Sin[3*t] +
1/2*Sin[2*t]*Sin[3*t]},
  {1/3*Cos[3*s]*Cos[t] - 1/3*Cos[t]*Cos[3*t] - 1/3*Sin[3*s]*Sin[t] +
1/3*Sin[t]*Sin[3*t],
   1/3*Cos[3*s]*Cos[2*t] - 1/3*Cos[2*t]*Cos[3*t] - 1/3*Sin[3*s]*Sin[2*t] +
1/3*Sin[2*t]*Sin[3*t],
   1/3*Cos[3*s]*Cos[3*t] - 1/3*Cos[3*t]^2 - 1/3*Sin[3*s]*Sin[3*t] +
1/3*Sin[3*t]^2}}

which I guess is what you were looking for. Correct me if I'm wrong.

Tomas Garza
Mexico City

----- Original Message -----
From: "Martin Richter" <mrMICE.fi at cbs.dk>
To: mathgroup at smc.vnet.net
Subject: [mg27478] [mg27454] Integrate a matrix-function


> Hi
>
> I'm using Mathematical 4.0. The problem is the following.
>
> I have a function, say f[s_,t_], there s,t are real numbers and the output
> is a matrix of size (n,n). I need to integrate each component in the
matrix,
> i.e. make a new function, like this:
> g[s_,t_] := Integrate[f[u,t], {u,s,t}] // error
>
> So right now I have a line for each element but I think there is a
one-line
> way of doing this (using Map or Apply) ?
>
> Thanks IA for any help
> Martin
>
>
> ----------------------------------------------
> Please remove the PET to reply by email
>
>
>



  • Prev by Date: RE: Plot[(1 + 10^(-k))^(10^k), {k, 2, 9}]
  • Next by Date: Re: Re: converting hex strings
  • Previous by thread: Integrate a matrix-function
  • Next by thread: Re: Integrate a matrix-function