MathGroup Archive 2011

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

Search the Archive

Re: How to NSolve equation which involves NIntegrate?


I am sorry, I should made up an example. Here it is:

f[a_] := NIntegrate[Sin[a x], {x, 0, 1}]
g[a_] := a*a
NSolve[f[a] == g[a], a]

Out[]: NIntegrate::inumr: "The integrand Sin[a x] has evaluated to 
non-numerical values for all sampling points in the region with 
boundaries {{0,1}}."

Thanks,
--Ted

On 7/7/2011 10:26 AM, DrMajorBob wrote:
> You left out the definition of h, so how can we possibly tell you why 
> it evaluates to non-numerical values?
>
> Bobby
>
> On Thu, 07 Jul 2011 06:31:38 -0500, Ted Sariyski 
> <tsariysk at craft-tech.com> wrote:
>
>> Hi,
>> I need  a numerical solution for a system of equations which involve
>> numerical integrals. For one parameter the equation would be:
>>
>> f[a]==g[a]
>>      where
>> f[a_]:=NIntegrate[h[x, a] , {x, x1, x2}]
>>
>> NSolve returns: "The integrand  has evaluated to non-numerical values".
>>
>> Is there a built-in procedures for this type of problems or I need to
>> make explicit iterations?
>>
>> Thanks in advance,
>> --Ted
>>
>>
>>
>>
>>
>
>



  • Prev by Date: Re: Bug 1+4/10
  • Next by Date: Re: Contour ColorFunction in a ParametricPlot
  • Previous by thread: How to NSolve equation which involves NIntegrate?
  • Next by thread: Re: How to NSolve equation which involves NIntegrate?