Q:

Calculate the Bromwich Integral (Inverse Laplace Transform)

How can I calculate the Bromwich Integral in Mathematica? If I enter this as code it gives me just the same:
$$\frac{1}{2\pi i}\int_{\alpha-\infty i}^{\alpha+\infty i} \left(e^{st}\cdot F_{(s)}\right) \text{d}s$$
As example:
I want to calculate the inverse laplace transform of $\frac{c}{s}$:
$$\frac{1}{2\pi i}\int_{\alpha-\infty i}^{\alpha+\infty i} \left(e^{st}\cdot \frac{c}{s}\right) \text{d}s$$
Than it gives me the same back, maybe I've to set some conditions to my code?
My code:
Integrate[Exp[s*t]*(c/s), {s, a - Infinity*I, a + Infinity*I}]/(2*Pi*I)

The Bromwich Integral: http://mathworld.wolfram.com/BromwichIntegral.html

A:

This is decidedly not a general answer, but let's play a bit. If we do
expr = Integrate[Exp[s t] c/s
  , {s, a - b I, a + b I}
  , Assumptions -> {a > 0, b > a, c ∈ Reals, t ∈ Reals}]/(2*π*I)

this yields
ConditionalExpression[
 -((I c (-ExpIntegralEi[(a - I b) t] + ExpIntegralEi[(a + I b) t]))/(2 π))
 , t >= 0]

We of course need to choose a > 0 because the vertical contour that we integrate along needs to be to the right of any poles in the function we are integrating. In this case, there is a pole at 0. I am using b > a > 0 because I find it doubtful that Mathematica knows how to integrate the thing along the entire vertical contour: in fact, if you try it, Mathematica says that the integral does not converge (which is not surprising! - we are in some sense trying to compute a principle value integral). Finally, of course t needs to be non-negative. We knew this already from the definitions of the Laplace transform and inverse Laplace transform.
In any case, we can now set a to anything positive we want, so let's consider the following:
Limit[expr /. {a -> 1, t -> #}] & /@ {1, 5, 0.4, 100}
(* {c, c, 1. c, c} *)

which of course suggests that the expression is equal to c.
In general, if the integral of your function f[s] can actually be evaluated, then I would do
Integrate[Exp[s t] f[s]
  , {s, a - b I, a + b I}
  , Assumptions -> {a > 0, b > a, t >= 0}]/(2*π*I)

and play around with the results. I do not think this will work very often, however. In addition, if it does spit back a solution, the functions that it yields are likely to have branch cuts that you have to worry about. I think that symbolic complex integration with computers is hard.

If you try
Integrate[1/(2 \[Pi] I) Exp[s t] 1/(1 + s^2), {s, a - b I, a + b I}, Assumptions -> {a > 0, b > a, t >= 0}]

you get back something with Gamma functions and Log functions evaluated at imaginary inputs. If you let a -> 2 and try taking the Limit as b -> Infinity with integer of t, eventually you get an expression that will ExpToTrig to Sin[t] while spitting out errors that you might need to be concerned about. (Nonetheless, that's the right answer).

A:

I think one possible issue is that e.g. a+Infinity*I becomes just DirectedInfinity[I] because the "finite" part gets swallowed. You can rewrite in such a way that this does not happen.
Integrate[
 Exp[(s*I + a)*t]*(1/(s*I + a)), {s, - Infinity, Infinity}, 
 Assumptions -> Element[{a, t}, Reals]]

(* Out[246]= ConditionalExpression[
 E^(a t) (\[Pi] (Cosh[a Abs[t]] Sign[t] - Sinh[a Abs[t]]) + 
    I CosIntegral[-I a Abs[t]] (Cosh[a Abs[t]] - 
       Sign[t] Sinh[a Abs[t]]) + 
    I CosIntegral[
      I a Abs[t]] (-Cosh[a Abs[t]] + Sign[t] Sinh[a Abs[t]])), a != 0] *)

