CodeCogs - A iteractive open source Numerical library in C/C++, with wrappers for .NET and Excel Welcome... Login
Site Map
shopping cart
OSX compatibleWindows compatibleLinux compatible
Search CodeCogs
Numerical Components
Worked Examples

Valid RSS

mathsspecialbesselj

J

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 1.04
sub units 24.31
add a commercial licence to your cart
0
viewed 2035 times and licensed 10 times

Bessel function of the first kind of integer order.

Other modules that are used by this module. We add these to the cart for you whenever you add this module, unless you already own enough licences for them. Click for details
Controller: CodeCogs    Contact Controller

+View version details
Contents hide toc

Group Description

These function return solutions to the Bessel Function of the first kind. They are defined as solutions to the Bessel differential equation
(1)
\displaystyle x^2 \frac{d^2y}{dx^2} + x \frac{dy}{dx} + (x^2 - v^2)y = 0
which are both nonsingular at the origin. They are are sometimes called cylinder functions or cylindrical harmonics.

1/besselj-969.gif
+
Bessel function of the first kind
References:
http://mathworld.wolfram.com/BesselFunctionoftheFirstKind.html

Interface

#include <codecogs/maths/special/bessel/j/j.h>

using namespace Maths::Special::Bessel::J;

double J (double x, int v)[inline]
Bessel function of the first kind of integer order.
ExcelReal cc_J (Real x, Integer v)
This function is available as a Microsoft Excel add-in.
Real cc_J_di (Real x, Integer v)
This function is available as a Microsoft Excel add-in.
double J (double x, double v)
Bessel function of the first kind.
ExcelReal cc_J_dd (Real x, Real v)
This function is available as a Microsoft Excel add-in.

Function Documentation

Add calculator to website or email
 
doubleJdoublex
intv )[inline]
Returns Bessel function of the first kinds for any integer order (v)

The ratio of jn(x) to j0(x) is computed by backward recurrence. First the ratio jn/jn-1 is found by a continued fraction expansion. Then the recurrence relating successive orders is applied until j0 or j1 is reached.

If n = 0 or 1 the routine for j0 or j1 is called directly.

Accuracy:
                           Relative error:
 arithmetic   domain     # trials      peak         rms
    DEC       0, 30        5500       6.9e-17     9.3e-18
    IEEE      0, 30        5000       4.4e-16     7.9e-17
 

Example:
#include <stdio.h>
#include <codecogs/maths/special/bessel/j/j.h>
int main()
{
  printf("\n  x      v=0      v=1      v=2      v=3      v=4      v=5");
  for(double x=0; x<6; x++)
  {
    printf("\nx=%.1lf",x);
    for(int v=0;v<=5;v++)
      printf(" %8.6lf", Maths::Special::Bessel::J::J(x,v));
  }
  return 0;
}

Output:
x      v=0      v=1      v=2      v=3      v=4      v=5
x=0.0 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000
x=1.0 0.765198 0.440051 0.114903 0.019563 0.002477 0.000250
x=2.0 0.223891 0.576725 0.352834 0.128943 0.033996 0.007040
x=3.0 -0.260052 0.339059 0.486091 0.309063 0.132034 0.043028
x=4.0 -0.397150 -0.066043 0.364128 0.430171 0.281129 0.132087
x=5.0 -0.177597 -0.327579 0.046565 0.364831 0.391232 0.261141

See also Maths/Special/Bessel/J/J1 and Maths/Special/Bessel/J/J0

Warnings:
Not suitable for large n or x. Use J() with real v instead.

References:
Cephes Math Library Release 2.8: June, 2000
Parameters:
xvalue to be transformed.
vorder of bessel function (integer).
Authors:
Stephen L. Moshier. Copyright 1984, 1987, 2000
Documentation by Will Bateman
Source Code:

You do not own any licences for this module.
To view or download source code you must get a GPL licence or buy a commercial licence.

buy now     get GPL     add to cart

For advanced download and development options Register with CodeCogs. Already a Member, then Login.


Add calculator to website or email
 
doubleJdoublex
doublev )
Returns the Bessel function of the first kinds for any order (v)

Several expansions are included: the ascending power series, the Hankel expansion, and two transitional expansions for large v. If v is not too large, it is reduced by recurrence to a region of best accuracy.

The transitional expansions give 12D accuracy for v > 500.

Accuracy:
Results for integer v are calculated with x varying from -125 to +125. Otherwise, x ranges from 0 to 125. Error criterion is absolute, except relative when |J()| > 1.
  arithmetic  v domain  x domain    # trials      peak       rms
     IEEE      0,125     0,125      100000      4.6e-15    2.2e-16
     IEEE     -125,0     0,125       40000      5.4e-11    3.7e-13
     IEEE      0,500     0,500       20000      4.4e-15    4.0e-16
  Integer v:
     IEEE    -125,125   -125,125      50000      3.5e-15    1.9e-16
 

Example:
#include <stdio.h>
#include <codecogs/maths/special/bessel/j/j.h>
 
int main()
{
  printf("\n  x      v=0.5    v=1.5    v=2.5    v=3.5    v=4.5");
  for(double x=0; x<6; x++)
  {
    printf("\nx=%.1lf",x);
    for(double v=0.5;v<=5;v++)
      printf(" %8.6lf", Maths::Special::Bessel::J::J(x,v));
  }
  return 0;
}

Output:
x      v=0.5    v=1.5    v=2.5    v=3.5    v=4.5
x=0.0 0.000000 0.000000 0.000000 0.000000 0.000000
x=1.0 0.671397 0.240298 0.049497 0.007186 0.000807
x=2.0 0.513016 0.491294 0.223925 0.068518 0.015887
x=3.0 0.065008 0.477718 0.412710 0.210132 0.077598
x=4.0 -0.301921 0.185286 0.440885 0.365820 0.199300
x=5.0 -0.342168 -0.169651 0.240377 0.410029 0.333663

References:
Cephes Math Library Release 2.8: June, 2000
Parameters:
xinput argument.
vorder of bessel function.
Authors:
Stephen L. Moshier. Copyright 1984, 1987, 2000
Documentation by Will Bateman
Source Code:

You do not own any licences for this module.
To view or download source code you must get a GPL licence or buy a commercial licence.

buy now     get GPL     add to cart

For advanced download and development options Register with CodeCogs. Already a Member, then Login.


Page Comments

Format Excel Equations

  You must login to leave a messge


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2009-01-05 22:49:35

Valid CSS!   Valid XHTML 1.0 Transitional