Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (10 points) Answer the questions below about this pro- gram: = = function this_is_the_one y = 1; t = 0; dt = 1e-4; for

image text in transcribed

image text in transcribed

image text in transcribed

4. (10 points) Answer the questions below about this pro- gram: = = function this_is_the_one y = 1; t = 0; dt = 1e-4; for i = 1:8e3 t = t + dt; a = y; b = getb(y,a,t,dt); k = 1; while abs(b) > 1e-4 c = getc(y,t,dt); y = y - b/c; b = getby,a,t,dt); k = k + 1; if k > 20 break end end end function b = getb(y,a,t,dt) b = y - a - dt*(y^2 + cos(y*t)); end function c = getc(y,t,dt) C c = 1 - dt* (2*y - t*sin(y*t)); y end (a) What ODE is solved by this program? (b) What is the initial condition? (c) What do the variables a, b and c represent? (d) What numerical method is imple- mented by the for loop? (e) What numerical method is implemented by the while loop? (f) what is the value of t at the end of the program

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_2

Step: 3

blur-text-image_3

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

Sustainable Engineering Principles And Practice

Authors: Bhavik R. Bakshi

1st Edition

1108420451, 9781108420457

More Books

Students also viewed these Chemical Engineering questions

Question

Which year had the best Monday sales?

Answered: 1 week ago

Question

Which customer is our best customer in February 2020?

Answered: 1 week ago