|
From: David S. <tom...@us...> - 2026-10-25 15:05:25
|
--- **[bugs:#5716] diff\(\) of gamma\_incomplete\(\) and similar functions is wrong for z < 0 with domain : real** **Status:** open **Group:** None **Labels:** diff gamma\_incomplete domain real **Created:** Sun Oct 25, 2026 03:05 PM UTC by David Scherfgen **Last Updated:** Sun Oct 25, 2026 03:05 PM UTC **Owner:** nobody By Claude: With `domain : real`, the default, `(-8)^(1/3)` is the real root `-2`. `gamma_incomplete(a,z)` is on the principal branch, but its derivative `-%e^-z*z^(a-1)` is simplified with the real root, so it is wrong for `z < 0`: ``` (%i1) d : diff(gamma_incomplete(1/3, z), z); (%o1) -%e^-z/z^(2/3) (%i2) float(rectform(subst(z = -8, d))); (%o2) -745.2394967604321 ``` The right value is `%e^8*(1+sqrt(3)*%i)/8`, about `372.62+645.40*%i`, which a numerical derivative of `gamma_incomplete(1/3, z)` at `z = -8` confirms. The same happens for an argument that is negative for `x > 0`: ``` (%i3) diff(gamma_incomplete(1/3, -x^3), x); (%o3) 3*%e^x^3 ``` For `x > 0` this should be `3*%e^x^3*(-1/2-sqrt(3)*%i/2)`. `gamma_incomplete_lower`, `gamma_incomplete_regularized`, `gamma_incomplete_generalized`, `beta_incomplete`, `beta_incomplete_regularized`, `beta_incomplete_generalized`, `struve_h` and `struve_l` have the same problem in their derivatives. --- Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |