## #311 half integer bessel_y function

closed
None
5
2003-05-25
2003-05-12
No

The half-integer bessel functions of the second kind
(the Y functions) evaluate incorrectly. Consider

(C1) besselexpand : true;
(D1)
TRUE
(C2) w : bessel_y[1/2](x)\$
(C3) display2d : false;
(D3) FALSE
(C4) ev(w);
(D4) -SQRT(2)*SIN(x)/(SQRT(%PI)*SQRT(x))
(C5)

The sin(x) upstairs should be a cos(x); to fix this, I
think we need to swap %sin and %cos in
besssel-y-simp; change the line

(simplify `((mtimes) -1 ,(bessel-jy-half-order arg rat-
order '%sin '%cos)))

to

(simplify `((mtimes) -1 ,(bessel-jy-half-order arg rat-
order '%cos '%sin)))

Additionally, the half-integer bessel functions evaluate to
elementary functions too slowly. Consider

(D5) ALL
(C6) besselexpand : true;
Evaluation took 0.00 seconds (0.00 elapsed)
(D6) TRUE
(C7) w : bessel_j[19/2](x)\$
Evaluation took 0.82 seconds (0.82 elapsed)
(C8) w : bessel_j[21/2](x)\$
Evaluation took 2.47 seconds (2.47 elapsed)
(C9) w : bessel_j[23/2](x)\$
Evaluation took 43.87 seconds (43.87 elapsed)

The time is increasing much too rapidly.

Barton

## Discussion

• Raymond Toy - 2003-05-13
• assigned_to: nobody --> rtoy

• Raymond Toy - 2003-05-13

Logged In: YES
user_id=28849

The slow evaluation of the half-integer functions is caused
by a poor choice of algorithms. It computes a larger order
derivative to find the answer. Should use a different
algorithm such as the one in A&amp;S 10.1.8 and 10.1.9.

• Raymond Toy - 2003-05-13

Logged In: YES
user_id=28849

The slow evaluation of the half-integer functions is caused
by a poor choice of algorithms. It computes a larger order
derivative to find the answer. Should use a different
algorithm such as the one in A&amp;S 10.1.8 and 10.1.9.

• Raymond Toy - 2003-05-25
• status: open --> closed

• Raymond Toy - 2003-05-25

Logged In: YES
user_id=28849

Both of these issues should be fixed. The derivative with
respect to order only done for J, though.