0% found this document useful (0 votes)
25 views6 pages

Advance Math Final Lab

Uploaded by

mlreganon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views6 pages

Advance Math Final Lab

Uploaded by

mlreganon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

FINALS ACTIVITY

INVERSE LAPLACE TRANSFORM AND SOLUTIONS TO DIFFERENTIAL


EQUATIONS USING LAPLACE
Name:________________________________________
Course:_______________________

Date:________________

Objective:

The goal of this laboratory activity is to help students understand how to use
the inverse Laplace transform to solve engineering problems, particularly for
analyzing systems in the time domain. Students will apply inverse Laplace
transforms to find time-domain solutions from the frequency domain
representations of different systems.
Materials Needed:

 A computer with MATLAB installed

 Access to MATLAB documentation

Pre-Lab Preparation:

1. Review the definition and properties of the Laplace Transform.

2. Familiarize yourself with MATLAB syntax, especially the Symbolic Math


Toolbox.

FUNCTIONS
lists the names of all symbolic scalar
variables, functions, matrix variables,
syms
matrix functions, and arrays in the
MATLAB workspace
returns the Laplace transform of f using
laplace(f, t, s) the default independent variable t and the
default transformation variable s
returns the inverse Laplace
transform of F using the default
ilaplace(F, s, t)
independent variable s for the default
transformation variable t
solves the equation eqn for the
solve(eqn, var)
variable var
Part 1: Computing the Inverse Laplace Transform of a Rational Function

s +1
1. In the script, define an s-domain function. For example, use F ( s )= 2 .
s +2 s+1
syms t s
% Define the Laplace transform function
F_s = (s + 1)/(s^2 + 2*s + 5);

2. Find the inverse Laplace transform of F(s). In MATLAB, this can be done using
the ilaplace function.

% Find the inverse Laplace transform


f_t = ilaplace(F_s, s, t);

disp('Inverse Laplace transform f(t) is:');


disp(f_t);

3. The result will be a damped sinusoidal function in terms of exponential decay


and sinusoidal oscillation, typically written as:

−t
f ( t )=e (cos ( 2 t )+ sin ( 2t ) )
Exercise 1:

Calculate the inverse laplace transform of the following equations using MATLAB.
Paste the screenshot of your answer in the table

Function Laplace Transform using MATLAB


Part 2: Computing the Inverse Laplace Transform of a Step Function
Response

5
1. In the script, define an s-domain function. For example, use F ( s )= .
s (s +3)
syms t s
% Define the Laplace function
F_s = 5/(s*(s + 3));

2. First, decompose F(s) into simpler terms using partial fraction decomposition.

% Find the inverse Laplace transform


f_t = ilaplace(F_s, s, t);

disp('Inverse Laplace transform f(t) is:');


disp(f_t); % Perform partial fraction decomposition
F_s_decomp = apart(F_s, s);

3. Find the inverse Laplace transform of F(s). In MATLAB, this can be done using
the ilaplace function.

% Find the inverse Laplace transform of the decomposed function


f_t = ilaplace(F_s_decomp, s, t);

disp('Inverse Laplace transform f(t) is:');


disp(f_t);

4. The output will be a function representing the step response, typically written
as:

−3 t
f ( t )=5−5 e
Exercise 2:

Calculate the inverse laplace transform of the following equations using MATLAB.
Paste the screenshot of your answer in the table

Function Laplace Transform using MATLAB


Part 3: Computing the solutions to Differential Equations using Laplace
Transform

1. In the script, define the equation in the s-domain. Since this is a first order
differential equation, you have to find the laplace transform of this equation
for it to be in the s-domain. For example, use

dy
+ 4 y=8 where y ( 0 )=2.
dt
syms y(t) s

% Define the equation in the s-domain


Y_s = laplace(y(t), t, s);
eqn = s*Y_s - 2 + 4*Y_s == 8/s;

2. Nest, solve for Y(s) in the s-domain.

% Solve for Y(s)


Y_s_sol = solve(eqn, Y_s);

3. Apply the inverse Laplace transform to find the solution y(t). In MATLAB, this
can be done using the ilaplace function.

% Take the inverse Laplace transform


y_t = ilaplace(Y_s_sol, s, t);
disp('Solution y(t) is:');
disp(y_t);
The same steps can be used to solve for second order equations.

Exercise 3:

Calculate the solution to the following equations using MATLAB. Paste the
screenshot of your answer in the table

Function Laplace Transform using MATLAB

Exercise 4:

Using your knowledge in solving differential equations, solve for the problem below
using MATLAB. Paste the screenshot of your answer.

Problem: Consider an RL series circuit with a resistor R=20 Ω and an inductor L=3
H, connected to a voltage source V(t)=20 V that is turned on at t=0. The initial
current through the circuit is i(0)=0A.

di(t)
From the equation V ( t )=L +ri(t ), solve for the i(t).
dt
Note: You can solve for the i(t) by finding the laplace V(t) equation according to its initial
condition and converting the result to time domain through the ilaplace function.

Answer:
Conclusion:

Through this laboratory activity, you will gain hands-on experience in solving
differential equations using the Laplace transform and its inverse in MATLAB. This is
an important skill for analyzing dynamic systems in engineering, physics, and
applied mathematics.

You might also like