[R] solve integrate(,..) varying limits of integration
Tonja Krueger
tonja.krueger at web.de
Tue Sep 14 09:15:30 CEST 2010
Dear List,
Is there a way to solve
integrate(func.1,x, Inf) $value =0.05
by varying the lower limit of integration (x in the example above)?
So far I got:
r<- 0.730163
s<--2
func.1<- function(t) {1/(2*pi*sqrt(1-r^2))*exp(-1/(2*(1-r^2))*(s^2-2*r*s*t+t^2))}
I can change the lower limit manually, like:
integrate(func.1, -2.5, Inf) $value
[1] 0.05053265
integrate(func.1, -2.4, Inf) $value
[1] 0.04942731
integrate(func.1, -2.45, Inf) $value
[1] 0.05000923
but this is very time-consuming. So I was wondering if there is a better, preferably an automated way to solve the equation?
Thanks,
Tonja
___________________________________________________________
Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02
More information about the R-help
mailing list