1 syms y(t), t 2 Dy=diff(y); 3 D2y-diff(y, 2); 4 D3y-diff(y,3); 5 %1 6 cond1=y(0)==3; 7 cond2-Dy (0)=-1; 8 cond3-D2y (0)=-2; 9 11-D3y+2*D2y+Dy+2*y; 10 r1-5+4 sin(t); 11 eqn1=laplace (11)==laplace (r1); 12 L_Eql-eqn1; 13 L_Eq1=subs(L_Eq1, 1hs (cond1), rhs (cond1)); 1hs (cond2), rhs (cond2)); 14 L_Eq1=subs(L_Eq1, 15 L_Eq1=subs(L_Eq1, 1hs (cond3), rhs (cond3)); 16 L_Eq1- isolate (L_Eql, laplace(y)); 17 ysoln1 ilaplace(L_Eq1) 18 ysoln1=rhs (ysoln1) 19 %2 20 cond3-y(0)==5; 21 cond4-Dy (0)==0; 22 12-2 D2y+5 *Dy+6*y; 23 r2-5+3*exp(3*t) ; 24 eqn2=laplace(12) ==laplace(r2); 25 L_Eq2-eqn2; 26 |L_Eq2=subs (L_Eq2, 1hs (cond 3), rhs (cond3)); 27 L_Eq2=subs(L_Eq2, 1hs (cond4), rhs (cond4)); 28 L_Eq2= isolate (L_Eq2, laplace(y)); 29 ysoln2= ilaplace(L_Eq2) 30 ysoln2-rhs (ysoln2) 31 %3 32 cond5-y (0)=-4; 33 cond6-Dy (0)==2; 34 13-2 D2y+6 Dy+4*y; 35 r3-6*exp(t) +4"t^2; 36 37 eqn3-laplace(13) ==laplace (r3); 38 L_Eq3-eqn3; 39 L_Eq3=subs(L_Eq3, 1hs (cond5), rhs (cond5)); 48 L_Eq3=subs(L_Eq3, 1hs (cond6), rhs (cond6)); 41 L_Eq3= isolate (L_Eq3, laplace(y)); 42 ysoln3= ilaplace(L_Eq3) 43 ysoln3=rhs (ysoln3)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Hi please correct my incorrect answers in matlab script pls thank u!

1 syms y(t), t
2 Dy=diff(y);
3 D2y-diff(y, 2);
4 D3y=diff(y, 3);
5 %1
6 cond1-y (0)==3;
7 cond2=Dy (0)==1;
8 cond3=D2y (0)==2;
9 11-D3y+2*D2y+Dy+2*y;
10 r1-5+4* sin(t);
11 eqn1-laplace (11)==laplace (r1);
12 L_Eq1-eqn1;
13 L_Eq1-subs (L_Eq1, 1hs (cond1), rhs (cond1));
14 L_Eq1=subs(L_Eq1, 1hs (cond2), rhs (cond2));
15 L_Eq1=subs (L_Eq1, 1hs (cond 3), rhs (cond3)) ;
16 L_Eq1- isolate (L_Eq1, laplace(y));
17 ysoln1= ilaplace(L_Eq1)
18 ysoln1-rhs (ysoln1)
19 %2
20 cond3=y (0)==5;
21 cond4-Dy (0)==0;
22 12-2 D2y+5*Dy+6*y;
23 r2=5+3*exp(3*t) ;
24 eqn2 laplace (12)==laplace (r2);
25 L_Eq2-eqn2;
26 |L_Eq2=subs(L_Eq2, 1hs (cond3), rhs (cond3));
27 |L_Eq2=subs(L_Eq2, 1hs (cond4), rhs (cond4));
28 L_Eq2= isolate (L_Eq2, laplace(y));
29 ysoln2= ilaplace(L_Eq2)
30 ysoln2-rhs (ysoln2)
31 %3
32 cond5-y (0)==4;
33 cond6-Dy (0)==2;
34 13-2 D2y+6*Dy+4*y;
35 r3=6*exp(t) +4*+^2;
36
37 eqn3=laplace(13) ==laplace(r3);
38 L_Eq3=eqn3;
39 L_Eq3=subs(L_Eq3, 1hs (cond 5), rhs (cond5));
48 L_Eq3=subs(L_Eq3, 1hs (cond6), rhs (cond6));
41 L_Eq3= isolate (L_Eq3, laplace(y));
42 ysoln3 = ilaplace(L_Eq3)
43|ysoln3=rhs (ysoln3)
Transcribed Image Text:1 syms y(t), t 2 Dy=diff(y); 3 D2y-diff(y, 2); 4 D3y=diff(y, 3); 5 %1 6 cond1-y (0)==3; 7 cond2=Dy (0)==1; 8 cond3=D2y (0)==2; 9 11-D3y+2*D2y+Dy+2*y; 10 r1-5+4* sin(t); 11 eqn1-laplace (11)==laplace (r1); 12 L_Eq1-eqn1; 13 L_Eq1-subs (L_Eq1, 1hs (cond1), rhs (cond1)); 14 L_Eq1=subs(L_Eq1, 1hs (cond2), rhs (cond2)); 15 L_Eq1=subs (L_Eq1, 1hs (cond 3), rhs (cond3)) ; 16 L_Eq1- isolate (L_Eq1, laplace(y)); 17 ysoln1= ilaplace(L_Eq1) 18 ysoln1-rhs (ysoln1) 19 %2 20 cond3=y (0)==5; 21 cond4-Dy (0)==0; 22 12-2 D2y+5*Dy+6*y; 23 r2=5+3*exp(3*t) ; 24 eqn2 laplace (12)==laplace (r2); 25 L_Eq2-eqn2; 26 |L_Eq2=subs(L_Eq2, 1hs (cond3), rhs (cond3)); 27 |L_Eq2=subs(L_Eq2, 1hs (cond4), rhs (cond4)); 28 L_Eq2= isolate (L_Eq2, laplace(y)); 29 ysoln2= ilaplace(L_Eq2) 30 ysoln2-rhs (ysoln2) 31 %3 32 cond5-y (0)==4; 33 cond6-Dy (0)==2; 34 13-2 D2y+6*Dy+4*y; 35 r3=6*exp(t) +4*+^2; 36 37 eqn3=laplace(13) ==laplace(r3); 38 L_Eq3=eqn3; 39 L_Eq3=subs(L_Eq3, 1hs (cond 5), rhs (cond5)); 48 L_Eq3=subs(L_Eq3, 1hs (cond6), rhs (cond6)); 41 L_Eq3= isolate (L_Eq3, laplace(y)); 42 ysoln3 = ilaplace(L_Eq3) 43|ysoln3=rhs (ysoln3)
Solving Differential Equation by Laplace Transform
Solve the following initial value problems using Laplace transform and plase your solution using the indicated format:
1. (D³+2D² +D+2)y=5+4sin(t): y(0) = 3, y(0) = 1, y"(0) = 2
2. (D² + 5D+6)y=5+3e: y(0) = 5, y'(0) = 0
3. (D² +6D+4)y= 6e +42²2: y(0) = 4, y(0) = 2
Required:
1. Use laplace transforms
2. Find the laplace transform of the entire equation and set it implicitly (eqn1, eq2,eqn3).
3. Plugin the initial conditions and save it as L_Eq1,L_Eq2, L_Eq3
4. Find the solution to the equation (ysoln1, ysoln2, ysoln3)
Transcribed Image Text:Solving Differential Equation by Laplace Transform Solve the following initial value problems using Laplace transform and plase your solution using the indicated format: 1. (D³+2D² +D+2)y=5+4sin(t): y(0) = 3, y(0) = 1, y"(0) = 2 2. (D² + 5D+6)y=5+3e: y(0) = 5, y'(0) = 0 3. (D² +6D+4)y= 6e +42²2: y(0) = 4, y(0) = 2 Required: 1. Use laplace transforms 2. Find the laplace transform of the entire equation and set it implicitly (eqn1, eq2,eqn3). 3. Plugin the initial conditions and save it as L_Eq1,L_Eq2, L_Eq3 4. Find the solution to the equation (ysoln1, ysoln2, ysoln3)
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY