code: public static double Y(int n, double x) {
          double by, bym, byp, tox;
  
          if (n == 0) return Y0(x);
          if (n == 1) return Y(x);
  
          tox = 2.0 / x;
          by = Y(x);
          bym = Y0(x);
          for (int j = 1; j < n; j++) {
              byp = j * tox * by - bym;
              bym = by;
              by = byp;
          }
          return by;
      }
docs: Bessel function of the second kind, of order n.
  
  @param n Order.
  @param x Value.
  @return Y value.