quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryرياضيات schoolبكالوريوس event_available2026-07-13

السؤال

Transcribed Image Text:

Problem 5. The attached matlab code is dedicated to the numerical computation to a differential equa- tion defined on the interval [0, 1]: y' (t) = f(y(t)), y(0) = 1. 1) Assuming that f and f' are defined in two matlab files f.m, fprime.m, determine precisely the algorithm/sequence {y}n20, which is defined in the code. 2) Determine (with justification) the expected value for It? clear all epsilon-le-10; If-1; N-101; h-Tf/(N-1); T-0:h:Tf; y0-1; yold-y0; yhalf-y0+h+f(yo)/2; Y-[0]; for n-1: (N-1) update-1; yk-yhalf; while (abs (update) > epsilon) update - (yk - yold -h (f(yold) +2 f (yhalf) +f (yk))/4)/(1-h*fprime (yk)/4); yk - yk- update; end end ynew-yk; yhalf-ynew+h⚫f (ynew)/2; yold-ynew; Y-[Y ynew]; Ih-ynew-y0-h*sum (f(Y));

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top