Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

integrate an interpolated function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70294] integrate an interpolated function
  • From: wtplasar at ehu.es
  • Date: Thu, 12 Oct 2006 05:36:55 -0400 (EDT)

Hi,

I have defined numerical derivatives of functions by interpolation, 
because for some complicated numerical functions I was getting 
convergence problems using ND.

I have defined the second derivative of a 2 variable function by 
interpolating the function in a square region with the point where I 
want to evaluate the function at its center. I do it here for Sin[x*y]
as an example.

yyder[om_?NumericQ, 
      w_?NumericQ, h_?NumericQ] := D[FunctionInterpolation[Sin[x*y], 
{x, om - \
h, om + h}, {y, w - h, w + h}][x, y], {y, 2}] /. x -> om /. y -> w

Then I want to perform an operation on this function which involves 
integrating it over one of the variables (multiplying it by another 
function, but that does not matter).

So I do 

fun[w_?NumericQ, h_?NumericQ] := NIntegrate[yyder[om, w, h], {om, 0, 
1}]

and I get a series of errors like: 

FunctionInterpolation::range: Argument {x, om - 0.3, om + 0.3} is not 
in the 
form of a range specification, {x, xmin, xmax}.

FunctionInterpolation::range: Argument {#2, #3, #4} is not in the form 
of a 
range specification, {x, xmin, xmax}

and so on.

Can you help me? Thanks,

Ruth


  • Prev by Date: Re: recursive blues :(
  • Next by Date: Re: Ordinate in Plot Command
  • Previous by thread: Re: vector derivatives
  • Next by thread: Re: integrate an interpolated function