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

Fast Integration of a product of 2 interpolating functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26542] Fast Integration of a product of 2 interpolating functions
  • From: Sebastien.deMentendeHorne at electrabel.com
  • Date: Fri, 5 Jan 2001 00:33:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm facing the following problem:

f[x,y] and g[y,z] are two InterpolatingFunction (called IF)
	f = FunctionInterpolation[Cos[x + y] + y^2, {x, -1., 1}, {y, -1.,
1}];
	g = FunctionInterpolation[Exp[y] + z/(y + 2), {y, -1., 1}, {z, -1.,
1}];

I need to compute a numerical value for
	Integrate[f[x,y] g[y,z], {y,-1,1}] 
at a lot of points {x,z}.

The integration of an IF with Integrate is much faster than with NIntegrate.
However the product of 2 IFs is not an IF and hence, the integration with
Integrate is painfull.
Moreover, I can't create an IF h[x,y,z]=f[x,y] g[y,z] because of the memory
it will take.

Any idea to increase the speed of the integration in this case?

And a last question, with the function f and g defined above, why :
ByteCount[f]	=	2256
ByteCount[g]	=	2256
ByteCount[f g]	=	11608
IMHO, ByteCount[f g] should give something like 2256 + 2256 + small overhead
for Times[,]

Thanks

Sebastien de Menten de Horne      |    ELECTRABEL
Tel:  ++32 10 48 51 76            |    R&D Energy Markets, 
Fax:  ++32 10 48 51 09            |    Traverse d'Esope, 6
Gsm:  ++32 478 789 444            |    B-1348 Louvain-la-Neuve, BELGIUM



  • Prev by Date: LinkSQL.exe : trying to find Alan Walker
  • Next by Date: Re: NEED HELP! Mathematica seems to "forget" that a package has been loaded
  • Previous by thread: LinkSQL.exe : trying to find Alan Walker
  • Next by thread: Re: NEED HELP! Mathematica seems to "forget" that a package has been loaded