Question
using MATLAB
Improved Euler Method A. Complete the given algorithm for the Improved Euler Method using basic coding language or coding log
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Code

clear all
clc
f=@(x,y)x^2*y-1;
x0=2;
y0=1;
xn=3;
h=0.5;
fprintf('\n x y ');
while x0<=xn
fprintf('\n%4.3f %4.3f ',x0,y0);
k=y0+h*f(x0,y0);
x1=x0+h;
y1=y0+h/2*(f(x0,y0)+f(x1,k));
x0=x1;
y0=y1;
end

Output is

x y
2.000 1.000
2.500 5.406
3.000 62.405

Add a comment
Know the answer?
Add Answer to:
using MATLAB Improved Euler Method A. Complete the given algorithm for the Improved Euler Method using...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT