Open In App

How to find inverse Laplace Transforms using MATLAB ?

Last Updated : 21 Apr, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will see how to find Laplace Transform in MATLAB. Laplace Transform helps to simplify problems that involve Differential Equations into algebraic equations. Inverse Laplace Transform converts Laplace Domain Function F(s) into time-domain function f(t)

f(t) = L^{-1}[F(s)]

Using the above function one can generate a Time-domain function of any Laplace expression.

Example 1: Find the Inverse Laplace Transform of s/(a^2 + s^2)

Matlab

% specify the variable a, t and s 
% as symbolic ones
syms a t s
  
% define function F(s) 
F = s/(a^2 + s^2);
  
% ilaplace command to transform into time
% domain function f(t)  
% Inverse Laplace Function
f1=ilaplace(F,s,t);
  
% Display the output value
disp(f1);
  
% Output can be verified by transforming 
% function f1 into Laplace Domain F(s)
f=laplace(f1,t,s);  % Laplace Function
disp(f);

                    

Output:

which is f(t) = cos(at)

Example 2: Find the Inverse Laplace Transform of 1/(s-a)

Matlab

% specify the variable a, t and 
% s as symbolic ones
syms a t s
  
% define function F(s) 
F = 1/(s-a);
  
% ilaplace command to transform into
% time domain function f(t)
% Inverse Laplace Function
f1=ilaplace(F,s,t); 
  
% Display the output value
disp(f1);
  
% Output can be verified by transforming 
% function f1 into Laplace Domain F(s)
f=laplace(f1,t,s);  % Laplace Function
disp(f);

                    

Output:

which is f(t) = e^{at}

Example 3: Find the Inverse Laplace Transform of 2/(s+1)+3/(s+2)+1/s

Matlab

% specify the variable a, t and 
% s as symbolic ones
syms a t s
  
% define function F(s) 
F = 2/(s+1)+3/(s+2)+1/s;
  
% ilaplace command to transform into
% time domain function f(t)  
% Inverse Laplace Function
f1=ilaplace(F,s,t);
  
% Display the output value
disp(f1);
  
%Output can be verified by transforming 
% function f1 into Laplace Domain F(s)
f=laplace(f1,t,s);  % Laplace Function
disp(f);

                    

Output:

which is f(t) = 2e^{-t}+3e^{-2t}+1



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads