Question

PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU.

Consider the following Ordinary Differential Equation (ODE): dy = 3.0*** + 1.08 * 210 – 3* y2 dat with initial condition at p

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

clear;

clc;

f=@(x,y)3*x^4+1.08*x^10-3*y^2; %Write your f(x,y) function, where dy/dx=f(x,y), x(x0)=y0.

x0=0.375; %example x0=0

y0=0.0044; %example y0=0.5

xn=1.375;% where we need to find the value of y example x=2

h=0.25; %example h=0.2

fprintf(' x y \n');

while x0<=xn

fprintf('%.3f %.4f \n',x0,y0); %values of x and y

k1=f(x0,y0);

x1=x0+h;

k2=f(x1,y0+k1*h);

y1=y0+k2*h;

x0=x1;

y0=y1;

end

x y
0.375 0.0044
0.625 0.1210
0.875 0.5931
1.125 2.1421
1.375 10.8901

Add a comment
Know the answer?
Add Answer to:
PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. Consider the...
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
  • du Consider the following Ordinary Differential Equation (ODE): = 2.5 + + +0.5 210 - 2.y?...

    du Consider the following Ordinary Differential Equation (ODE): = 2.5 + + +0.5 210 - 2.y? with initial condition at point o = 0.375: 300.0037 Apply Runge-Kutta method of the second order with h = 0.25 and the set of parameters given below to approximate the solution of the ODE at the three points given in the table below. Fill in the blank spaces. Round up your answers to 4 decimals. M 0.375 0.0037 0.625 0.0497 0.875 1.125 1.375 Parameters...

  • Consider the following Ordinary Differential Equation (ODE): dy = 0.3 * x2 + 0.04 * 26...

    Consider the following Ordinary Differential Equation (ODE): dy = 0.3 * x2 + 0.04 * 26 – 4* y? dx with initial condition at point 20 = 0.6875: yo = 0.0325 Apply Runge-Kutta method of the second order with h = 0.125 and the set of parameters given below to approximate the solution of the ODE at the three points given in the table below. Fill in the blank spaces. Round up your answers to 4 decimals. Yi 0.0325 0.6875...

  • Question 4 Not yet answered Marked out of 1.5000 Flag question Consider the following Ordinary Differential...

    Question 4 Not yet answered Marked out of 1.5000 Flag question Consider the following Ordinary Differential Equation (ODE): dy dx = 4.0 * ** + 2.56* *10 - 4 * y? with initial condition at point Xo = 0.75: 3b = 0.1898 Apply Runge-Kutta method of the second order with h = 0.1 and the set of parameters given below to approximate the solution of the ODE at the three points given in the table below. Fill in the blank...

  • PLEASE ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. THIS IS...

    PLEASE ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. THIS IS THE FULL QUESTION GIVEN. dyi Consider the following Ordinary Differential Equation (ODE) for function yı (2) on interval [0, 1] dayi dyi +(-9.7) * + 28.64 * dr3 d. 2 dar + (-23.828) * yı (x) = -5.18 0.9-2 with the following initial conditions at point x 0: dyi dy yi = -4.98 = 1.168 26.8052 dar Introducting notations dyi dy2 dayı Y2 =...

  • PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. dyi y...

    PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. dyi y = 2.5. dy Consider the following Ordinary Differential Equation (ODE) for function yı(a) on interval [0, 1] dyi dayı dyi d3 + (-3.3) * + 2.9 * + (-0.6) * yı(20) = 0.0 dar2 da with the following initial conditions at point x = 0: dayı = 8.86 = 18.248 dar dra Introducting notations dyi dy2 y2 = da da d2 convert the ODE...

  • PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. Solve the...

    PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. Solve the following ODE from x = 4 to x = 4.5 using a step size of h = 0.5 with non-self-starting Heun Method, where y(3.5) = 0.244898 and y(4) = 0.1875. List the values for the Predictor and the Corrector with three iterations only. Make sure you include 4 decimals in your answer. dy dx 3y + = 0 Example answer: 0.2500 X DO) pl...

  • ME 32200 Programming course (MATLAB) 4. Please finish the following Matlab code for solving the ODE:...

    ME 32200 Programming course (MATLAB) 4. Please finish the following Matlab code for solving the ODE: dy = y(1+1) dt I.C. y(0) = 0 with the multi-step 4th order Milne's Method, and apply 4th order Runge Kutta method to the first 4 points (1 boundary point and the next 3 points). (Hint: 4th order Milne's Method Predictor: 7i+ = Y-3 +h(2f;- fi- +25,-2) Corrector: y = y + + +0. +45j + fi-) Where f; = f(t;,y,) and Fit =...

  • Please answer with Matlab Programming that can be copied and pasted when doing the Matlab part...

    Please answer with Matlab Programming that can be copied and pasted when doing the Matlab part 4 part 2 4. Please finish the following Matlab code for solving the ODE: dy 2(1+t) dt I.C. y(0) = 0 with the multi-step 4th order Milne's Method, and apply 4th order Runge Kutta method to the first 4 points (1 boundary point and the next 3 points). (Hint: 4th order Milne's Method Predictor: Jon = Y-3 + H25,- fia+2f1-2) h Corrector: Y:-1 =...

  • PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. Use Simpson's...

    PLEASE PLEASE,ONLY ANSWER THIS QUESTION IF YOU COULD GIVE ME THE MATLAB CODE.THANK YOU. Use Simpson's 3/8 rule with n segments to approximate the integral of the following function on interval [3, 10] 2.(x-3) f(x) = 1.385 · sin( 243-2) The exact value of the integral is Texact = 6.8648 Fill in the blank spaces in the following table. Round up your answers to 4 decimals. Relative error &, is defined as | I - Iexact * 100% Iexact n,...

  • Hello These are a math problems that need to solve by MATLAB as code Thank you...

    Hello These are a math problems that need to solve by MATLAB as code Thank you ! Initial Value Problem #1: Consider the following first order ODE: dy-p-3 from to 2.2 with y() I (a) Solve with Euler's explicit method using h04. (b) Solve with the midpoint method using h 0.4. (c) Solve with the classical fourth-order Runge-Kutta method using 0.4 analytical solution of the ODE is,·? solution and the numerical solution at the points where the numerical solution is...

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