Differential Equations
Ķ HOME Ķ Math Software Downloads Ķ Numerical Methods Ķ Register Your Software Ķ Contact Ķ Search Ķ Credit Ķ

Software:
Linear Algebra
Functions
Ordinary Differential Equations
Systems of Nonlinear Equations
Multiple Integration
Maxima and Minima
Functions and Equations
Regression
Approximation & Interpolation
Stereographer
Math Miscellanea
Support Software
Numerical Methods:
Integration and Differentiation
Solution of Equations
Maxima and Minima
Approximation of Functions
Regression
Polynomial Regression
Fast Fourier Transforms
Differential Equations
Linear Algebra Methods
Miscellaneous Procedures
Decimal Comma/Decimal Point
                            

   
Google
 
ORDINARY DIFFERENTIAL EQUATIONS

REQUIRED DIFFERENTIAL EQUATION SYNTAX

The syntax for entering differential equations and boundary conditions is very simple and intuitive. A common notation using the single quote ’ is used.

The programs allow you to define the names of the dependent and independent variables, so assume you have named y as the dependent variable and x as the independent one. Then the expressions y’, y’’, y’’’, etc., are used to represent the first, second, third, etc., derivatives of the dependent variable y with respect to the independent variable x, that is:

   = dy/dx     (1st derivative of y with respect to x)
y’’   = d
ēy/dxē  (2nd derivative of y with respect to x)
.
.
.
y(n) =
dny/dxn  (nth derivative of y with respect to x)

Single ordinary differential equation

An nth order LINEAR ORDINARY DIFFERENTIAL EQUATION has the form:

Fn(x)*dny/dxn + ... + F2(x)*dēy/dxē + F1(x)*dy/dx + F0(x)*y = Q(x)

or, using the above notation convention:

Fn(x)*y(n) + ... + F2(x)*y'' + F1(x)*y' + F0(x)*y = Q(x)

where Fn(x),...F2(x), F1(x), F0(x), Q(x) may all be functions of x.

A boundary-value problem involving the above linear ordinary differential equation requires n boundary conditions of the form:

Bmn* y(n) + ... + Bm2* y'' + Bm1*y' + Bm0*y = Km

where Bmn,...Bm2, Bm1, Bm0, Km are constants.

An nth order NONLINEAR ORDINARY DIFFERENTIAL EQUATION has the form:

F(dny/dxn,...,dēy/dxē,dy/dx,y,x)=0

Or, using the notation convention

F( y(n) , ... , y’’ , y’ , y , x ) = 0

where F is a nonlinear function (may be linear too!).

A boundary-value problem involving the above nonlinear ordinary differential equation requires n boundary conditions which may be of a similar form, except that they cannot be functions of x.

Suppose we wish to solve the linear or nonlinear problem in the interval [A,B].  To use the method of Undetermined Coefficients we assume a solution of the form

y = y0 + y1*(x-xc) + .... + yp*(x-xc)p

for a power series solution, or of the form

y = y0 + å ynsin(2np(x-xc)/per) + å ym cos(2mp(x-xc)/per)

for a trigonometric series solution.

Now divide [A,B] into p-n subintervals of equal length = h:

   0     1     2     3        m        p-n
   +—————+—————+—————+———...——+——...———+
   A     A+h   A+2h  A+3h     A+mh     B

We substitute our assumed solution into the D.E. and, since the D.E. must be satisfied at each one of the p-n+1 grid points, we obtain p-n+1 equations in y0, y1,...yp, one for each grid point.  If we then also substitute the assumed solution into each of the n boundary conditions, we would have a total of p+1 equations in the p+1 unknown y0, y1,...yp.  By solving such system of equations we find the desired coefficients.

Systems of ordinary differential equations

To simplify the explanations, suppose we have a system with x as independent variable and 2 dependent variables, say y and z.

To illustrate, the form of a LINEAR system of 2nd order in y and 1st order in z is:

F0*y'' + F1*y' + F2*y + F3*z'+ F4*z  = F5

F6*y'' + F7*y' + F8*y + F9*z'+ F10*z = F11

in which F0, F1,...F11 may be functions of x.  In the linear problem each boundary condition is of the type:

B0y'' + B1*y' + B2*y + B3*z'+ B4*z  = B5

where B0, B1,...B5 are constants.

The form of a NONLINEAR system of nth order in y and in z is:

F(y(n) , ... , y’’ , y’ , z(n) ,..., z'' , z' , y , z , x)=0

G(y(n) , ... , y’’ , y’ , z(n) ,..., z'' , z' , y , z , x)=0

with boundary conditions which may be of a similar type, except that they cannot be functions of x.

Of course, the order need not be the same in both y and z, and there may be more than 2 equations.

Suppose we wish to solve the problem in the interval [A,B].  To use the method of Undetermined Coefficients we assume a solution of the form

y = y0+ y1*(x-xc) + .... + yP*(x-xc)P

z = z0 + z1*(x-xc) + .... + zQ*(x-xc)Q

We substitute our assumed solution into the D.E.'s and B.C.'s.  If we have a total of m coefficients to determine then we need m equations.  If we have n boundary conditions, they will provide n equations, so we need m-n more, and those are obtained by dividing the interval [A,B] into a sufficient number of subintervals.  If this number is TY, we divide [A,B] into TY subintervals of subintervals of equal length = h.  This gives us TY+1 grid points at each of which the D.E.'s must be satisfied:

      h     h     h
   +—————+—————+—————+———...———+
   A                           B

In this way, we obtain m equations in y0, y1,...yP, z0, z1,...zQ.  By solving such system of equations we find the desired coefficients.

It should be pointed out that a nonlinear problem may have a unique solution, multiple solutions, or none at all, depending on the differential equation(s) and the given boundary condition(s).

The use of power and trigonometric series is partly justified by Weierstrass' Approximation Theorems:

1) Any function which is continuous in an interval may be approximated in that interval, to any degree of accuracy, by a finite power series.

2) Any continuous periodic function may be approximated, to any degree of accuracy, by a finite trigonometric series.

Naturally, if the function itself is not a finite power or trigonometric series, then we need more and more terms for more and more accuracy.  A power or trigonometric series with infinite number of terms may yield the exact value of the function, as is the case with Taylor and Fourier series.  Developing a Fourier or Taylor series, however, may not be very easy.  A Fourier series requires the evaluation of the Fourier Coefficients, which are integrals which in turn may need numerical evaluation.  A Taylor expansion requires you to find all the function's derivatives and this may be a difficult task.  (Curiously, continuous nondifferentiable functions exist, that is, there are continuous curves with no tangent at any point.

Thus, the Weierstrass' Theorems makes this approach acceptable if the solution is known to be continuous in the interval of interest.  If necessary, the problem should be solved piecewise, each time choosing an interval in which the solution and its derivatives are known to be continuous and sufficiently smooth (with a limited number of `wiggles').

Copyright Đ 2001-2010 Numerical Mathematics. All rights reserved.