Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started