13.3.4.8 Differential Equations and Bessel Functions

13.3.4.8  Differential Equations and Bessel Functions

A differential equation contains one or several derivatives of an unknown function y(x). The goal is to determine the value of y(x) from the equation. The equation may contain y(x) itself as well as known functions of x and constants. Differential equations arise in many engineering and other applications in terms of mathematical models of physical and other systems. The simplest ones can be solved by using concepts from elementary calculus. However, many complicated differential equations frequently occur in mathematical models of systems.

The order of a differential equation is the order of the highest derivative that appears in the equation. A differential equation, in general, may have many solutions. This is because we know from calculus that integration introduces arbitrary constants. A solution to a differential equation is a function and if this function contains arbitrary constants, we call it a general solution. If the constants in the general solution are replaced by specific values, we obtain a particular solution for the differential equation. A differential equation may also have an additional solution that cannot be obtained from the general solution. Such a solution is called the singular solution. A singular solution is not generally interesting to scientists and engineers, but mathematicians find them useful for complete characterization of the solutions of a differential equation. A general solution to a
differential equation can be particularized if some initial values are given to the unknown function and its derivatives to begin with. Together, the differential equation and its initial values constitute an initial value problem.

A first-order differential equation (more correctly, a first-order ordinary differential equation) involves first derivatives of the unknown function. A first-order linear differential equation is written as

 

        y'(x)+p(x) y(x)=r(x)

where p(x) and r(x) are any two arbitrary known functions of x. The function p(x) is called a coefficient of the equation. y'(x) is the first derivative of . If r(x)=0, it is called a homogeneous first-order linear differential equation; otherwise, it is non-homogeneous. The term ordinary as opposed to partial indicates that solutions to an ordinary differential equation is a function of one variable, whereas a solution to a partial differential equation is function of two or more variables. Partial differential equations are more complex to solve than ordinary differential equations and require the development of additional techniques.

A second-order differential equation involves second derivatives of an unknown function y(x). A second-order differential equation is called linear if if can be written as

 

       y''(x)+p(x) y'(x)+q(x) y(x)=r(x)

where p(x), q(x) and r(x) are arbitrary known functions of x, and non-linear if it cannot be written in this form. Such an equation is linear in the function y(x) and its derivatives because the derivatives and the function are not raised to any power >1. Linear equations are much simpler to handle than non-linear equations. If r(x)=0, Equation Error! Reference source not found. becomes

 

       y''(x)+p(x) y'(x)+q(x) y(x)=0

and is called homogeneous. If r(x)¹0, Equation Error! Reference source not found. is called non-homogeneous. The functions p(x) and q(x) are called coefficients of the equation. A solution of a second order differential equation on some open interval a<x<b is a function y=h(x) that has derivatives y'=h'(x) and y''=h''(x) and satisfies the differential equation for all x in that interval. In other words, the equation becomes an identity if we replace the unknown function y(x) and its derivative by h and its corresponding derivatives.

Second-order linear differential equations have many applications in mechanics and electrical circuit theory. It makes them more important than higher-order equations from a practical viewpoint. Some second order differential equations are simple; their solutions are familiar functions from calculus. Others are more involved, their solutions being more difficult. For example, if the coefficients of a homogeneous linear differential equation are constants, it can be solved using algebraic methods, and the solutions are elementary functions known from calculus. However, if the coefficients are not constant but depend on x, the situation is more complicated. Legendre’s equations, the hypergeometric equations and Bessel’s equations are of this type. These and other equations and their solutions play an important role in applied mathematics. We discuss only one such equation: the Bessel’s
equations although Math::Cephes provides implementation of the other two as well.

Bessel’s Differential Equations of Order n is given by the following.

 

                     

Here, y'(x) represents the first derivative and y''(x) represents the second derivative of the function y(x). The parameter n is a given non-negative real number. This equation appears in problems on vibrations, electric fields, heat conduction, and fluid flow, where the problem shows cylindrical symmetry. Although the Bessel’s differential equation is a second-order differential equation, its name is based on the parameter n that appears in Equation Error! Reference source not found. The equation given above is called Bessel’s Equation of Order n based on the parameter n and not on the second order of the derivative y''(x). Equation Error! Reference source not found. can be
written in the so-called standard form, after dividing throughout by . The standard form is shown below.

 

                     

We clearly see that in this equation, the coefficients are  and  and are dependent on x.

The number n is usually a positive integer or a positive rational number. Bessel’s differential equations of integral or half-integral orders (an integer plus ) are particularly important in applications. The Bessel’s differential equation must be solved differently depending on the value of n There are two standard methods of solving such equations: the power-series method which obtains solutions in the form of power series, and an extension of it called the Frobenius method. We do not discuss these methods here, but want the reader to be aware of them.

There are several solutions to the Bessel’s equation and the solutions are complicated. Bessel’s equation is a second-order homogeneous ordinary differential equation. It is second-order because it contains y''(x), the second derivative of the unknown function y(x). It is a homogeneous equation because the right-hand side is 0. A second-order homogeneous equation needs two particular solutions if we want to write a general solution for it. The two particular solutions must be independent of each other so that one is not derivable from the other. In the 1700s and 1800s, many mathematicians toiled over solving the Bessel’s equation and obtained two widely accepted particular solutions. The particular solutions are complicated, and are in terms of summation of series. Their names are also universally accepted. The two particular solutions are called  and
, the subscript n referring to the order of the Bessel’s equation.  has a well-accepted name: Bessel’s function of the first kind, or simply, Bessel’s function.  also has a well-accepted name: Bessel’s function of the second kind. We look at the values of  and  a little later. If we know  and , we can obtain a general solution to the Bessel’s equation as given below.

 

                     

Here  and  are two arbitrary constants. Thus, the general solution for the y(x) function used in the Bessel’s equation is obtained as a linear combination of the two particular solutions: Bessel’s function of the first kind, and Bessel’s function of the second kind.

Math::Cephes gives us functions that return values of  and  for various values of n and x. Math::Cephes has several such functions. The names of these functions are given in Table 13.11.

 



Fist kind functions


Second kind functions

 


j0


y0


 

 


j1


y1

 


jn


yn

 


jv


yv

 

Table 13.11:  Some Bessel’s Functions in Math::Cephes

.

The names follow standard names used by mathematicians. Mathematicians usually talk about four variations of Bessel’s functions of the first kind: , ,  and .  is the particular solution of the first kind when the constant n used in the Bessel’s equation is zero. In other words, it is the first particular solution to the differential equation given below.

 

                     

Its value can be obtained from the solution  discussed later. However, because it is used frequently, Math::Cephes defines it as a separate function. The value of  is given below.

 

                     

 is called the Bessel function (of the first kind) of order 0. In Math::Cephes, it is simply called j0 and is called with an argument x, integer or non-integer.

 is the particular solution of the first kind of order 1. In other words, it is the first particular solution when the constant n in the Bessel’s equation is 1. Thus,  is the first particular solution of the differential equation given below.

 

                     

The value of  is given below.

 

                     

 is called the Bessel function (of the first kind)) of order 1. In Math::Cephes, the corresponding function is j1. j1 takes one argument that can take integer or non-integer value.

If the constant n used in the Bessel’s equation is an integer, it is written as n. The particular solutions to the Bessel’s equation are different when n is an integer n, and when it is not. The first particular solution when n is an integer is written as . In Math::Cephes, the corresponding function is jn. It takes two arguments. The first argument is an integer and corresponds to n. The second argument corresponds to x and can be integer or non-integer. The value of  is given below.

 

                     

The values of  and  given earlier can be obtained by instantiating n in the value of .  is called the Bessel function (of the first kind) of order n. It is also called the Bessel function (of the first kind) of integer order.

When n is not necessarily an integer, the first particular solution is written as . Its value is given below.

 

                     

 is called the Bessel function (of the first kind) of order n. It is also called the Bessel function (of the first kind) of non-integer order. We have seen the definition of the gamma (G) function already. If x=n, an integer, G(n+1)=n!. Thus, the gamma function in the denominator of the formula for  becomes (n+k)! when n, a non-integer.

In Math::Cephes, the corresponding function is jv. It takes two arguments. The first argument corresponds n and the second to x. Both can take integral or non-integral values.

Now, that we have discussed the first particular solution to the Bessel’s equation, we discuss the second particular solution. The Bessel’s functions corresponding to the second particular solution are called Bessel’s functions of the second kind. Before proceeding further, we need to make it very clear that one does not have to be confused by the distinction between the first kind and the second kind Bessel functions. These are two particular solutions to the Bessel’s equation and mathematicians, long ago, agreed upon their values and the corresponding names, as either the first kind or the second kind. There is nothing mysterious or baffling about the names and their values, except that they are universally accepted by mathematicians. For our purposes, we do not need to know how the exact values of the two particular solutions are obtained. However, for many applications, we do not need to remember the values.
The only thing we need to know is whether a solution of the first or the second kind is needed. We also need to know the value of the constant n and whether it is an integer or a non-integer. When it is an integer, there are two special cases corresponding to 0 and 1.

The Bessel’s functions of the second kind correspond to the second particular solution of the Bessel’s equation. Once again, there are four solutions that are usually discussed: , ,  and . The corresponding functions in Math::Cephes are y0, y1, yn and yv. Each of the first two takes one argument, corresponding to x. The argument can take integer or non-integer values. Each of the last two takes two arguments each, the second argument corresponding to x. The first argument to yn is an integer. The first argument to yv can be an integer or a non-integer. The four solutions are called Bessel’s function of the second kind of order 0, Bessel’s function of the second kind of order 1, Bessel’s function of the second kind of integer order, and Bessel’s function of the second kind of non-integer order, respectively. The values of the functions  and  are given below. One can obtain the other two in many advanced mathematics books for engineers and scientists. Some such books have been
listed earlier in the section.

 

                     

                                        (19)

                     

Here  is given as below.

 

                     

It is the so-called harmonic series. Once again, the values are very complicated, but it is not necessary to remember them for most purposes. Here, the assumption is that x>0 and n=0,1,×××.

Bessel’s functions have been extended to take care of the Bessel’s equation when the solutions are complex even when x is real. This extension comes in handy in some practical situations. The complex solutions are called Bessel’s functions of the third kind or order n or Hankel functions. Math::Cephes defines such functions although we do not discuss them here.

The following program simply prints out the values of the Bessel’s functions of first and second kind for a sequence of argument values.

 Program 13.7

#!/usr/bin/perl
#bessel.pl
use Math::Cephes qw(:bessels);
use strict;

print "Bessels function of first and second kind of order  0 and 1\n";
print "Using integer and non-integer values of x\n";
print "_" x 65, "\n";
printf "%5s%15s%15s%15s%15s\n", "x", "J0     ", "J1     ", 
               "Y0     ", "Y1     ";
for (my $x = 1; $x <= 30; $x = $x + 2.5 ){
    my $j0 = Math::Cephes::j0 ($x);
    my $j1 = Math::Cephes::j1 ($x);
    my $y0 = Math::Cephes::y0 ($x);
    my $y1 = Math::Cephes::y1 ($x);
    
    printf "%5.0f%15.10f%15.10f%15.10f%15.10f\n", 
          "$x", "$j0", "$j1", "$y0", "$y1";
  }

print "\nBessels function of first kind of integer order n\n";
print "Using integer and non-integer values of x\n";
print "_" x 30, "\n";
printf "%6s%6s%15s\n", "x", "n", "Jn (x)     ";

for (my $n = 0; $n <= 10; $n = $n + 1){
  for (my $x = 1; $x <= 5; $x = $x + 2.5){
           my $jn = Math::Cephes::jn ($n, $x);
           printf "%6.0f%6.0f%20.15f\n", $n, $x, $jn;
  }
}

print "\nBessels function of second kind of integer order n\n";
print "Using integer and non-integer values of x\n";
print "_" x 30, "\n";
printf "%6s%6s%15s\n", "x", "n", "Jv (x)     ";

for (my $n = 1000; $n <= 2000; $n = $n + 100){
  for (my $x = 10000; $x <= 50000; $x = $x + 25000){
           my $jv = Math::Cephes::jv ($n, $x);
           printf "%6.0f%6.0f%20.15f\n", $n, $x, $jv;
  }
}

print "\nBessels function of second kind of integer order n\n";
print "Using integer and non-integer values of x\n";
print "_" x 45, "\n";
printf "%6s%6s%30s\n", "x", "n", "Yn (x)     ";

for (my $n = 100; $n <= 200; $n = $n + 10){
  for (my $x = 1000; $x <= 5000; $x = $x + 2500){
           my $yn = Math::Cephes::yn ($n, $x);
           printf "%6.0f%6.0f%35.20f\n", $n, $x, $yn;
  }
}

print "\nBessels function of second kind of non-integer order n\n";
print "Using integer and non-integer values of x\n";
print "_" x 45, "\n";
printf "%6s%6s%30s\n", "x", "n", "Yv (x)     ";

for (my $n = 1000; $n <= 2000; $n = $n + 100){
  for (my $x = 10000; $x <= 50000; $x = $x + 25000){
           my $yv = Math::Cephes::yv ($n, $x);
           printf "%6.0f%6.0f%35.20f\n", $n, $x, $yv;
  }
}

 

The obvious output of the program is given below.

 

Bessels function of first and second kind of order  0 and 1

Using integer and non-integer values of x

_________________________________________________________________

    x        J0             J1             Y0             Y1

    1   0.7651976866   0.4400505857   0.0882569642  -0.7812128213

    4  -0.3801277400   0.1373775274   0.1890219439   0.4101884179

    6   0.1506452573  -0.2766838581  -0.2881946840  -0.1750103443

    8   0.0419392518   0.2731219637   0.2702051054  -0.0261686794

   11  -0.1711903004  -0.1767852990  -0.1688473239   0.1637055374

   14   0.2149891659   0.0380492921   0.0300770090  -0.2140229303

   16  -0.1748990740   0.0903971757   0.0958109971   0.1779751689

   18   0.0771648214  -0.1666336400  -0.1686563450  -0.0817478585

   21   0.0365790710   0.1711202728   0.1702017584  -0.0325392608

   24  -0.1239282316  -0.1109461434  -0.1082861177   0.1216532807

   26   0.1559993155   0.0150457306   0.0120446259  -0.1557965532

   28  -0.1262911314   0.0777013579   0.0799040393   0.1277119251

 

Bessels function of first kind of integer order n

Using integer and non-integer values of x

______________________________

     x     n    Jn (x)

     0     1   0.765197686557967

     0     4  -0.380127739987263

     1     1   0.440050585744933

     1     4   0.137377527362327

     2     1   0.114903484931900

     2     4   0.458629184194307

     3     1   0.019563353982668

     3     4   0.386770111716881

     4     1   0.002476638964110

     4     4   0.204405293034632

     5     1   0.000249757730211

     5     4   0.080441986647992

     6     1   0.000020938338002

     6     4   0.025428954531059

     7     1   0.000001502325817

     7     4   0.006743000315638

     8     1   0.000000094223442

     8     4   0.001543046731495

     9     1   0.000000005249250

     9     4   0.000310927599766

    10     1   0.000000000263062

    10     4   0.000056009495875

 

Bessels function of second kind of integer order n

Using integer and non-integer values of x

______________________________

     x     n    Jv (x)

  1000 10000  -0.006125542627871

  1000 35000  -0.003838920559852

  1100 10000   0.007383381920807

  1100 35000   0.004062560128311

  1200 10000   0.006400582471112

  1200 35000  -0.003832595491154

  1300 10000   0.006239599017745

  1300 35000   0.002700741714056

  1400 10000   0.007667802080306

  1400 35000   0.000132422675327

  1500 10000  -0.005236691541957

  1500 35000  -0.003665604513534

  1600 10000   0.004305604218381

  1600 35000   0.003118912440980

  1700 10000  -0.007962214731132

  1700 35000   0.002923690058194

  1800 10000  -0.001399594542335

  1800 35000  -0.002143915573544

  1900 10000   0.000542522692455

  1900 35000  -0.004262799481617

  2000 10000  -0.005247203319043

  2000 35000  -0.003373537212417

 

Bessels function of second kind of integer order n

Using integer and non-integer values of x

_____________________________________________

     x     n                   Yn (x)

   100  1000            -0.02243868825772327158

pikespeak[98]: bessel.pl

Bessels function of first and second kind of order  0 and 1

Using integer and non-integer values of x

_________________________________________________________________

    x        J0             J1             Y0             Y1

    1   0.7651976866   0.4400505857   0.0882569642  -0.7812128213

    4  -0.3801277400   0.1373775274   0.1890219439   0.4101884179

    6   0.1506452573  -0.2766838581  -0.2881946840  -0.1750103443

    8   0.0419392518   0.2731219637   0.2702051054  -0.0261686794

   11  -0.1711903004  -0.1767852990  -0.1688473239   0.1637055374

   14   0.2149891659   0.0380492921   0.0300770090  -0.2140229303

   16  -0.1748990740   0.0903971757   0.0958109971   0.1779751689

   18   0.0771648214  -0.1666336400  -0.1686563450  -0.0817478585

   21   0.0365790710   0.1711202728   0.1702017584  -0.0325392608

   24  -0.1239282316  -0.1109461434  -0.1082861177   0.1216532807

   26   0.1559993155   0.0150457306   0.0120446259  -0.1557965532

   28  -0.1262911314   0.0777013579   0.0799040393   0.1277119251

 

Bessels function of first kind of integer order n

Using integer and non-integer values of x

______________________________

     x     n    Jn (x)

     0     1   0.765197686557967

     0     4  -0.380127739987263

     1     1   0.440050585744933

     1     4   0.137377527362327

     2     1   0.114903484931900

     2     4   0.458629184194307

     3     1   0.019563353982668

     3     4   0.386770111716881

     4     1   0.002476638964110

     4     4   0.204405293034632

     5     1   0.000249757730211

     5     4   0.080441986647992

     6     1   0.000020938338002

     6     4   0.025428954531059

     7     1   0.000001502325817

     7     4   0.006743000315638

     8     1   0.000000094223442

     8     4   0.001543046731495

     9     1   0.000000005249250

     9     4   0.000310927599766

    10     1   0.000000000263062

    10     4   0.000056009495875

 

 

 

Bessels function of second kind of integer order n

Using integer and non-integer values of x

______________________________

     x     n    Jv (x)

  1000 10000  -0.006125542627871

  1000 35000  -0.003838920559852

  1100 10000   0.007383381920807

  1100 35000   0.004062560128311

  1200 10000   0.006400582471112

  1200 35000  -0.003832595491154

  1300 10000   0.006239599017745

  1300 35000   0.002700741714056

  1400 10000   0.007667802080306

  1400 35000   0.000132422675327

  1500 10000  -0.005236691541957

  1500 35000  -0.003665604513534

  1600 10000   0.004305604218381

  1600 35000   0.003118912440980

  1700 10000  -0.007962214731132

  1700 35000   0.002923690058194

  1800 10000  -0.001399594542335

  1800 35000  -0.002143915573544

  1900 10000   0.000542522692455

  1900 35000  -0.004262799481617

  2000 10000  -0.005247203319043

  2000 35000  -0.003373537212417

 

Bessels function of second kind of integer order n

Using integer and non-integer values of x

_____________________________________________

     x     n                   Yn (x)

   100  1000            -0.02243868825772327158

   100  3500             0.01064185226694406260

   110  1000             0.00098811013557039687

   110  3500            -0.01261703568153656890

   120  1000             0.02272104813302647935

   120  3500             0.01348328645714888009

   130  1000            -0.01772668382981033158

   130  3500            -0.01278890188506738926

   140  1000            -0.01388177755258548397

   140  3500             0.01023254356937828603

   150  1000             0.02269608597029840885

   150  3500            -0.00582596306741794707

   160  1000             0.01102679107014443299

   160  3500             0.00004672403396424286

   170  1000            -0.02185319243590612415

   170  3500             0.00608917537589039048

   180  1000            -0.01685511442008628263

   180  3500            -0.01111975680487314010

   190  1000             0.01345405131756458733

   190  3500             0.01346009756222942347

   200  1000             0.02514448829969110830

   200  3500            -0.01194863905945314948

 

Bessels function of second kind of non-integer order n

Using integer and non-integer values of x

_____________________________________________

     x     n                   Yv (x)

  1000 10000             0.00514396947362373135

  1000 35000            -0.00185990697949652830

  1100 10000             0.00308809559860151201

  1100 35000             0.00130143437095710658

  1200 10000            -0.00481226536390960431

  1200 35000            -0.00187377916118748188

  1300 10000            -0.00502734928731265584

  1300 35000             0.00330267926607841211

  1400 10000             0.00234520773789003269

  1400 35000            -0.00426452451986259265

  1500 10000             0.00608009482429516367

  1500 35000             0.00218385147320785322

  1600 10000            -0.00677898294411331294

  1600 35000             0.00291213962045935165

  1700 10000             0.00109793493614591432

  1700 35000            -0.00310848300465291346

  1800 10000             0.00792213316408093768

  1800 35000            -0.00369010357454917400

  1900 10000             0.00803422823320607687

  1900 35000            -0.00021103897370279657

  2000 10000             0.00611895339565993873

  2000 35000             0.00261498613795894388

 

Math::Cephes has a large number of additional functions that we do not discuss here. Similarly, the two other packages PDL and Math::Pari that we cursorily mentioned in the beginning of the section are also extremely powerful. There is a large number of additional mathematical modules as well.