Differential Equations by Laplace transforms ▪ On this activity, you will learn to solve initial value problems using laplace transforms. Example: I ■ I ■ I Solve the initial value problem: (D² - 3D + 2)y=sin(5t) y(0) = 1, y'(0) = 2 %Step 1: Initialize the variables: syms y(t), t Dy=diff(y); D2y=diff(y,2); cond1=y(0)==1; cond2=Dy(0)==2 %Step 2: Identify the LHS and RHS of the equation, find the laplace of the given functions 1 = D2y-3*Dy+2*y; r = sin(5*t); L = laplace (1); R = laplace(r); %Step 3: Equate the laplace transforms of the LHS and RHS. Plugin the initial conditions: eqn1 = L==R; eqn1 = subs(eqn1, Ihs(cond1), rhs(cond1)); eqn1 =subs(eqn1, Ihs(cond2), rhs(cond2)); %Step 4: solve for Y(s) in the resulting equation eqn1 = isolate(eqn1,laplace(y)); %Solve the resulting equation: ysolnilaplace(eqn1) Exercises: Solve the Initial Value problem (D² + 4D + 3)y=t+2: y(0) = 2, y (0) = 1, using laplace transforms
Differential Equations by Laplace transforms ▪ On this activity, you will learn to solve initial value problems using laplace transforms. Example: I ■ I ■ I Solve the initial value problem: (D² - 3D + 2)y=sin(5t) y(0) = 1, y'(0) = 2 %Step 1: Initialize the variables: syms y(t), t Dy=diff(y); D2y=diff(y,2); cond1=y(0)==1; cond2=Dy(0)==2 %Step 2: Identify the LHS and RHS of the equation, find the laplace of the given functions 1 = D2y-3*Dy+2*y; r = sin(5*t); L = laplace (1); R = laplace(r); %Step 3: Equate the laplace transforms of the LHS and RHS. Plugin the initial conditions: eqn1 = L==R; eqn1 = subs(eqn1, Ihs(cond1), rhs(cond1)); eqn1 =subs(eqn1, Ihs(cond2), rhs(cond2)); %Step 4: solve for Y(s) in the resulting equation eqn1 = isolate(eqn1,laplace(y)); %Solve the resulting equation: ysolnilaplace(eqn1) Exercises: Solve the Initial Value problem (D² + 4D + 3)y=t+2: y(0) = 2, y (0) = 1, using laplace transforms
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Show the complete code and result.

Transcribed Image Text:Differential Equations by Laplace transforms
▪ On this activity, you will learn to solve initial value problems using laplace transforms.
Example:
I
■
■
I
Solve the initial value problem: (D² - 3D + 2)y=sin(5t) y(0) = 1, y'(0) = 2
%Step 1: Initialize the variables:
syms y(t), t
Dy=diff(y);
D2y=diff(y,2);
cond1=y(0)==1;
cond2=Dy(0)==2
%Step 2: Identify the LHS and RHS of the equation, find the laplace of the given functions
1 = D2y-3*Dy+2*y;
r = sin(5*t);
L = laplace (1);
R = laplace(r);
%Step 3: Equate the laplace transforms of the LHS and RHS. Plugin the initial conditions:
eqn1 = L==R;
eqn1 = subs(eqn1, Ihs(cond1), rhs(cond1));
eqn1 =subs(eqn1, Ihs(cond2), rhs(cond2));
%Step 4: solve for Y(s) in the resulting equation
eqn1 = isolate(eqn1,laplace(y));
%Solve the resulting equation:
ysoln = ilaplace(eqn1)
Exercises:
Solve the Initial Value problem (D² + 4D + 3)y=t+2: y(0) = 2, y(0) = 1, using laplace transforms

Transcribed Image Text:1 %Step 1: Initialize the variables:
2 syms y(t), t
3 Dy=
4 D2y=
5 cond1=
6 cond2=
7 %Step 2: Identify the LHS and RHS of the equation, find the laplace of the given functions
8 1 =
9
r =
10 L =
11 R =
12 %Step 3: Equate the laplace transforms of the LHS and RHS. Plugin the initial conditions:
13 eqn1 =
14 eqn1 =
15 eqn1 =
16 %Step 4: solve for Y(s) in the resulting equation
17 eqn1 =
18 %Solve the resulting equation:
19 ysoln =
20
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education