Question

Compare Euler and extended Euler for solution of x = 1 + x2 + t3 for x(t=2) given x(t=1) = -4 using 10 points. Report the pe

Matlab script? Command Window? And Solve?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

x1=0.0

x=0

t=0

%%For T=1 we find the value of x'

x=-4

t=1

x1=1+(x*x)+(t*t*t)

Now this is the general algorithm to solve the ruler method put the values and you will get the ans

%% the Initial conditions and setup

h = (enter your step size); % step size

x = (enter the starting value of x ):h:(enter the ending value of x); % the range of the x value entered

y = zeros(size(x)); % allocate the result of the subject y

y(1) = (enter the starting value of y ); % the initial y value is inserted

n = numel(y); % the number of y values present

% The loop to solve equation

for i=1:n-1

    f = the expression for x'

    y(i+1) = y(i) + h * f;

end

Add a comment
Know the answer?
Add Answer to:
Matlab script? Command Window? And Solve? Compare Euler and extended Euler for solution of x' =...
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