Re: Integrate a matrix-function
- To: mathgroup at smc.vnet.net
 - Subject: [mg27468] Re: Integrate a matrix-function
 - From: "Allan Hayes" <hay at haystack.demon.co.uk>
 - Date: Tue, 27 Feb 2001 00:37:20 -0500 (EST)
 - References: <97cemm$d9s@smc.vnet.net>
 - Sender: owner-wri-mathgroup at wolfram.com
 
Martin,
With
f[s_,t_] := {{s t, s t^2},{s^2 t,s^2 t^2}}
The integration that you  use seems to do what you want: the outpur is a
matrix of the same size as the integrand.
Integrate[f[u,t],{u,s,t}]
{{t*(-(s^2/2) + t^2/2), t^2*(-(s^2/2) + t^2/2)},
  {t*(-(s^3/3) + t^3/3), t^2*(-(s^3/3) + t^3/3)}}
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Martin Richter" <mrMICE.fi at cbs.dk> wrote in message
news:97cemm$d9s at smc.vnet.net...
> 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
>
>
>