100% found this document useful (1 vote)
693 views12 pages

MATH024C Activity 4 Laplace Transform.

This experiment aims to use MATLAB to solve Laplace transforms of complex functions and ordinary differential equations (ODEs). Students will calculate Laplace transforms by hand and using MATLAB commands, find inverse Laplace transforms, and solve ODEs. MATLAB allows solving Laplace transforms precisely and easily through commands like laplace, ilaplace, simplify, and pretty. Students can also use MATLAB to plot solutions through commands such as ezplot and fplot. In conclusion, MATLAB is a useful tool for solving various mathematical problems, particularly for Laplace transforms.
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
100% found this document useful (1 vote)
693 views12 pages

MATH024C Activity 4 Laplace Transform.

This experiment aims to use MATLAB to solve Laplace transforms of complex functions and ordinary differential equations (ODEs). Students will calculate Laplace transforms by hand and using MATLAB commands, find inverse Laplace transforms, and solve ODEs. MATLAB allows solving Laplace transforms precisely and easily through commands like laplace, ilaplace, simplify, and pretty. Students can also use MATLAB to plot solutions through commands such as ezplot and fplot. In conclusion, MATLAB is a useful tool for solving various mathematical problems, particularly for Laplace transforms.
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/ 12

Experiment No.

04
Laplace Transform

1. Objective(s):
This activity aims to solve Laplace transforms, and graph the answers using MATLAB.
2. Intended Learning Outcomes (ILOs):
At the end of this activity, the student shall be able to
1. Use MATLAB to solve the Laplace transforms of complex functions, and ordinary differential equations
(ODE).
2. Use MATLAB to plot piecewise functions, and solutions to Laplace transforms.
3. Discussion
The Laplace transform is defined as follows:

𝐹(𝑠) = ∫ 𝑓(𝑡)𝑒 −𝑠𝑡 𝑑𝑡


0

Wherein the e-st is the kernel of the transform while the inverse Laplace transform is defined by a contour integral in
the complex plane:
𝑐+𝑗∞
1
𝑓(𝑡) = ∫ 𝐹(𝑠)𝑒 𝑠𝑡 𝑑𝑡
𝑗2𝜋
𝑐−𝑗∞

where c is a real value.


To compute the Laplace transform of an arithmetical expression, use the laplace function. First you need to specify
that the variables t and s are symbolic ones. This is done with the following command lines

syms s t
laplace(t)
ans =
1/s^2

To make the expression more readable, the commands simplify or pretty may be used.

To compute the original expression from its Laplace transform, perform the inverse Laplace transform. To compute
the inverse Laplace transform, use the ilaplace function.

syms s t
ilaplace(1/s^2)
ans =
t

When solving Laplace transforms, partial fraction expansion is one of the most encountered problems. Polynomials
may also be decomposed to partial fractions using MATLAB commands. Write the coefficients of the numerator and
the denominator in separate vectors and MATLAB gives the coefficients with the corresponding poles in the
expansion.

1
The Laplace transform method is superior over the classical method of solving differential equations because two an
auxiliary function - the unit step function or Heaviside function can be easier analyzed through Laplace.

The unit step function of Heaviside function 𝜇(𝑡 − 𝑎) is 0 for t < a, has a jump of size 1 at t = a (where it is left
undefined), and is 1 for t > a, in formula:

0 𝑖𝑓 𝑡 < 𝑎
𝜇(𝑡 − 𝑎) = {
1 𝑖𝑓 𝑡 > 𝑎
𝑒 −𝑎𝑠
The transform of 𝜇(𝑡 − 𝑎) follows the formula 𝑠
. The unit step function is typically used to measure engineering
applications which often involve functions that are either “off” or “on”.

In MATLAB, 𝜇(𝑡 − 𝑎) is denoted by the function heaviside(t-a).

4. Resources:
To perform this activity, a computer workstation with MATLAB R2015 or higher installed is required.
5. Procedure:
1. Using hand calculation, find the Laplace transform F(s) of the following functions f(t):
1.1) te-7tsin8t
𝑒 −7𝑡 tsin8t
1.2) 𝑡
∞ 𝑒 −7𝑡 cos8t
1.3) ∫0 𝑑𝑡
𝑡
𝑥 𝑦
1.4) ∫0 𝑡 ∫0 𝑡𝑒 −7𝑡 cos8t dtdt

2. Find the Laplace transform F(s) of the following functions f(t):, using MATLAB commands.
2.1) te-7tsin8t
𝑒 −7𝑡 tsin8t
2.2) 𝑡
∞ 𝑒 −7𝑡 cos8t
2.3) ∫0 𝑡
𝑑𝑡
𝑥 𝑦
2.4) ∫0 𝑡 ∫0 𝑡𝑒 −7𝑡 cos8t dtdt

3. Using MATLAB, find f(t) and sketch its graph if F(s) equals
3.1) s-2 – (s-2 + s-1)e-s
3.2) (e-2πs – e-8πs) / (s2 + 1)

4. Generalize the formula to solve for the laplace transform of


4.1) a function of time multiplied with powers of t
4.2) a function of time divided by t

5. Using hand calculation, solve the following ordinary differential equations given the initial values:
5.1) y’’ + 3y’ + 2y = e-t, y(0) = 4, y’(0) = 5

2
5.2) y’’’ + 2y’’ + 3y’ + 5y = cos(t), y(0) = y’(0) = 1, y”(0) = 2

6. Using MATLAB, solve the following ordinary differential equations given the initial values:
6.1) y’’ + 3y’ + 2y = e-t, y(0) = 4, y’(0) = 5
6.2) y’’’ + 2y’’ + 3y’ + 5y = cos(t), y(0) = y’(0) = 1, y”(0) = 2

3
Course: MATH 024C Experiment No.: 4
Group No.: 4 Section: EC22FA1
Group Members: Date Performed:
SAMSON, Nheil Oliver B. Date Submitted: February 4, 2020
SIAPCO, Mark Glenn M. Instructor: Engr. Christine Joy Arce
TAGLE, Zabriel Arth R.
6. Data and Results:

1. Using hand calculation, find the Laplace transform F(s) of the following functions f(t):
1.1) te-7tsin8t

𝑒 −7𝑡 tsin8t
1.2) 𝑡

∞ 𝑒 −7𝑡 cos8t
1.3) ∫0 𝑡
𝑑𝑡

𝑥 𝑦
1.4) ∫0 𝑡 ∫0 𝑡𝑒 −7𝑡 cos8t dtdt

4
2. Repeat step number 1, using MATLAB commands.
2.1) te-7tsin8t =

𝑒 −7𝑡 tsin8t
2.2) 𝑡
=

∞ 𝑒 −7𝑡 cos8t
2.3) ∫0 𝑡
𝑑𝑡

𝑥 𝑦
2.4) ∫0 𝑡 ∫0 𝑡𝑒 −7𝑡 cos8t dtdt

5
3. Find f(t) and sketch its graph if F(s) equals
3.1) s-2 – (s-2 + s-1)e-s

3.2) (e-2πs – e-8πs) / (s2 + 1)

2π 8π

6
4. Generalize the formula to solve for the laplace transform of
4.1) a function of time multiplied with powers of t
𝑑𝑛
L {𝑡 𝑛 𝑓(𝑡)} = (−1)𝑛 𝑑𝑠𝑛 𝐹(𝑠)

4.2) a function of time divided by t


𝑓(𝑡) ∞
L { 𝑡
} = ∫0 𝐹(𝑠) 𝑑𝑠

5. Using hand calculation, solve the following ordinary differential equations given the initial values:

5.1) y’’ + 3y’ + 2y = e-t, y(0) = 4, y’(0) = 5

5.2) y’’’ + 2y’’ + 3y’ + 5y = cos(t), y(0) = y’(0) = 1, y”(0) = 2

7
6. Using MATLAB, solve the following ordinary differential equations given the initial values:
6.1) y’’ + 3y’ + 2y = e-t, y(0) = 4, y’(0) = 5

pretty (ans)=
4𝑠 2 + 21𝑠 + 18
(𝑠 + 1)2 (𝑠 + 2)

6.2) y’’’ + 2y’’ + 3y’ + 5y = cos(t), y(0) = y’(0) = 1, y”(0) = 2

Pretty =
𝑠 + 3𝑠 3 + 8𝑠 2 + 4𝑠 + 7
4

(𝑠 2 + 1)(𝑠 3 + 2𝑠 2 + 3𝑠 + 5)

8
7. Conclusion:

In summary for experiment number 4 about laplace transform, we are again able to use MATLAB as a platform
to solve the Laplace transforms of various functions such as complex functions and ordinary differential equations
(ODE) as well as plotting piecewise functions and solutions to laplace transform by using appropriate MATLAB
commands and MATLAB also made Laplace transform computations a little bit easier, precise and accurate (only if
you know the commands well enough) because the system can verify if your manually-computed/hand-calculated
answer is right or wrong if you compare it to the system’s response of the MATLAB commands. Just like for example,
we did a hand-calculation on one of the activities given and used MATLAB on the next part to verify if the answer will
match it and surprisingly, it is matched and MATLAB can make it more simple and pretty.
- SAMSON, Nheil Oliver B..

In line with the previous experiment, this activity helped us to better understand the functions of the commands
being used in MATLAB. Though some part of this activity is quite hard to run in the MATLAB, surfing the net and
browsing for some guides really helped to finish this task. Through this activity, we were able to use again those
helpful commands such as simplify and pretty to make the answer simplified and readable as well. New commands
have been introduced here as we start to solve for ordinary differential equation and piecewise function such as
ezplot and fplot. To summarize, MATLAB has been very useful in terms of solving different mathematical problems,
in Laplace transformation in particular. Not only that because we can also utilize its function to derive the graph or
plot of a particular equation. Truly MATLAB is very user-friendly and a better learning system for the students.

- SIAPCO, Mark Glenn M.

I therefore conclude that, in this activity, we explore more of the uses of MATLAB in the way of solving more
complicated Laplace transform. In this way, MATLAB introduces us to more complex application of MATLAB, which
we used to plot piecewise functions that needed a lot of hand solution but MATLAB did it for just an instant as long as
you have the right inputs to get that accurate outputs.
- TAGLE, Zabriel Arth R.

9
8. Assessment:
1. Consider the IVP: y’’ + 3y’ + 2y = f(t) , y(0) = 2, y’(0) = 3
1, 𝑓𝑜𝑟 𝑡 < 3
With 𝑓(𝑡) = {𝑡 − 2, 𝑓𝑜𝑟 3 < 𝑡 < 6
2, 𝑓𝑜𝑟 𝑡 > 6

 Using MATLAB commands, solve the ODE given a piecewise defined right-hand side function.
 Also, plot the right-hand side function using the command ‘ezplot’.
 Finally, plot the solution using the command ‘ezplot’

10
PLOTS.

Right-hand side function Plot of the solution

Tasking:
Procedure 1: Tagle
Procedure 2: Siapco
Procedure 3: Siapco
Procedure 4: Tagle
Procedure 5: Samson
Procedure 6: Samson
Assessment: Siapco

11
COURSE: MATH 024C MEMBERS:
SECTION: EC22FA1 SAMSON, Nheil Oliver B.
INSTRUCTOR: ENGR.CHRISTINE JOY ARCE SIAPCO, Mark Glenn M.
EXPERIMENT NO.: 4 TAGLE, Zabriel Arth R.
TITLE: LAPLACE TRANSFORM

PERFORMANCE BEGINNER ACCEPTABLE PROFICIENT SCORE


INDICATORS 1 2 3
LABORATORY PERFORMANCE
Experimental Set-up Members are unable to set-up the Members are able to setup the Members are able to setup the
materials. materials with supervision. material with minimum
supervision.
Time Management/ Members do not finish on time with Members finish on time with Members finish ahead of time
Conduct of Experiment incomplete data. incomplete data. with complete data and time to
revise data.
Cooperative and Teamwork Members do not know their tasks and Members defined responsibilities Members are on tasks and have
have no defined responsibilities. most of the time. Group conflicts are defined responsibilities at all
Group conflicts have to be settled by cooperatively managed most of the times. Group conflicts are
the teacher. time. cooperatively
managed at all times.
Neatness and Orderliness Messy workplace during and after the Clean and orderly workplace with Clean and orderly workplace at
experiment. occasional mess during and after all times during and after the
the experiment. experiment.
Ability to do Members require supervision by the Members require occasional Members do not need to be
independent work teacher. supervision by the teacher. supervised by the teacher.
Student Outcomes ( d1)
Conduct experiments in Members do not follow good and safe Members follow good and safe Members follow good and safe
accordance with good and laboratory practice in the conduct of laboratory practice most of the time laboratory practice at all times in
safe laboratory practice. (x2) experiments. in the conduct of experiments. the conduct of experiments.
Operate equipment and Members are unable to operate the Members are able to operate Members are able to operate the
instruments with ease. (x2) equipment and instruments. equipment and instrument with equipment and instruments with
supervision. ease and with minimum
supervision.
Analyze data, validate The group has incomplete data. The group has complete data but The group has complete data,
experimental values against has no analysis and valid validates experimental values
theoretical values to conclusion. against theoretical values, and
determine possible provides valid conclusion.
experimental errors, and
provide valid conclusions.
(x2)
Discussion of Results, Conclusion and Assessment Task
Ideas are taken from the
Ideas are not in reference to the
Ideas are in reference to result/data result/data gathered during the
result/data gathered during
Discussion of Results (x2) gathered during experiment. Clear, experiment.
experiment. Not clear, incomplete and
but not complete and too short. Very clear, complete and
too short.
sufficient to form a discussion.
Ideas are somehow appropriate to Ideas are very much appropriate
Ideas are inappropriate to the
the experiment objectives and to the experiment objectives and
experiment objectives and intended
Conclusion (x3) intended learning outcomes. intended learning outcomes.
learning outcomes.
Clear but not complete and too Very clear, complete and
Not clear, incomplete and too short.
short. sufficient to form a conclusion.
Majority of the questions were All questions were correctly
Assessment Task (x5) Answers to questions were incorrect.
answered correctly. answered.
Total
Mean score Total score/3
Percentage score (Total score/63) x 100%
Evaluated by:

CHRISTINE JOY E. ARCE


Printed Name and Signature of Faculty Member Date

12

You might also like