Re: [R] Problem with uniroot.all

2013-12-26 Thread Duncan Murdoch
On 13-12-26 6:26 AM, Aurélien Philippot wrote: Dear R experts, I am trying to find all the solutions of an equation. Here is an example: integrand1<- function(x){1/x*dnorm(x)} integrand2<- function(x){1/(2*x-50)*dnorm(x)} integrand3<- function(x,C){ cd<- 1/(x+C) return(cd) } res<- funct

[R] Problem with uniroot.all

2013-12-26 Thread Aurélien Philippot
Dear R experts, I am trying to find all the solutions of an equation. Here is an example: integrand1<- function(x){1/x*dnorm(x)} integrand2<- function(x){1/(2*x-50)*dnorm(x)} integrand3<- function(x,C){ cd<- 1/(x+C) return(cd) } res<- function(C){ ce<-integrate(integrand1, lower=1, upper=