MathGroup Archive 2007

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

Search the Archive

Re: The integrand has evaluated to non-numerical values for all

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83880] Re: The integrand has evaluated to non-numerical values for all
  • From: "Steve Luttrell" <steve at _removemefirst_luttrell.org.uk>
  • Date: Mon, 3 Dec 2007 05:50:10 -0500 (EST)
  • References: <fitstp$69s$1@smc.vnet.net>

Here is a way of approximating your integral by doing a series expansion 
about a functional form that Mathematica DOES know how to integrate:

First of all define a series expansion of your f[x,y].

f20[x_,y_,n_]:=(Series[\[ExponentialE]^-(\[Epsilon]+y)^2,{\[Epsilon],0,n}] 
Sin[x y])/(x y)//Normal//Simplify

Now compute the first 10 approximations to your integral. This takes a 
minute or so to compute on my PC.

fapprox=Table[f2[x_,y_,i]=f20[x,y,i]/.\[Epsilon]->-1;Integrate[f2[x,y,i],{y,0,\[Infinity]}]//FullSimplify//PowerExpand,{i,10}]

You can then plot the differences between successive approximations.

Plot[Map[#[[2]]-#[[1]]&,Partition[fapprox,2,1]]//Evaluate,{x,0.01,10},PlotStyle->Table[Hue[0.8(i-1)/10],{i,1,10}]]

You don't need to go too far out in the sequence of series approximations 
before these differences become quite small.

Steve Luttrell
West Malvern, UK

"Kreig Hucson" <kreig.hucson at yahoo.com> wrote in message 
news:fitstp$69s$1 at smc.vnet.net...
> Hi all,
>
> Being given the function:
>
> f[x_,y_]:= Sin[x*y]*Exp[-(y-1)^2]/(x*y) ,
>
> I want to integrate it with respect to y, from 0 to Infinity, and to 
> obtain a function of x only, F[x].
>
> I typed the command:
>
> F[x_]:= Assuming[x>0, Integrate[f[x,y],{y,0,Infinity}]]
>
> but the integral remained unevaluated by Mathematica 6.
>
> After this, I typed the command:
>
> F[x_]:= Assuming[x>0, NIntegrate[f[x,y],{y,0,Infinity}]]
>
> but I received the error message: "The integrand f[x,y] has evaluated to 
> non-numerical values for all sampling points in the region with boundaries 
> {{Infinity,0.}}".
> I looked at the explanations of the error message and there it was 
> suggested to give a particular value to x and to compute the integral for 
> that particular value. I gived one particular value and I obtained the 
> expected result. Anyway I need to obtain an analytical expression for all 
> x>0.
>
>   My question is, how can be performed the integral and to obtain the 
> analytical function F[x]?
>
>  Thank You in advance,
>
>  Kreig
> 



  • Prev by Date: RE: Re: Geocoding using Mathematica
  • Next by Date: Re: The integrand has evaluated to non-numerical values for all
  • Previous by thread: The integrand has evaluated to non-numerical values for all
  • Next by thread: Re: The integrand has evaluated to non-numerical values for all