RungeKutta
2016-08-23
0 0 0
no vote
Other
Earn points
/*
* RungeKutta.java
* from `Introductory Java for Scientists and Engineers'
* chapter: `Numerical Computation'
* section: `Runge-Kutta Methods'
*
* This problem uses Euclid's method and the fourth
* order Runge-Kutta method to compute y at x=1
* for the D.E. dy/dx = x * sqrt(1 + y*y)
* with initial value y=0 at x=0.
*/
public class RungeKutta
{
// The number of steps to use in the interval
public static final int STEPS = 100;
// The derivative dy/dx at a given value of x and y.
public static double deriv(double x, double y)
{
return x * Math.sqrt(1 + y*y);
}
// The `main' method does the actual computations
public static void main(String[] argv)
{
// `h' is the size of each step.
* RungeKutta.java
* from `Introductory Java for Scientists and Engineers'
* chapter: `Numerical Computation'
* section: `Runge-Kutta Methods'
*
* This problem uses Euclid's method and the fourth
* order Runge-Kutta method to compute y at x=1
* for the D.E. dy/dx = x * sqrt(1 + y*y)
* with initial value y=0 at x=0.
*/
public class RungeKutta
{
// The number of steps to use in the interval
public static final int STEPS = 100;
// The derivative dy/dx at a given value of x and y.
public static double deriv(double x, double y)
{
return x * Math.sqrt(1 + y*y);
}
// The `main' method does the actual computations
public static void main(String[] argv)
{
// `h' is the size of each step.
java
RungeKutta
Related Source Codes
Android AOA Android Open Accessory Development Usi
0
0
no vote
VPN source code accelerator
0
0
no vote
VPN source code
0
0
no vote
Springboot Campus Recruitment System
0
0
no vote
Java intelligent QR code access control management
0
0
no vote
No comment