Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Consider the following system of 2 IVP-ODES: dx = y+x ' x(0) = 1 dt dy =y-x y(0) = 2 dt for t

 

2. Consider the following system of 2 IVP-ODES: dx = y+x ' x(0) = 1 dt dy =y-x y(0) = 2 dt for t [0,2]. (a) Solve this problem analytically and show that the anaytical solu- tion reads as follows: x(t) e(cos(t) + 2sin(t)) = y(t) = e(-sin(t) + 2cos(t)) (b) Write a Matlab function to solve a system of ODEs using 1st order accurate Euler's explicit method. Call it EulerSYS_10DE.m. Test your function on this system with At = 0.5. Compute the relative error to the exact solution for x(t) and y(t) at t = 2. (c) Solve this problem numerically using 4th order accurate Runge- Kutta method RK4SYS_10DE.m developed in class with At = 0.5. Compute the relative error to the exact solution for x(t) and y(t) at t = 2. (d) Plot the 3 solutions (analytical, 1st order Euler and 4th order Runge-Kutta) for x(t) and y(t) on a single figure. Hand all your commented Matlab codes, the computed errors and the figure.

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

Numerical Methods With Chemical Engineering Applications

Authors: Kevin D. Dorfman, Prodromos Daoutidis

1st Edition

1107135117, 978-1107135116

More Books

Students also viewed these Programming questions

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago