Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MATLAB code to solve the following equations by Laplace transform. a) x2x+x=e^t withx=2,x=14at t=0 b) x+2x+10x=5t24,x(0)=1,x(0)=2 matlab code should ask for the input

image text in transcribed

Write a MATLAB code to solve the following equations by Laplace transform.

a) x2x+x=e^t withx=2,x=14at t=0

b) x+2x+10x=5t24,x(0)=1,x(0)=2

matlab code should ask for the input in the command window and code should be greater than 10 lines and should be in general method There should be less use of matlab functions .Screen shot of the matlab code will be appreciated

The code must give all these output given in the image

Example 2 Solve the following IVP Solntion As with the first example, let's first take the Laplace transform of all the terms in the differential equation. We'll the plug in the initial conditions to get, (s+2) Now solvc for Y(s). (2-1)(s+ (2-1)(s+2) Now, as we did in the last example we'll go ahead and combine the two terms together as we will have to partial fraction up the first denominator anyway, so we may as well make the numerator a little more complex and just do a single partial fraction. This will give, (26-1)(+2) 4-16-15 (28-1)(s+2) Tbe partial fraction decomposition is then, A B r(s)-28-1 +8+2+ (s + 2),+(s+2) Setting numcrator oqual gives, 4-16-15-A(s+2)(2-+2+2-10(s+2)+D(26-1) +8A-4B-2C-D In this case it's probably casicr to just sct cocfficients cqual and solve the resulting system of cquation ruther than pick valucs of s. So, here is thec system and its solution. 192 125 96 125 12A+4B+3C+2D=-16 8A-4B-2C-D-15 25 We will gct a common denominator of 125 on all these coefficients and factor that out when we go to plug them back into the transform. Doing this gives, -192 96 10 25 125 2( s+2 (s+2) (s+2) Notice that we also had to factor a 2 out of the denominator of the first term and fix up the numerator of the last term in order to get them to match up to the correct entrics in our table of transforms, Taking the inverse transform then gives

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

Students also viewed these Databases questions

Question

How is VCA different from SWOT analysis?

Answered: 1 week ago

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago