Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Help with map /@

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128659] Re: Help with map /@
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Wed, 14 Nov 2012 01:30:27 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k7hh4s$nvk$1@smc.vnet.net>

On 09/11/2012 00:01, Alexei Boulbitch wrote:
> Dear All
>
> I have a this expression:
>
> Ex= T1[x]+T2[y]+T3[z];
>
> I want to integrate the first term with respect to x, the second w.r.t y and the third with respect to z and then sum them all. I want to use the map function (/@) or similar to do that for me automatically. Your help is really appreciated.
>
> HMQ
>
> Hi, Hussain,
> Try this:
>
> expr = T1[x] + T2[y] + T3[z];
> Map[Integrate[#, #[[1]]]&, expr]
>
> \[Integral]T1[x] \[DifferentialD]x + \[Integral]T2[
>      y] \[DifferentialD]y + \[Integral]T3[z] \[DifferentialD]z
>
> Have fun, Alexei
>
>
>
> Alexei BOULBITCH, Dr., habil.
> IEE S.A.
> ZAE Weiergewan,
> 11, rue Edmond Reuter,
> L-5326 Contern, LUXEMBOURG
>
> Office phone :  +352-2454-2566
> Office fax:       +352-2454-3566
> mobile phone:  +49 151 52 40 66 44
>
> e-mail: alexei.boulbitch at iee.lu
>
>
>
>
There is a potential problem here, in that the expression T1[x] + T2[y] 
+ T3[z] will get sorted. As it is, this is in sort order, but if the T1, 
etc are just placeholders for the real expression, this probably won't 
be true in practice.

I'd go back a step, and ask why you want to do that to a sum of terms - 
it doesn't seem to be a very mathematically sensible thing to do.

David Bailey
http://www.dbaileyconsultancy.co.uk




  • Prev by Date: Re: Implicit Times
  • Next by Date: Re: Euclidean distance of all pairwise combinations (redundants)
  • Previous by thread: Re: Help with map /@
  • Next by thread: Long double (10-bytes) binary read?