Y
Bessel function of second kind of integer order.
You're viewing an older version of this page (#173). View the current version.
Interface
#include <codecogs/maths/special/bessel/y/y.h>
using namespace Maths::Special::Bessel::Y;
Overview
A Bessel function of the second kind is sometimes also denoted using
and is a solution to the differential equation
with and
being the other solutions. See i
This solution has a regular singularity at 0 and an irregular singularity at .

The function is evaluated by forward recurrence on n, starting with values computed by the routines y0() and y1().
If n = 0 or 1 the routine for Y0 or Y1 is called directly.
Accuracy:
Absolute error, except relative when y > 1: <pre> domain # trials peak rms 0, 30 2200 2.9e-16 5.3e-17 0, 30 30000 3.4e-15 4.3e-16 </pre>
Error messages:
<pre> message condition value returned singularity x = 0 MAXNUM overflow MAXNUM </pre>
References
Cephes Math Library Release 2.8: June, 2000
Example 1
#include <stdio.h>
#include <codecogs/maths/special/bessel/y/y.h>
int main()
{
printf("\nY\n x v=0 v=1 v=2 v=3 v=4 v=5");
for(double x=1; x<7; x++)
{
printf("\nx=%.1lf",x);
for(int v=0;v<=5;v++)
printf(" %8.6lf", Maths::Special::Bessel::Y::Y(x,v));
}
return 0;
}Output:
Y
x v=0 v=1 v=2 v=3 v=4 v=5
x=1.0 0.088257 -0.781213 -1.650683 -5.821518 -33.278423 -260.405867
x=2.0 0.510376 -0.107032 -0.617408 -1.127784 -2.765943 -9.935989
x=3.0 0.376850 0.324674 -0.160400 -0.538542 -0.916683 -1.905946
x=4.0 -0.016941 0.397926 0.215904 -0.182022 -0.488937 -0.795851
x=5.0 -0.308518 0.147863 0.367663 0.146267 -0.192142 -0.453695
x=6.0 -0.288195 -0.175010 0.229858 0.328249 0.098391 -0.197061Parameters
FUNCTION
Y
Returns the Bessel function of the second kind with real order v.
If the order v is an interger then the integer form of Y is used, otherwise the solution is constructed from a combination of J and Maths/Special/Bessel/K/K:
This function has not been tested to be correct or accurate. It maks use of the Bessel K (K), which currently does not accept a real order. When Bessel K is updated, it is expected this function will then work appropriately. Use with care.
References
Cephes Math Library Release 2.8: June, 2000
Parameters
Stephen L. Moshier. Copyright 1984, 1987, 2000,
Documentation by Nick Owens
Interactive Calculator
Computing…
Set a range above first to export a graph.