# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# laplace

Laplace transform

## Syntax

`laplace(f)laplace(f,transVar)laplace(f,var,transVar)`

## Description

`laplace(f)` returns the Laplace transform of `f` using the default independent variable `t` and the default transformation variable `s`. If `f` does not contain `t`, `laplace` uses `symvar`.

`laplace(f,transVar)` uses the specified transformation variable `transVar` instead of `s`.

`laplace(f,var,transVar)` uses the specified independent variable `var` and transformation variable `transVar` instead of `t` and `s` respectively.

## Input Arguments

 `f` Symbolic expression, symbolic function, or vector or matrix of symbolic expressions or functions. `var` Symbolic variable representing the independent 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`. `transVar` Symbolic variable or expression representing the transformation variable. This variable is often called the "complex frequency variable". Default: The variable `s`. If `s` is the independent variable of `f`, then the default transformation variable is the variable `z`.

## Examples

Compute the Laplace transform of this expression with respect to the variable `x` for the transformation variable `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 independent 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 transformation variable, `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 independent variables and transformation variables.

```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]```

collapse 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 `f` is a matrix, `laplace` acts element-wise on all components of the matrix.

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

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