search for: int_0

Displaying 15 results from an estimated 15 matches for "int_0".

Did you mean: int80
2009 Dec 11
2
Regularized gamma function/ incomplete gamma function
Dear all, I would be very grateful if you could help me with: Given the regularized gamma function Reg=int_0^r (x^(k-1)e^(-x))dx/int_0^Inf (x^(k-1)e^(-x))dx ; 0<r<Inf (which is eventually the ratio of the Incomplete gamma function by the gamma function), does anyone know of a package in R that would evaluate the derivative of the inverse of Reg with respect to k? I am aware that the function "R...
2011 Dec 10
2
efficiently finding the integrals of a sequence of functions
...f defined by f<-function(x,y,z) c(x,y^2,z^3) Thus, f is actually corresponding to three uni-dimensional functions f_1(x)=x, f_2(y)=y^2 and f_3(z)=z^3. What I am looking for are the integrals of these three functions f_1,f_2,f_3 over some interval, say, (0,1). More specifically, the integrals \int_0^1 f_1(x) dx, \int_0^1 f_2(y) dy and \int_0^1 f_3(z) dz. For this simple example, of course we can do these three integrals one by one using integrate (f_1, lower=0, upper=1) However, in practice, I have a sequence of 5000 uni-dimensional functions and hope to find all of their integrals (over s...
2008 Sep 27
3
Double integration - Gauss Quadrature
Hi, I would like to solve a double integral of the form \int_0^1 \int_0^1 x*y dx dy using Gauss Quadrature. I know that I can use R's integrate function to calculate it: integrate(function(y) { sapply(y, function(y) { integrate(function(x) x*y, 0, 1)$value }) }, 0, 1) but I would like to use Gauss Quadrature to do it. I have written the following code...
2020 Apr 30
2
Use of MathJax (or something similar) in .Rd files
...or those interested, I added this to the beginning of the \details{} section: \if{html}{\out{ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js"> </script> }} And then I can use: \if{html}{\out{\(B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\)}} or \if{html}{\out{\[B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\]}} to render the equation (inline or as 'displaymath'). I'll try to add MathJax locally next. Best, Wolfgang >-----Original Message----- >From: Duncan Murdoch [mailto:murdoch.duncan...
2020 May 05
1
Use of MathJax (or something similar) in .Rd files
...;beginning of the \details{} section: > >\if{html}{\out{ ><script id="MathJax-script" async >?? src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js"> ></script> >}} > >And then I can use: > >\if{html}{\out{\(B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\)}} > >or > >\if{html}{\out{\[B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\]}} > >to render the equation (inline or as 'displaymath'). I'll try to add MathJax >locally next. > >Best, >Wolfgang > >>-----Original Message-----...
2007 Feb 13
1
Multidimensional Integration over arbitrary sets
Hi, I need to integrate a 2D function over range where the limits depend on the other e.g integrate f(x,y)=x*y over {x,0,1} and {y,x,1}. i.e \int_0^1 \int_x^1 xy dydx I checked adapt but it doesn't seem to help here. Are they any packages for this sort of thing? I tried RSitesearch but couldn't find the answer to this. Many thanks for you help. Regards Saptarshi Saptarshi Guha | sapsi@pobox.com | http://www.stat.purdue.edu/~sg...
2020 Apr 30
0
Use of MathJax (or something similar) in .Rd files
...or those interested, I added this to the beginning of the \details{} section: \if{html}{\out{ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js"> </script> }} And then I can use: \if{html}{\out{\(B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\)}} or \if{html}{\out{\[B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\]}} to render the equation (inline or as 'displaymath'). I'll try to add MathJax locally next. Best, Wolfgang >-----Original Message----- >From: Duncan Murdoch [mailto:murdoch.duncan...
2003 Mar 06
2
question about model formula
...having some difficulty getting a model specified for nls though. The math for the model that I want to fit is dg(t)/dt = K1 f(t) - k2 g(t) where g(t) and f(t) are measured data at a sequence of times t. K1 and k2 are the parameters of the model. If I solve this, the solution is g(t) = K1 \int_0^t f(t') \exp(-k2(t-t')) dt' and I'm not sure how to write a formula in R that I can pass to nls that will handle both the implicit loop over the data values of t and the interpolation and numeric integration over t'. Can anyone help me to get this properly coded for R? Mike...
2013 Apr 09
1
Solving an integral in R gives the error “The integral is probably divergent”
I am trying to solve an integral in R. However, I am getting an error when I am trying to solve for that integral. The equation that I am trying to solve is as follows: $$ C_m = \frac{{abs{x}}e^{2x}}{\pi^{1/2}}\int_0^t t^{-3/2}e^{-x^2/t-t}dt $$ [image: enter image description here] The code that I am using is as follows: a <- seq(from=-10, by=0.5,length=100) ## Create a function to compute integrationCfun <- function(XX, upper){ integrand <- function(x)x^(-0.5)*exp((-XX^2/x)-x) integrated <-...
2012 May 23
1
numerical integration
Greetings, Sorry, the last message was sent by mistake! Here it is again: I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the code below we compute the matrix $A_{i,j}$, $1\leq i,j\leq 5$, numerically and check against the known analytic values. When I run this code most components of A are correct, but some are zero. I get the following output...
2020 Apr 30
2
Use of MathJax (or something similar) in .Rd files
Interesting. I gave this a try, but couldn't make this work. One would have to infuse something like <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js"> </script> or <script id="MathJax-script" async src="<url-to-your-site>/mathjax/tex-chtml.js"> </script> into
2012 May 23
0
numerical integrals
Greetings,   I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the code below we compute the matrix $A_{i,j}$, $1\leq i,j\leq 5$, numerically and check against the known analytic values.   When I run this code most components of A are correct, but some are zero. I get the following outpu...
2010 Jan 28
1
AFT-model with time-varying covariates and left-truncation
Dear Prof. Brostr?m, Dear R-mailinglist, first of all thanks a lot for your great effort to incorporate time-varying covariates into aftreg. It works like a charm so far and I'll update you with detailled benchmarks as soon as I have them. I have one more questions regarding Accelerated Failure Time models (with aftreg): You mention that left truncation in combination with time-varying
2015 Apr 09
3
typo in R-exts.html section 6.9
In 'Writing R Extensions' section 6.9 there is the paragraph There are interfaces (defined in header R_ext/Applic.h) for definite and for indefinite integrals. ?Indefinite? means that at least one of the integration boundaries is not finite. An indefinite integral usually means an antiderivative, not an integral over an infinite spread. Should that first sentence end with 'for
2008 Oct 15
0
R-help Digest, Vol 67, Issue 31
...ration - Gauss Quadrature To: r-help at stat.math.ethz.ch Message-ID: <gbrek1$64m$1 at ger.gmane.org> "Susanne Pfeifer" <tiffy at tiffy.it> wrote in message news:48DE3BE0.5020200 at tiffy.it... > Hi, > > I would like to solve a double integral of the form > > \int_0^1 \int_0^1 x*y dx dy > > using Gauss Quadrature. OK, I felt guilty for using a for loop, so here's something that should be close to what you want using sapply: library(statmod) N <- 5 GL <- gauss.quad(N) nodes <- GL$nodes weights <- GL$weights gauss_legendre2D <- fun...