# laplace

Laplace transform

## Syntax

`laplace(f,trans_var,eval_point)`

## Description

`laplace(f,trans_var,eval_point)` computes the Laplace transform of `f` with respect to the transformation variable `trans_var` at the point `eval_point`.

## Input Arguments

 `f` Symbolic expression, symbolic function, or vector or matrix of symbolic expressions or functions. `trans_var` Symbolic variable representing the transformation variable. This variable is often called the "time variable". Default: The variable `t`. If `f` does not contain `t`, then the default variable is determined by `symvar`. `eval_point` Symbolic variable or expression representing the evaluation point. This variable is often called the "complex frequency variable". Default: The variable `s`. If `s` is the transformation variable of `f`, then the default evaluation point is the variable `z`.

## Examples

Compute the Laplace transform of this expression with respect to the variable `x` at the evaluation point `y`:

```syms x y f = 1/sqrt(x); laplace(f, x, y)```
```ans = pi^(1/2)/y^(1/2)```

Compute the Laplace transform of this expression calling the `laplace` function with one argument. If you do not specify the transformation variable, `laplace` uses the variable `t`.

```syms a t y f = exp(-a*t); laplace(f, y)```
```ans = 1/(a + y)```

If you also do not specify the evaluation point, `laplace` uses the variable `s`:

`laplace(f)`
```ans = 1/(a + s)```

Compute the following Laplace transforms that involve the Dirac and Heaviside functions:

```syms t s laplace(dirac(t - 3), t, s)```
```ans = exp(-3*s)```
`laplace(heaviside(t - pi), t, s)`
```ans = exp(-pi*s)/s```

If `laplace` cannot find an explicit representation of the transform, it returns an unevaluated call:

```syms f(t) s F = laplace(f, t, s)```
```F = laplace(f(t), t, s)```

`ilaplace` returns the original expression:

`ilaplace(F, s, t)`
```ans = f(t)```

The Laplace transform of a function is related to the Laplace transform of its derivative:

```syms f(t) s laplace(diff(f(t), t), t, s)```
```ans = s*laplace(f(t), t, s) - f(0)```

Find the Laplace transform of this matrix. Use matrices of the same size to specify the transformation variable and evaluation point.

```syms a b c d w x y z laplace([exp(x), 1; sin(y), i*z],[w, x; y, z],[a, b; c, d])```
```ans = [ exp(x)/a, 1/b] [ 1/(c^2 + 1), 1i/d^2]```

When the input arguments are nonscalars, `laplace` acts on them element-wise. If `laplace` is called with both scalar and nonscalar arguments, then `laplace` expands the scalar arguments into arrays of the same size as the nonscalar arguments with all elements of the array equal to the scalar.

```syms w x y z a b c d laplace(x,[x, w; y, z],[a, b; c, d])```
```ans = [ 1/a^2, x/b] [ x/c, x/d]```

Note that nonscalar input arguments must have the same size.

When the first argument is a symbolic function, the second argument must be a scalar.

```syms f1(x) f2(x) a b f1(x) = exp(x); f2(x) = x; laplace([f1, f2],x,[a, b])```
```ans = [ 1/(a - 1), 1/b^2]```

expand all

### Laplace Transform

The Laplace transform is defined as follows:

$F\left(s\right)=\underset{0}{\overset{\infty }{\int }}f\left(t\right)\text{\hspace{0.17em}}{e}^{-st}dt.$

### Tips

• If you call `laplace` with two arguments, it assumes that the second argument is the evaluation point `eval_point`.

• If `f` is a matrix, `laplace` acts element-wise on all components of the matrix.

• If `eval_point` is a matrix, `laplace` acts element-wise on all components of the matrix.

• To compute the inverse Laplace transform, use `ilaplace`.