similar to: Integrating functions in R

Displaying 20 results from an estimated 10000 matches similar to: "Integrating functions in R"

2013 Dec 04
1
calcular la integral indefinida (primitiva) de una función respecto un parámetro
Hola a todos Me gustaría calcular la integral indefinida (primitiva) de una función respecto un parámetro. Al estilo de lo que hace la función D, pero al reves > s <- expression(5*x^2+2 ) > D(s,"x") 5 * (2 * x) Con integrate hay que indicar a la fuerza los límites de la integral, y con Ryacas no funciona nada, ya que no se conecta a su ip ¿Conocéis alguna forma? Saludos
2009 Oct 27
3
Sobre funciones
Un saludo cordial para cada uno. Les agradecería una ayuda con lo siguiente: Debo trabajar con una función de varias variabes, digamos f(x,y,z). ¿Cómo definir la función para usarla luego con ''integrate'' de forma tal que pueda fijar dos valores, ''y'' y ''z'', por ejemplo, e indicar los límites de integración para la variable que queda libre?
2005 Apr 07
1
complex tangent (PR#7781)
Full_Name: Peter Fortini Version: 2.0.1 OS: Windows 2000 Submission from: (NULL) (65.246.187.164) When the imaginary part of the argument is very large, the complex tangent function returns 0+NaNi. For example, tan(1+1000i)=0+NaNi; it should be 0+1i Easy to fix in complex.c, as the original NaN came from division of sinh and cosh that had reached machine infinity. static void z_tan(Rcomplex
2010 Sep 21
3
bivariate vector numerical integration with infinite range
Dear list, I'm seeking some advice regarding a particular numerical integration I wish to perform. The integrand f takes two real arguments x and y and returns a vector of constant length N. The range of integration is [0, infty) for x and [a,b] (finite) for y. Since the integrand has values in R^N I did not find a built-in function to perform numerical quadrature, so I wrote my own after
2009 Jul 13
1
R in rearranging equations
Hi, can anyone tell me if R can be used to rearrange very complicated equations in terms of one of the variables? I have: dx/dt = a*b*m*y*(1-x)-r*x and, having set: dy/dx = 0, need to rearrange in terms of x. The problem I have is that I don't know how to rearrange equations when the variables are not yet defined (I get messages warning me that x etc can't be found). I'm not sure
2009 Jan 05
2
help me
Hello, I am a student and I working with R. I want to ask you how to solve this integral which is shown in image attach with this letter. And how to draw this function z = 4 ? x2 ? y2 , width intervals x = ?1, y = ?1. Thank You. Yours sincerely, Jolanta
2010 May 05
1
testInstalledBasic question
Hi, I'm currently in the process of writing an R-installation SOP for my company. As part of that process I'm using the recommendations from the 'R Installation and Administration' document, section 3.2, "Testing an installation". This is done on an XP machine, using the latest binary of 2.11.0. The binary is downloaded and then installed from the installer. I then
2009 Oct 01
2
Treating variables as symbols
Hey, I'm trying to find how to perform operations with a variable treated as a symbol. For, an extremely simple, example I want to integrate a*x with respect to x and I want to find the indefinite integral of this, (a*x^2/2), or the definite integral with some interval for x. Another example of such a use would be to create a function y<-function(x) {a*x} and by typig y(2) I would get the
2017 Sep 19
2
symbolic computing example with Ryacas
Hi all, I am trying to implement the following matlab code with Ryacas : syms U x x0 C d1=diff(U/(1+exp(-(x-x0)/C)),x); pretty(d1) d2=diff(U/(1+exp(-(x-x0)/C)),x,2); pretty(d2) solx2 = solve(d2 == 0, x, 'Real', true) pretty(solx2) slope2=subs(d1,solx2) I have tried the following : library(Ryacas) x <- Sym("x");U <- Sym("U");x0 <-
2007 Sep 03
2
Derivative of a Function Expression
Hi I am currently (for pedagogical purposes) writing a simple numerical analysis library in R. I have come unstuck when writing a simple Newton-Raphson implementation, that looks like this: f <- function(x) { 2*cos(x)^2 + 3*sin(x) + 0.5 } root <- newton(f, tol=0.0001, N=20, a=1) My issue is calculating the symbolic derivative of f() inside the newton() function. I cant seem to get R to
2011 May 29
1
Hello!
Hi, I'm a student studing for Math. & Infor. Ing. in Tirana,Albania and a have a final project in R to finish in a week, so I badly need your help... The topic of the project is "Hermite Interpolation" and a I have allready done a script that finds the approximation in a certan point x, H(x) ~f(x) but i want to find the value of his derivative H'(x)~f'(x) as well and to
2017 Sep 19
1
symbolic computing example with Ryacas
Thanks for the response. Yes, I did study the vignette but did not understand it fully. Anyway, I have tried once again now. I am happy to say that I have got what I wanted. library(Ryacas) x <- Sym("x");U <- Sym("U");x0 <- Sym("x0");C <- Sym("C") my_func <- function(x,U,x0,C) { return (U/(1+exp(-(x-x0)/C)))} FirstDeriv <-
2010 Dec 16
3
Integrate two function in R
Hello I have two function in R like g(x)=2x-3 and s(x)=5x^2+2 and I want to find the integrafl of the g(x)*s(x) inside the interval of [a,b] Could you please help me find the proper function? I would like to thank you in advance for your help Regards Alex [[alternative HTML version deleted]]
2013 Aug 01
2
Integrales, limites
Cordial saludo quiero saber como calculo integrales impropias e indefinidas en R, y como calcular limites soy nuevo en R Muchas gracias Harvey Vargas "El verdadero perdedor no es aquél que no gana. El verdadero perdedor es aquél que tiene tanto miedo a no ganar que ni siquiera lo intenta". Alan Arkin [[alternative HTML version deleted]]
2017 Sep 19
0
symbolic computing example with Ryacas
Have you studied the "Introduction to Ryacas" vignette that come with the package? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Sep 19, 2017 at 2:37 AM, Vivek Sutradhara <viveksutra at gmail.com> wrote:
2007 Aug 03
2
Saving an expression to a file
Dear Friends. I have a very long expression and I use function D to find its derivative, which will be even longer. I save the resulting expression in a variavle, say bbb. But when I tried to display bbb on the screen, the R screen is not long enough for me to view it. Is there a way to save the expression to a file? Best Wishes Yuchen Luo [[alternative HTML version deleted]]
2011 Jan 25
3
Integration of two lines
Hello, I need to integrate the absolute difference between two lines measured on different points. # For example : x <- seq(0, 1, 1/100) f_x <- runif(101) + x y <- seq(0, 1, 1/23) f_y <- runif(24) + (1 - y) plot(x, f_x, type="l") lines(y, f_y) Then I would like to compute Integral( | f_x - f_y | )dx. (This is not the same as | Integral(f_x)dx - Integral(f_y)dx |.)
2006 Aug 30
1
setMethod() and log()
Hi I am having difficulty with setMethod(). I have a "brob" class of objects whose representation has two slots: "x" and "positive". Slot "x" (double) holds the log of a number and slot "positive" (logical) its sign. The idea is that large numbers can be handled. I'm trying to implement a log() method using an analogue of the
2009 Jul 22
2
Automatic differentiation in R
Hi I recently gave a presentation about Automatic Differentiation (AD) and R at the Eighth Euro AD Workshop in Oxford (17/07/09). The presentation was intended as a general introduction to R and the desire for a generic AD interface for R. During the presentation I emphasised the need and the high level of interest that the R community has in developing such an interface and that input from the
2011 Jun 18
1
double integral calculation
a=[0.1,0.2,0.1,0.3,0.4] b=[0.2,0.3,0.1,0.2,0.5] c=[1,1,1,1,1] log(c+a-x*b) where x=unknown scale variable. int=$$log(c+a-x*b)dadb, where $ denotes integral sign. Actually, how could I calculate the integral's approximation? double summation? best, moohwan