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

 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 =

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!