Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE JAVA TO SOLVE THIS RUNGE KUTTA PROBLEM: Assignment: Design and construct a computer program in one of the approved languages (C, C++, C#, Java,

USE JAVA TO SOLVE THIS RUNGE KUTTA PROBLEM:image text in transcribed

Assignment: Design and construct a computer program in one of the approved languages (C, C++, C#, Java, Pascal, Python, etc.) that will illustrate the use of a third-order explicit Runge-Kutta method of your own design. In other words, you will first have to solve the Runge-Kutta equations of condition for the coefficients of a third-order Runge-Kutta method. Then, you will use these coefficients in a computer program to solve the ordinary differential equation below. Be sure to follow the documentation and programming style policies of the Computer Science Department. The initial value problem to be solved is the following x(t)1sin(12 t) x(t) subject to the initial condition: x(0)1.0 Obtain a numerical solution to this problem over the range from t-0.0 to t-2.0 for seven different values of the stepsize h-0.1,0.05,0.025,0.0125, 0.00625,0.003125, and 0.0015625 In other words, make seven runs with 20, 40, 80, 160, 320. 640, and 1280 steps, respectiver. for ectru print out the au of h and ne a tbil of and . The true solution of this differential equation resembles the following plot of x(t) as a function of t. x(t) 3.0 2.5 2.0 0.5 1.0 1.5 2.0 The answer at the end of the integration is about 2.9769173907278 Hint: It is often helpful to test your program on simple differential equations (such as x' = 1 or xt orx' ) as a part of the debugging process. Once you have worked these simple cases, then try working the nonlinear differential equation given above for the assignment (with a small stepsize). Also, check your coefficients to make sure that they satisfy the equations of condition and that you have assigned these correct values to the variables or constants in your program properly. For example, a common error is to write something like: a2-1/2; when you meant to write a2-1.0/2.0; so please be careful

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

=+you think is being taxed when more money is printed? Why?

Answered: 1 week ago