Advance Math Final Lab
Advance Math Final Lab
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:
Pre-Lab Preparation:
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.
−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
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.
3. Find the inverse Laplace transform of F(s). In MATLAB, this can be done using
the ilaplace function.
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
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
3. Apply the inverse Laplace transform to find the solution y(t). In MATLAB, this
can be done using the ilaplace function.
Exercise 3:
Calculate the solution to the following equations using MATLAB. Paste the
screenshot of your answer in the table
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.