3
$\begingroup$

I have a lot of expressions containing derivatives of hypergeometric functions of the sort:

$$_2F_1^{(0,0,1,0)} \left(\frac{1}{2} , 1 ; \frac{3}{2} ; 0 \right). \tag{1}$$

The last argument is always $0$. This is not evaluated, but if I used N then it evaluates to $0$. How can such expressions consistently be removed from my expressions?

Consider the following example (sorry I do not know how to properly format the hypergeometric function in the code environment, it's just copy-paste):

15 g^2 f[1] \[CapitalDelta]c[1] - 30 g^2 f[1] \[CapitalDelta]c[1] \!\(\*SuperscriptBox[\(Hypergeometric2F1\), TagBox[RowBox[{"(", RowBox[{"0", ",", "0", ",", "1", ",", "0"}], ")"}], Derivative], MultilineFunction->None]\)[1/2, 2, 5/2, 0]

The second term evaluates to $0$ with N. I can use /.{... -> N[...]} but since I have a lot of functions it would be better to use something else.

$\endgroup$
2
  • $\begingroup$ @BobHanlon Thanks, but what if I have other hypergeometric functions which vanish, for example Derivative[1, 0, 0, 0]Hypergeometric2F1][1/2, 1, 5/2, 0]? $\endgroup$
    – Pxx
    Jul 28, 2020 at 15:29
  • $\begingroup$ @BobHanlon Your answer works great. What about turning your comment into an answer? $\endgroup$
    – Pxx
    Jul 28, 2020 at 20:51

1 Answer 1

2
$\begingroup$

Use ReplaceAll to replace expressions that numerically evaluate to zero with zero.

Clear["Global`*"]

Derivative[1, 0, 0, 0][Hypergeometric2F1][1/2, 1, 3/2, 0] + 
  Derivative[0, 0, 1, 0][Hypergeometric2F1][1/2, 1, 3/2, 0] + 
  Derivative[0, 1, 0, 0][Hypergeometric2F1][1/2, 1, 3/2, 0] +
  Derivative[1, 0, 0, 0][Hypergeometric2F1][1/2, 1, 5/2, 0]  /. 
 _?(N[#] == 0 &) :> 0 

(* 0 *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.