laplace

constexpr Complex laplace(Complex (*f)(Complex), const Complex &z, const Complex &a = 1) noexcept

Performs the Laplace integral transform [1] of a complex function.

Parameters

Complex (*f)(Complex)

A complex function.

const Complex &z

A complex number.

const Complex &a

A complex number, optional.

Returns

type Complex

A complex number.

The Laplace transform performs the following integral transform on a function \(f\):

\[\mathcal{L}\{f\}(z) = \int_{0}^{\infty}f(t)e^{-zt}dt\]

Example

auto fn = [](Complex t) { return sin(t); };


Complex z = 1;
std::cout << laplace(fn, z) << "\n";

Output:

0.501173 + 0j // True result: 1 / (z^2 + a^2) = 0.5 + 0j

References