Download presentation

Presentation is loading. Please wait.

Published byMalik Delanoy Modified over 2 years ago

1
TNPL JoongJin-Cho Runge-kutta’s method of order 4

2
TNPL JoongJin-Cho This routine solve the initial value problem at equidistant points Here the function f(x,t) is continuous the at equidistant points Here the function f(x,t) is continuous theinterval Algorithm

3
TNPL JoongJin-Cho Algorithm

4
TNPL JoongJin-Cho Runge-Kutta ’ s method of order 4 to solve a first-order differential equation Algorithm

5
TNPL JoongJin-Cho public static void main(String args[]){ int i; double t,ti,h,x,xi, N=5; double f; //Differential equation dx/dt=f(x,t)=x+t double t0,x0,f1,f2,f3,f4; x=xi; t=ti; f=x+t; for(i=0;i

6
TNPL JoongJin-Cho import java.io.*; public class RungeKutta2{ static BufferedReader bf = new BufferedReader (new InputStreamReader(System.in)); //4th order Runge-Kutta method, need derivative f public static void main(String args[])throws IOException { int i; double t,ti,h,x,xi,N=5; double f; double t0,x0,f1,f2,f3,f4; String str; System.out.print("Input initial value ti = >"); str=bf.readLine(); ti=Double.parseDouble(str); System.out.print("Input initial value xi = >"); str=bf.readLine(); xi=Double.parseDouble(str); System.out.print("step size h = >"); str=bf.readLine(); h=Double.parseDouble(str);

7
TNPL JoongJin-Cho x=xi; t=ti; f=x+t; for(i=0;i

Similar presentations

OK

Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 3: Flow Control I: For Loops.

Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 3: Flow Control I: For Loops.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on child growth and development Ppt on phonetic transcription Ppt on acute coronary syndrome icd-9 Ppt on 60 years of indian parliament members Ppt on recycling of waste fabric Download ppt on civil disobedience movement in the civil rights Ppt on cross docking facility Ppt on democratic rights class 9 Slideshare ppt on marketing Ppt on impact of unemployment in india