034IN "Fundamentals of Automatic Control" - Introduction to MATLAB
Part 4L-1 - The Laplace Transform
Introduction
In this live script, we illustrate how to use the Matlab Symbolic Toolbox to determine the Laplace transform of a causal function of time
and the inverse Laplace transform corresponding to a given rational, strictly proper or simply proper function
of the complex variable s. The importance of managing the Laplace transform will soon become clear (refer to Part 2 of the class material)!
Please refer also to the LAPLACE_TRANSFORM document in the MS Teams course file repository. What you will learn:
- How to compute the Laplace transform and the inverse transform using the Symbolic Math Toolbox.
- What are the Laplace transform main properties and theorems.
The Laplace Transform
Introduction and Motivations
What is a transform?
- A mapping of a mathematical function from one domain to another.
- A change in perspective, not a change of the function.
Why use transforms?
- Some mathematical problems are difficult to solve in their natural domain.
- Transform to and solve in a new domain, where the problem is simplified.
- Solved the problem in the new domain, transform the solution back into the original domain.
- Trade off the extra effort of transforming/inverse-transforming for simplification of the solution procedure.
- An example: the phasor method.
So, what is the Laplace transform?
- An integral transform mapping functions from the time domain to the Laplace domain or s-domain.
- Time-domain functions are functions of time t.
- Laplace-domain functions are functions of the complex frequency s
Motivations
We’ll use Laplace transforms to solve differential equations and integro-differential equations.
Examples:
[refer to the class material Part 2, pp. 28-30] 
- Differential and integro-differential equations in the time domain: they can be difficult to solve.
- Apply the Laplace transform: transform to the s-domain.
- Differential and integro-differential equations become algebraic equations: easy to solve!
- Transform the s-domain solution back to the time domain.
Causal Functions
- We are interested in functions in the time domain
defined for t ≥ 0, assuming they are null for all negative times, i.e 
- Time domain functions that have this property are called causal functions.
Example: The Heaviside Function
This is the first example of a causal function:
The Heaviside function is defined in the Symbolic Math Toolbox and it corresponds to the MATLAB function heaviside.
Pay attention: by default, the definition of this function in the Symbolic Math Toolbox is different:
disp(heaviside(sym([-10, -1/10000, 0, +1/10000, 10])))
tVALs = (-2:1e-2:2); % refer to Part 3 of "Introduction to MATLAB"
plot(tVALs, heaviside(sym(tVALs)), 'LineStyle', 'none', 'Marker','o', 'MarkerSize', 6, ...
'MarkerEdgeColor','r', 'MarkerFaceColor','r')
grid on; xlabel('time t [s]'); ylabel('f(t)');
title('Heaviside Function')
To adapt the Heaviside function, we have to modify the toolbox configuration preferences, as follows:
sympref('HeavisideAtOrigin', 1); % forcing the setting for the Heaviside function
disp(heaviside(sym([-10, -1/10000, 0, +1/10000, 10])))
Now the behavior of the Heaviside function is in accordance with the definition
. plot(tVALs, heaviside(sym(tVALs)), 'LineStyle', 'none', 'Marker','o', 'MarkerSize', 4, ...
'MarkerEdgeColor','b', 'MarkerFaceColor','b')
grid on; xlabel('time t [s]'); ylabel('f(t)');
title('Heaviside Function')
Another Example
Usually we will use the Heaviside function
to emphasize that we are considering a causal function: How do you do this in MATLAB?
f_causal(t) = 3*sin(4*t+pi/3)*heaviside(t)
f_causal(t) =

plot(tVALs, f_causal(sym(tVALs)), 'LineStyle', 'none', 'Marker','o', 'MarkerSize', 4, ...
'MarkerEdgeColor','g', 'MarkerFaceColor','g')
grid on; xlabel('time t [s]'); ylabel('f(t)');
title('A Causal Function')
The Unilateral or One-Sided Laplace Transform
Definition
Given a causal function
, the Laplace transform of
is the function
defined by for those
for which the integral makes sense. - F is a complex-valued function of complex numbers;
- s is called the (complex) frequency variable, with units
; t is called the time variable (meas. units
); - the lower limit of integration is
: the transform is called the unilateral or one-sided Laplace transform. - Common notation convention: lower case letter denotes the time-domain function
; capital letter denotes its Laplace transform 
Existence
Which class or classes of functions possess a Laplace transform?
- Fact 1:
is continuous for
; if not,
must contain no impulses at
. - Fact 2: any continuous, bounded, causal function
admits Laplace transform. - Fact 3: any piecewise continuous, causal function
admits Laplace transform.
Piecewise continuous function ⟺ jump discontinuities and no vertical asymptotes.
Examples:
The function defined by
is piecewise continuous on
. f_pc(t) = symfun(piecewise( (0<=t & t<=1), t^2, ...
tVALs = (0:1e-3:3); % 3001 values in [0, 3]
plot(tVALs, f_pc(sym(tVALs)), 'LineStyle','none', 'Marker','square',...
'MarkerSize',4, 'MarkerFaceColor','b', 'MarkerEdgeColor','b');
xlabel('time t [s]'); ylabel('f_{pc}(t)');
title('A Piecewise Continuous Function')
The function defined by
is NOT piecewise continuous on
. f_Npc(t) = symfun(piecewise( (0<=t & t<=2), 1/(2-t), ...
plot(tVALs, f_Npc(sym(tVALs)), 'LineStyle','-',...
'Color', 'm', 'LineWidth', 3);
xlabel('time t [s]'); ylabel('f_{Npc}(t)');
title('A NOT Piecewise Continuous Function')
For details on the commands symfun and piecewise, refer to
help piecewise
--- help for sym/piecewise ---
sym/piecewise - Conditionally defined expression or function
This MATLAB function returns the piecewise expression or function pw
whose value is val1 when condition cond1 is true, is val2 when cond2 is
true, and so on.
Syntax
pw = piecewise(cond1,val1,cond2,val2,...)
pw = piecewise(cond1,val1,cond2,val2,...,otherwiseVal)
Input Arguments
cond - Condition
symbolic condition | symbolic variable
val - Value when condition is satisfied
number | vector | matrix | multidimensional array |
symbolic number | symbolic variable | symbolic vector |
symbolic matrix | symbolic multidimensional array |
symbolic function | symbolic expression
otherwiseVal - Value if no conditions are true
number | vector | matrix | multidimensional array |
symbolic number | symbolic variable | symbolic vector |
symbolic matrix | symbolic multidimensional array |
symbolic function | symbolic expression
Output Arguments
pw - Piecewise expression or function
symbolic expression | symbolic function
Examples
Define and Evaluate Piecewise Expression
Define Piecewise Function
Set Value When No Condition Is True
Plot Piecewise Expression
Assumptions and Piecewise Expressions
Differentiate, Integrate, and Find Limits of Piecewise Expression
Elementary Operations on Piecewise Expressions
Extract Expressions and Conditions from Piecewise
Modify or Extend Piecewise Expression
Solve System of Equations with Piecewise Expressions
See also and, assume, assumeAlso, assumptions, if, in, isAlways, not, or
Introduced in Symbolic Math Toolbox in R2016b
Documentation for sym/piecewise
help symfun
symfun - Create symbolic functions
This MATLAB function creates the symbolic function f.
Syntax
f(inputs) = formula
f = symfun(formula,inputs)
f = symfun(fM)
Input Arguments
formula - Function body
symbolic expression | vector of symbolic expressions |
matrix of symbolic expressions
inputs - Input argument or arguments of function
symbolic variable | array of symbolic variables
fM - Symbolic matrix function to convert
symbolic matrix function
Output Arguments
f - Symbolic function
symfun object
Examples
Create and Define Symbolic Functions
Return Body and Arguments of Symbolic Function
Combine Two Symbolic Functions
Convert Symbolic Matrix Function to Symbolic Function
See also argnames, formula, matlabFunction, sym, syms, symvar
Introduced in Symbolic Math Toolbox in R2012a
Documentation for symfun
Remark on Laplace Transform and Impulses
- Indeed, it is possible to cope with impulses, but you have to modify the definition of the Laplace transform slightly.
- This topic is out of the scope of this course!
Examples of Laplace Transforms
Exponential Function
ft = exp(t)*heaviside(t);
Fs = laplace(ft, t, s)
Fs =

Unit Step Function - the Heaviside Function
Hs = laplace(ht, t, s)
Hs =

Important Remark: On Using the Heaviside Function Notation For Causal Functions
It means that
- You can avoid inserting the Heaviside function explicitly to mark a function as causal unless you are dealing with delayed causal functions.
ft1(t) = exp(t)*heaviside(t)
ft1(t) = 
ft2(t) = exp(t)
ft2(t) = 
Fs1 = laplace(ft1, t, s)
Fs1 =

Fs2 = laplace(ft2, t, s)
Fs2 =

Laplace Transforms Properties
Linearity
- The Laplace transform is linear.
- If
and
are any causal functions, for which the Laplace transform exists, and a is any scalar, we have
omogeneityL = laplace(a*f(t))
omogeneityL = 
omogeneityL = subs(omogeneityL, laplace(f(t)), F(s))
omogeneityL = 
superpositionl = laplace(f(t)+g(t), t, s);
superpositionl = subs(superpositionl, [laplace(f(t)), laplace(g(t))], [F(s), G(s)])
superpositionl = 
An example:
F(s) = laplace(f(t), t, s);
G(s) = laplace(g(t), t, s);
L(s) = laplace(3*f(t)+2*g(t), t, s)
L(s) =

L(s) = collect(L, s)
L(s) =

L(s) = simplify(L)
L(s) =

For details about the commands subs, collect, and simplify:
help sym/subs
subs - Symbolic substitution
This MATLAB function returns a copy of s, replacing all occurrences of
match with replacement, and then evaluates s.
Substitute Symbolic Scalar Variables and Functions
snew = subs(s,match,replacement)
snew = subs(s,replacement)
snew = subs(s)
Substitute Symbolic Matrix Variables and Functions
sMnew = subs(sM,matchM,replacementM)
sMnew = subs(sM,replacementM)
sMnew = subs(sM)
Input Arguments
s - Symbolic input
symbolic scalar variable | symbolic expression | symbolic equation |
symbolic function | symbolic array | symbolic matrix | structure
match - Scalar variable to substitute
symbolic scalar variable | symbolic function | symbolic expression |
symbolic array | cell array
replacement - New replacement value
number | symbolic number | symbolic scalar variable |
symbolic function | symbolic expression | symbolic array |
structure | cell array
sM - Symbolic input
symbolic matrix variable | symbolic matrix function |
symbolic expression | symbolic equation | symbolic condition
matchM - Matrix variable or function to substitute
symbolic matrix variable | symbolic matrix function |
symbolic expression | cell array
replacementM - New replacement value
number | symbolic number | symbolic matrix variable |
symbolic matrix function | symbolic expression | symbolic array |
cell array
Examples
Single Substitution
Default Substitution Variable
Evaluate Expression with New Values
Multiple Substitutions
Substitute Scalars with Arrays
Substitute Symbolic Scalar Variables in Structure Array
Substitute Multiple Scalars with Arrays
Substitutions in Equations
Substitutions in Functions
Substitute Variables with Corresponding Values from Structure
Substitution Involving First-Order and Second-Order Derivatives
Substitute Symbolic Matrix Variables with Arrays
Characteristic Polynomial of Matrix
Substitute Variables in Symbolic Matrix Function
Substitute Symbolic Matrix Variables and Matrix Functions in Equation
Evaluate Expression Involving Symbolic Matrix Variables
See also double, lhs, rhs, simplify, subexpr, vpa
Introduced in Symbolic Math Toolbox before R2006a
Documentation for subs
help sym/collect
sym/collect - Collect coefficients of identical powers
This MATLAB function collects the coefficients of identical powers of
the default variable in the symbolic input P.
Syntax
C = collect(P)
C = collect(P,expr)
Input Arguments
P - Input expression
symbolic expression | symbolic function | symbolic vector |
symbolic matrix
expr - Expression in terms of which you collect coefficients
symbolic number | symbolic variable | symbolic expression |
symbolic function | symbolic vector | string array |
character vector | cell array of character vectors
Examples
Collect Coefficients of Identical Powers of Default Variable
Collect Coefficients of Identical Powers of Specified Variable
Collect Coefficients in Terms of i and pi
Collect Coefficients in Terms of Symbolic Expressions and Functions
Collect Coefficients for Each Element of Matrix
Collect Coefficients in Terms of Function Calls
Collect Coefficients of Rational Function
See also combine, expand, factor, horner, numden, rewrite, simplify,
simplifyFraction, symvar
Introduced in Symbolic Math Toolbox before R2006a
Documentation for sym/collect
help sym/simplify
sym/simplify - Algebraic simplification
This MATLAB function performs algebraic simplification of expr.
Syntax
S = simplify(expr)
S = simplify(expr,Name=Value)
Input Arguments
expr - Input expression
symbolic expression | symbolic function | symbolic vector |
symbolic matrix
Name-Value Arguments
All - Option to return equivalent results
false (default) | true
Criterion - Simplification criterion
"default" (default) | "preferReal"
IgnoreAnalyticConstraints - Simplification rules
false (default) | true
Seconds - Time limit for the simplification process
Inf (default) | positive number
Steps - Number of simplification steps
1 (default) | positive number
Examples
Simplify Expressions
Simplify Matrix Elements
Get Simpler Results for Logarithms and Powers
Get Simpler Results Using More Simplification Steps
Get Equivalent Results for Symbolic Expression
Separate Real and Imaginary Parts
Avoid Imaginary Terms in Exponents
Simplify Units
Get Simpler Result by Expanding Expression
See also collect, combine, expand, factor, horner, numden, rewrite,
simplifyFraction, Simplify Symbolic Expression
Introduced in Symbolic Math Toolbox before R2006a
Documentation for sym/simplify
Transform of a Derivative
If the causal function
is continuous at
, then dot_f(t) = diff(f(t), 1); % the 1st derivative
Dot_F(s) = laplace(dot_f, t, s)
Dot_F(s) = 
Dot_F(s) = subs(Dot_F(s), laplace(f(t), t, s), F(s))
Dot_F(s) = 
An example:
f(t) = 2*(exp(t)-1); % causal symbolic function of time t
Let's verify the continuity of
at
: f0left = limit(f, t, 0, 'left')
f0right = limit(f, t, 0, 'right')
f(0) % the value of f(t) when t=0
F(s) = laplace(f, t, s) % Laplace transform of f(t)
F(s) =

dot_f(t) = diff(f,t,1) % the 1st derivative of f(t)
dot_f(t) = 
DotF(s) = laplace(dot_f(t), t, s) % the Laplace transform of dot_f
DotF(s) =

% the Laplace transform of the derivative of f(t)
DotF_ALT(s) = laplace(diff(f, t, 1), t, s)
DotF_ALT(s) =

% the Laplace transform, applying the derivative property "by hand"
DotF_ALT2(s) = collect( (s*F(s)-f(0)), s)
DotF_ALT2(s) =

For details about the command diff:
help diff
diff - Differences and approximate derivatives
This MATLAB function calculates differences between adjacent elements of
X.
Syntax
Y = diff(X)
Y = diff(X,n)
Y = diff(X,n,dim)
Input Arguments
X - Input array
vector | matrix | multidimensional array | table | timetable
n - Difference order
1 (default) | positive integer scalar | []
dim - Dimension to operate along
positive integer scalar
Output Arguments
Y - Difference array
scalar | vector | matrix | multidimensional array | table |
timetable
Examples
Differences Between Vector Elements
Differences Between Matrix Rows
Multiple Differences
Differences Between Matrix Columns
Approximate Derivatives with diff
Differences Between Datetime Values
See also gradient, prod, cumsum, sum
Introduced in MATLAB before R2006a
Documentation for diff
Other uses of diff
Higher-Order Derivatives
- Applying derivative formula twice yields
- A similar formula holds for the k-th order derivative
Examples:
syms f(t) dot_f(t) ddot_f(t)
dot_f(t) = diff(f, 1); % the 1st derivative
ddot_f(t) = diff(f, 2); % the 2nd derivative
Dot_F(s) = laplace(dot_f, t, s)
Dot_F(s) = 
DDot_F(s) = laplace(ddot_f, t, s)
DDot_F(s) =

Given the causal function
syms f(t) dot_f(t) ddot_f(t)
f(t) = 2*(exp(3*t)-1)
f(t) = 
dot_f(t) = diff(f, 1) % the 1st derivative
dot_f(t) = 
ddot_f(t) = diff(f, 2) % the 2nd derivative
ddot_f(t) = 
DDot_F(s) = laplace(ddot_f, t, s)
DDot_F(s) =

DDotF_ALT(s) = s^2*laplace(f, t, s)-s*f(0)-dot_f(0)
DDotF_ALT(s) =

collect(DDot_F, s)
ans(s) =

Transform of an Integral
Let
be the running integral of a causal function
: where
. An example:
assumptions
ans = 
F(s) = laplace(f, t, s)
F(s) =

g(t) = int(f(tau), tau, 0, t)
G(s) = simplify(laplace(g(t), t, s))
G(s) =

Multiplication by t
Let
be a causal function and define
. Then
, where 
Examples:
G(s) = laplace(g, t, s)
G(s) =

G_ALT = -diff(F, s, 1)
G_ALT(s) =

F1(s) = laplace(f1, t, s);
G1(s) = laplace(g1, t, s)
G1(s) =

G1_ALT = -diff(F1, s, 1)
G1_ALT(s) =

G1_ALT_ALT = -diff(-diff(F, s, 1), s, 1)
G1_ALT_ALT(s) =

Exponential Scaling (Frequency Shifting)
Let
be a causal function, with Laplace transform
, and let g(t) be defined as ( a is a scalar value) An example:
- given
then
f(t) = cos(omega*t)
f(t) = 
g(t) = exp(-t)*f(t)
g(t) = 
F(s) = laplace(f, t, s)
F(s) =

G(s) = laplace(g, t, s)
G(s) =

subs(F(s), omega, 1)
ans =

collect(subs(G(s), omega, 1))
ans =

Time Shifting (Time Delay)
- Let
be a causal function, with Laplace transform
. - Define the causal function
as
An example:
a = sym(2); % the first delay term
b = sym(5); % the second delay term
f(t) = heaviside(t-a)-heaviside(t-b)
f(t) = 
plot(tVALs, f(sym(tVALs)), 'LineStyle', 'none', 'Marker', 'square',...
'MarkerSize', 4, 'MarkerFaceColor', '#0072BD', 'MarkerEdgeColor', '#0072BD');
% fplot(f, [-2, 10], 'LineWidth', 3);
title('a rectangular pulse from t=2 to t=5')
% the corresponding Laplace transform
F(s) = collect(laplace(f, t, s), s)
F(s) =

Another example:
f(t) = ( 3 * exp(-0.75*t) * sin(16*t+pi/3) )*heaviside(t)
f(t) =

T = sym(1.5); % the delay
g(t) = f(t-T) % <<<<<<<-- Pay attention to the notation! <<<<<<<--
g(t) =

g_ALT(t) = ( 3*exp(-0.75*(t-T)) * sin(16*(t-T)+pi/3) )* heaviside(t-T)
g_ALT(t) =

% let's draw both the functions f and g
plot(tVALs, f(sym(tVALs)), 'LineStyle', 'none', 'Marker', 'square',...
'MarkerSize', 4, 'MarkerFaceColor', '#0072BD', 'MarkerEdgeColor', '#0072BD');
plot(tVALs, g(sym(tVALs)), 'LineStyle', 'none', 'Marker', 'square',...
'MarkerSize', 2, 'MarkerFaceColor', '#D95319', 'MarkerEdgeColor', '#D95319');
legend('f(t)', 'g(t)','Location', 'best', 'FontSize', 14)
title('A causal function vs. a delayed causal function')
Convolution
The convolution of causal functions
and
is the causal function
, defined as follows: - Note: same as
, i.e 
- The (very great) importance of this property will soon become clear (refer to Part 2, pp. 27-32 of the course material).
- Laplace transform turns convolution in time domain into multiplication in the frequency domain!
The Inverse Laplace Transform
Given a Laplace transform
, the unique corresponding causal function
can be recovered via: where σ is large enough that
is defined for
. Luckily, we do not use that formula! Instead, we will use the Symbolic Math Toolbox command ilaplace!
help ilaplace
--- help for sym/ilaplace ---
sym/ilaplace - Inverse Laplace transform
This MATLAB function returns the Inverse Laplace Transform of F.
Syntax
f = ilaplace(F)
f = ilaplace(F,transVar)
f = ilaplace(F,var,transVar)
Input Arguments
F - Input
symbolic expression | symbolic function | symbolic vector |
symbolic matrix
var - Independent variable
s (default) | symbolic variable | symbolic expression |
symbolic vector | symbolic matrix
transVar - Transformation variable
t (default) | x | symbolic variable | symbolic expression |
symbolic vector | symbolic matrix
Examples
Inverse Laplace Transform of Symbolic Expression
Default Independent Variable and Transformation Variable
Inverse Laplace Transforms Involving Dirac and Heaviside Functions
Inverse Laplace Transform as Convolution
Inverse Laplace Transform of Array Inputs
Inverse Laplace Transform of Symbolic Function
If Inverse Laplace Transform Cannot Be Found
See also fourier, ifourier, iztrans, laplace, ztrans, rewrite
Introduced in Symbolic Math Toolbox before R2006a
Documentation for sym/ilaplace
Important Remark
The functions in the time domain
, with which we will deal, will always be - causal functions,
- piecewise continuous functions,
- they contain no impulses at the time

Thus, the corresponding Laplace transforms
will always be rational polynomial functions Furthermore, the degree of the numerator polynomial will be less than that of the denominator polynomial:
.
Laplace Transform: Zeros and Poles
Given a Laplace transform
as a rational polynomial function, taking in evidence the roots of both the polynomials, we define - zeros: the roots of the polynomial in the numerator
- poles: the roots of the polynomial in the denominator
Computation of the Inverse Laplace Transform "by Hand": Sum of Partial Fractions
For the sake of completeness, we present the classical approach for determining the inverse Laplace transform.
Starting from a Laplace transform
that is a strictly proper rational function, it is always possible to express the function as a sum of partial fractions: where
and
. Owing to the linearity of the inverse Laplace transform, the time domain function we are looking for will be the linear combination of elementary exponential functions:
How to calculate the
coefficients?
Luckily, we do not use that formula! Instead, we will use the Symbolic Math Toolbox commands partfrac & ilaplace!
An Example using partfrac
Given the Laplace transform
determine the corresponding partial fraction decomposition:
F(s) = (5*s+3)/(s^3+5*s^2+8*s+4)
F(s) =

Fpart_frac = partfrac(F, s)
Fpart_frac(s) =

The Inverse Laplace Transform using MATLAB: Examples
A First Example
Given the Laplace transform
determine the corresponding causal function
(i.e., the inverse Laplace transform) F(s) = (5*s+3)/(s^3+5*s^2+8*s+4)
F(s) =

We can simplify and factorize the rational expression, by applying the command simplify
F(s) = simplify(F)
F(s) =

The inverse Laplace transform can be determined as follows:
f(t) = ilaplace(F, s, t)
f(t) = 
Important Remark on Notation
As pointed out previously in this live script, often in the evaluation of Laplace transforms and inverse transforms the symbolic math engine does not insert any Heaviside function. More Examples
Given the Laplace transform
determine the corresponding causal function
(i.e., the inverse Laplace transform). F(s) = (2/(s^2+2*s+2))*exp(-2*s)
F(s) =

f(t) = ilaplace(F, s, t)
f(t) = 
Note: This time the Heaviside function is needed!
Given the Laplace transform
determine the corresponding causal function 
F(s) = (sym(2*sym(sqrt(3))+4)*s^3+sym(6*sym(sqrt(3))+20)*s^2+sym(14*sym(sqrt(3))+92)*s+sym(10*sym(sqrt(3))+108))/(s^4+4*s^3+26*s^2+44*s+85)
F(s) =

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

ft1 = simplify(ilaplace(F, s, t), 10)
ft1 =

ft2 = simplify(ilaplace(F, s, t), 100)
ft2 =

Zeros and Poles of a Rational Laplace Transform
Consider a Laplace transform that is a rational function of the complex variable s as, for example 
How to determine zeros and poles of the rational function in MATLAB?
F(s) = (5*s+3)/(s^3+5*s^2+8*s+4)
F(s) =

To find the poles of
simply sue the command poles: pSET = poles(F, s)
pSET =

What about the order of each pole?
[pSET, Np_SET] = poles(F, s) %
pSET =

Np_SET =

How to determine the zeros of a rational Laplace transform? There is no devoted command. You have to use the solve command:
zSET = solve(F, s)
zSET =

Thus you obtain a symbolic vector containing the zeros, each one with its multiplicity.
Important Remark on Zeros of a Rational Laplace Transform
Pay attention: the command solve provides explicit solution usually for polynomial equations up to the degree 2. If you want an explicit solution of a polynomial equation with higher degree, you have to use the following syntax for the command solve:
G(s) = 3*((s+3)^3*(s-1))/((s+10)^2*(s-5)^3)
G(s) =

[pSET, nSET] = poles(G, s)
pSET =

nSET =

zSET = solve(G, s, "MaxDegree",4)
zSET =

For details, refer to
Theorems on the Laplace Transform
- Can we determine the initial value of a time-domain function from its Laplace transform?
- Can we determine the steady-state value of a time-domain function from its Laplace transform?
Initial Value Theorem
Given a Laplace transform
that is a strictly proper rational function, the following property holds - You can analyse the time behavior of
at
directly from its Laplace transform
, without computing the inverse Laplace transform!
An Application Example
Given the Laplace transform
, determine
without computing the inverse Laplace transform: F(s) = (5*s+3)/(s+1)/(s+2)^2
F(s) =

Let's verify:
f(t) = ilaplace(F,s, t)
f(t) = 
Final Value Theorem
Given a Laplace transform
that is a rational function, - if all the poles of
are in the left open half-plane, with at most one simple pole in the origin, then the following identity holds and the two limits assume the same finite value.
Important Remark
Pay attention to the assumptions about the poles of the Laplace transform! They are crucial!
Application Example
Given the Laplace transform
, determine, if possible, 
F(s) = (5*s+3)/s/(s+1)/(s+2)^2;
Let's verify if the Final Value Theorem's assumptions are met:
- determine the poles of
; - verify that all the poles belong to the left open half-plane, with at most one simple pole at the origin.
[pF, n_pF] = poles(F, s) % poles and corresponding multiplicity
pF =

n_pF =

% --- 1st check: is there a pole at s=0? ---
pole0ID = isAlways(pF==sym(0));
p0M = isAlways(n_pF(pole0ID)==1);
if (pole0 && p0M) || ~(pole0)
% --- 1st check: is there a pole at s=0? ---
% ---- 2nd check: Do all the remaining poles have negative real part? ----
poles2analyse = not(pole0ID);
poles2analyse = true(size(pF));
pN_OK = all(isAlways(real(pF(poles2analyse))<sym(0)));
disp('The Final Value Theorem''s assumptions are met!');
disp('You can apply the Final Value Theorem!')
limf_infty = limit(s*F, s , 0)
% let's verify, by comparison with the inverse Laplace transform
f(t) = ilaplace(F, s, t);
f2infty = limit(f, t, +Inf)
disp('*** The Final Value Theorem''s assumptions are NOT met! ***');
disp('*** You CANNOT apply the Final Value Theorem! ***')
end
The Final Value Theorem's assumptions are met!
You can apply the Final Value Theorem!
limf_infty =

f2infty =
