Double Integration (in Double Laplace Inversion) in R

随声附和 提交于 2020-01-24 13:12:07

问题


I obtained an error message 'the integral is probably divergent'. I think that the integration process breaks in F_3 but I do not know exactly why. Will be great to learn perform such double integrations in R. For those who are interested, I am trying to perform double laplace inversion with Bromwich contours.

#  Bromwich inversion integral

        # Laplace transform of f(x,y) with parameters s and t respectively. 
        F <- function(s,t) {1/((s+3)*(t+3))}

        b <- 1.45

        F_1 <- function(x,t,u) {Re(F(complex(real=b, imaginary=u),t))*cos(u*x)}
        F_2 <- function(x,t) {2*exp(b*x)/pi*integrate(F_1, lower=0, upper=Inf, x=x, t=t, subdivisions=10000)$value}

        F_3 <- function(x,y,w) {Re(F_2(x, complex(real=b, imaginary=w)))*cos(w*y)}
        f2 <- function(x,y) {2*exp(b*y)/pi*integrate(F_3, lower=0, upper=Inf, x=x, y=y, subdivisions=10000)$value}

        # Original function
        f1 <- function(x,y) {exp(-3*(x+y))}

来源:https://stackoverflow.com/questions/17479235/double-integration-in-double-laplace-inversion-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!