Skip to content
Prev 334561 / 398502 Next

Problem to solve an integral equation

On Dec 17, 2013, at 8:53 AM, Aur?lien Philippot wrote:

            
Error: unexpected ')' in:
"integrand<- function(C,x){-((100000*x)^(-1)-(1000*x+C)^(-1))*
1/(0.20*sqrt(2*pi))*exp(-0.5*(x-0.10)/(0.20))^2)"

Taking out the last parenthesis resulted in a variety of error messages including:
Error in integrate(integrand, C = C, lower = 0, upper = Inf) : 
  extremely bad integrand behaviour
Error in integrate(integrand, C = C, lower = 0, upper = Inf) : 
  the integral is probably divergent
Generally these problems are solved with the use of something along the lines of 

    sapply( seq(...), output)  # across an appropriate domain

Or using the `Vectorize` function.

But since you did not supply tested code for the integrand, I am not proceeding further.

-- 
david.