Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is what I have so far. x0=0; y0=1; N=3; xstar=1.3; h=(xstar-x0)/N; x=(x0+h)

ID: 2988275 • Letter: T

Question

This is what I have so far.

x0=0; y0=1; N=3; xstar=1.3;
h=(xstar-x0)/N;

x=(x0+h):h:xstar;
y=zeros(1,N);

for i=1:1:N
  
if i==1
k(i) = ((x0 + 1)*y0)/x0;
elseif i>1
k(i) = (x + h/2 + 1)*(y + h/2*k(i));
end
% y(i) = y + h*k(i);
end
y(N)

Corrected Euler's formula (two stages) Apply recursive form. In each iteration, as j increases from 0 to N, do the following calculations Problem setting y' = f(x,y),y(x0) = y0 Evaluate y(x*) at x* Select the number of subintervals N for [x0, x*] and use step size h=(x*-x0)/N, let xN=x*.

Explanation / Answer

%Euler's Method clear all; n = .01 y = zeros(1,n); % Create a vector for the y values which will be calculated y(1) = 300000 t(1) = 0; %This loop computes one step of Euler's method each iteration % Use f_outline.m to help compute each value of y. while y(i)>0 for i = 2:n t(i) = i*n y(i) = f_outline(t(i),y(i)) end end plot(t,y)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote