Home : Map : Chapter 2 : Java : Tech : Physics :
Differential Equations
JavaTech
Course Map
Chapter 2

Introduction
Essentials
Structure

Keywords
Primitive Types
Comments
Literals
Expressions
Operators
Statements
Casts & Mixing
Strings
Console Output 
   Demo
Exercises

    Supplements
Conditional: if-else
Repetitions
Flow Control

Java vs C/C++
JVM Instructions 1

     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

It could be said with only a slight exaggeration that everything in physics involves differential equations of one kind or another. From Newton's F=ma to Maxwell's equations to Schrodinger's equation, we see that differential equations provide the essential descriptions of the behavior of physical phenomena.

In some cases, we can solve these equations analytically but often we can not. Instead, approximation techniques are required and these become the basis of various numerical algorithms for solving the equations.

Even when an analytical solution exists, it can still help in understanding the system to use a numerical approach in a computer program to display the functional behavior graphically.

Ordinary Differential Equations

We look in this and later chapters at numerical solutions of ordinary differential equations (ODE). The methods discussed here apply to first-order ODEs. However, a higher order ODE can always be converted to a first-order ODE by new variable substitution. For example, in

           (1)

let

                     (2)

and then equation (1) becomes

            (3)

Thus with the introduction of the v variable, equations (2) & (3) become two coupled first-order differential equations.

In general, the problems will reduce to a set of equations as in the form

       

The goal is to determine x as a function of t. A numerical solution involves starting from an initial point (x0,t0) and using an algorithm to determine a series of points (xn,tn), each calculated based on the previous point(s). The points are separated in time by a fixed increment dt, or tn+1 = tn + dt.

ODE problems also can be divided into the following types:

  • Inital Value - the value of one point is known.
  • Boundary Value - the values along a perimeter of the space are known.
  • Eigenvalue - solutions sought for particular values of the equation parameters.

In this chapter we only look at initial value problems. In Chapter 4 : Physics we discuss boundary value problems. (We do not discuss eignevalue problems in this course.)

We start with the simplest method of solving ODE problems: the Euler or constant slope method.

References & Web Resources

Latest update: Oct. 21, 2005

            Tech
Arithmetic Ops
Math Class
More on Integers
FP : Overview
FP : Java  
  
Demo 1
More Mix/Cast
  Demo 2
Exercises

           Physics
Differential Eq.
Euler Method
  
Demo 1
Predictor-Corrector
  
Demo 2
Exercises

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.