Question

Problem 9 Consider the following system of equations dr eds. dt 6y2 Use Eulers Method on this system starting at (xo,yo) (1,

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

MATLAB Code:

close all
clear
clc

delta_t = 0.25; n = 6;
x(1) = 1; y(1) = 1; % Initial values

fprintf('%-5s\t%-10s\t%-10s\n', 'Step', 'x', 'y')
fprintf('%-5d\t%-10.4f\t%-10.4f\n', 0, x(1), y(1))
for i=1:n
mx = dxdt(y(i));
my = dydt(x(i), y(i));
x(i + 1) = x(i) + delta_t*mx; % Euler
y(i + 1) = y(i) + delta_t*my; % Update
fprintf('%-5d\t%-10.4f\t%-10.4f\n', i, x(i + 1), y(i + 1))
end

function out = dxdt(y)
out = y + y^2;
end

function out = dydt(x,y)
out = -x + y/5 - x*y + 6*(y^2)/5;
end

Output Screenshot:

Command Window Step x 1.8888 1.5e00 1.8931 2.8482 2.8838 1.9429 1.892 1.8888 69·棠淋69 -0.1819 -e.5983 8.7228 0.7367 8

Add a comment
Know the answer?
Add Answer to:
Problem 9 Consider the following system of equations dr eds. dt 6y2 Use Euler's Method on this sy...
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
  • 1. Consider the following differential equation. ag = ty, y(0)=1. dt (a) Use Euler's Method with...

    1. Consider the following differential equation. ag = ty, y(0)=1. dt (a) Use Euler's Method with At = .1 to approximate y(1). (b) Use Euler's Method with At = .05 to approximate y(1). (c) Find the exact solution to the problem. Use this solution to compare the error for the different values of At. What does this say about the method? Note: On the course page there are notes describing an implementation of Euler's method on a spread sheet.

  • Question 9 2 pts dt -ay, where Using Euler's method on a system of the form...

    Question 9 2 pts dt -ay, where Using Euler's method on a system of the form dy a is a positive constant, results in the equation Yi+1 yi (1 - ah). What is the condition for the solution to be stable? 0 |1 - ah| > 1 0 |1 - ah| > 0 o 1 - ah] < 0 o 1 - ahl <1 Question 10 2 pts Partial differential equations have a single independent variable. O True False

  • Consider the initial value problem y (t)-(o)-2. a. Use Euler's method with At-0.1 to compute appr...

    Please help with all the parts to the question Consider the initial value problem y (t)-(o)-2. a. Use Euler's method with At-0.1 to compute approximations to y(0.1) and y(0.2) b. Use Euler's method with Δ-0.05 to compute approximations to y(0.1) and y(02) 4 C. The exact solution of this initial value problem is y·71+4, for t>--Compute the errors on the approximations to y(0.2) found in parts (a) and (b). Which approximation gives the smaller error? a. y(0.1)s (Type an integer...

  • Problem 1 Use Euler's method with step size h = 0.5 to approximate the solution of the IVP. 2 dy ...

    Problem 1 Use Euler's method with step size h = 0.5 to approximate the solution of the IVP. 2 dy ev dt t 1-t-2, y(1) = 0. Problem 2 Consider the IVP: dy dt (a) Use Euler's method with step size h0.25 to approximate y(0.5) b) Find the exact solution of the IV P c) Find the maximum error in approximating y(0.5) by y2 (d) Calculate the actual absolute error in approximating y(0.5) by /2. Problem 1 Use Euler's method...

  • Question 3 Consider the following linear system of differential equations dx: = 2x-3y dt dy dt (a) Write this system of...

    Question 3 Consider the following linear system of differential equations dx: = 2x-3y dt dy dt (a) Write this system of differential equations in matrix form (b) Find the general solution of the system (c) Solve the initial value problem given (0) 3 and y(0)-4 (d) Verify the calculations with MATLAB Question 3 Consider the following linear system of differential equations dx: = 2x-3y dt dy dt (a) Write this system of differential equations in matrix form (b) Find the...

  • help, pls tq. 4. Consider the first order autonomous system d13-1 0)-1. (a) Estimate the solution of the system (1) at t0.2 using two steps of Euler's method with 2v, u(0)0 step-size h 0.1 T1+C2+...

    help, pls tq. 4. Consider the first order autonomous system d13-1 0)-1. (a) Estimate the solution of the system (1) at t0.2 using two steps of Euler's method with 2v, u(0)0 step-size h 0.1 T1+C2+A1-4 (b) An autonomous system of two first order differential equations can be written as: du dt=f(mu), u(to) = uo, dv dt=g(u, u), u(to) to. The Improved Euler's scheme for the system of two first order equations is tn+1 = tn + h, Use the Improved...

  • (1 point) Suppose that we use Euler's method to approximate the solution to the differential equation...

    (1 point) Suppose that we use Euler's method to approximate the solution to the differential equation dyr. dzvi y(0.4) = 9. Let f(x, y) = 25/y. We let Xo = 0.4 and yo = 9 and pick a step size h=0.2. Euler's method is the the following algorithm. From In and Yn, our approximations to the solution of the differential equation at the nth stage, we find the next stage by computing In+1 = xin + h Y n+1 =...

  • Problem 7. Consider the following system of linear differential equations: = ax + y, dt =...

    Problem 7. Consider the following system of linear differential equations: = ax + y, dt = ay Let J = 0 Verify that exp(Jt) is the solutions. J = ja 1] a

  • 3. Euler's Method (a) Use Euler's Method with step size At = 1 to approximate values...

    3. Euler's Method (a) Use Euler's Method with step size At = 1 to approximate values of y(2),3(3), 3(1) for the function y(t) that is a solution to the initial value problem y = 12 - y(1) = 3 (b) Use Euler's Method with step size At = 1/2 to approximate y(6) for the function y(t) that is a solution to the initial value problem y = 4y (3) (c) Use Euler's Method with step size At = 1 to...

  • Consider the initial value problem given below dx -2 +t sin (x), dt x(0) 0 Use...

    Consider the initial value problem given below dx -2 +t sin (x), dt x(0) 0 Use the improved Euler's method with tolerance to approximate the solution to this initial value problem at t 1. For a tolerance of e-0.01, use a based on absolute error stopping procedure Consider the initial value problem given below dx -2 +t sin (x), dt x(0) 0 Use the improved Euler's method with tolerance to approximate the solution to this initial value problem at t...

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