Mathematica Asked on September 29, 2021
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.
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 *)
Correct answer by Bob Hanlon on September 29, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP