
Software: 
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: y = dy/dx
(1st derivative
of y with respect to x) Single ordinary differential equation An nth order LINEAR ORDINARY DIFFERENTIAL EQUATION has the form: F_{n}(x)*d^{n}y/dx^{n} + ... + F_{2}(x)*dēy/dxē + F_{1}(x)*dy/dx + F_{0}(x)*y = Q(x) or, using the above notation convention: F_{n}(x)*y^{(n)} + ... + F_{2}(x)*y'' + F_{1}(x)*y' + F_{0}(x)*y = Q(x) where F_{n}(x),...F_{2}(x), F_{1}(x), F_{0}(x), Q(x) may all be functions of x. A boundaryvalue problem involving the above linear ordinary differential equation requires n boundary conditions of the form: B_{mn}* y^{(n)} + ... + B_{m}_{2}* y'' + B_{m}_{1}*y' + B_{m0}*y = K_{m} where B_{mn},...B_{m}_{2}, B_{m}_{1}, B_{m0}, K_{m} are constants. An nth order NONLINEAR ORDINARY DIFFERENTIAL EQUATION has the form: F(d^{n}y/dx^{n},...,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 boundaryvalue 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 = y_{0} + y_{1}_{*}(xxc) + .... + y_{p}_{*}(xxc)^{p} for a power series solution, or of the form y = y_{0} + å y_{n}sin(2np(xxc)/per) + å y_{m } cos(2mp(xxc)/per) for a trigonometric series solution. Now divide [A,B] into pn subintervals of equal length = h: 0 1
2 3 m pn We substitute our assumed solution into the D.E. and, since the D.E. must be satisfied at each one of the pn+1 grid points, we obtain pn+1 equations in y_{0}, y_{1},...y_{p}, 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 y_{0}, y_{1},...y_{p}. 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: F_{0}*y'' + F_{1}*y' + F_{2}*y + F_{3}*z'+ F_{4}*z = F_{5} F_{6}*y'' + F_{7}*y' + F_{8}*y + F_{9}*z'+ F_{10}*z = F_{11} in which F_{0}, F_{1},...F_{11}_{ }may be functions of x. In the linear problem each boundary condition is of the type: B_{0}y'' + B_{1}_{*}y' + B_{2}*y + B_{3}*z'+ B_{4}*z = B_{5} where B_{0}, B_{1},...B_{5}_{ }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 = y_{0}+ y_{1}*(xxc) + .... + y_{P}*(xxc)^{P} z = z_{0} + z_{1}*(xxc) + .... + z_{Q}*(xxc)^{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 mn 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 In this way, we obtain m equations in y_{0}, y_{1},...y_{P}, z_{0}, z_{1},...z_{Q}. 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 Đ 20012010 Numerical Mathematics. All rights reserved.
