Inverse Laplace transform of a function involving Gaussian

127 Views Asked by At

$F(s) = \cfrac{F_0(s+a)}{1-a F_0(s+a)} $

where $F_0(s)$ is Laplacian transform, given by:
$F_0(s) = \mathcal{L}[\exp(-t^2 \beta)] $, and
$\beta$ and $a$ are real numbers

I am interested in inverse Laplace transform ($\mathcal{L}^{-1}[F(s)]$) of $F(s)$.

As I understand, solving this analytically is probably impossible. Numerical solutions are welcome, I have tried standard packages in Matlab but haven't had success. Codes in python, fortran evaluating inverse Laplace transform will be great. Any other suggestion is welcome! Thanks in advance.

1

There are 1 best solutions below

0
On

Making using of \begin{align} F_0(s)=\mathcal{L}\left\{\exp{\left(-t^2\beta\right)} \right\}=\frac{\sqrt{\pi}}{2\sqrt{\beta}}\exp{\left(\frac{s^2}{4\beta}\right)}\text{Erfc}\left(\frac{s}{2\sqrt{\beta}}\right)\,, \end{align} the python code below gives a numerical solution to your problem:

import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp
from mpmath import *

def F0(s,b):
    x = s/(2*mp.sqrt(b))
    return mp.exp(x**2)*mp.erfc(x)*np.sqrt(np.pi/b)/2

def F(s,a,b):
    return F0(s+a,b)/(1-a*F0(s+a,b))

mp.dps = 30
def fnum(t,a,b):
    ft = lambda s: F(s,a,b)
    return invertlaplace(ft,t,method='dehoog')

t = np.linspace(0.05,3,30)

a1=1
a2=3
b1=2

fig, ax = plt.subplots()
ax.plot(t,[fnum(i,a1,b1) for i in t],'g',lw=1,marker='o',label='$a=1$, $b=2$')
ax.plot(t,[fnum(i,a2,b1) for i in t],'r',lw=1,marker='o',label='$a=3$, $b=2$')
ax.set(xlabel=r'$t$', ylabel=r'$f(t)$') 
ax.legend()

enter image description here