0
$\begingroup$

I was trying to do the following integral:

f[z_]:=Hypergeometric2F1[1,-a,1-a,1/(1-z)]/((1-z)^a-1)
Integrate[D[f[z],z],z]

I thought the result should be f[z] itself. But it turns out that Mathematica is not able to do the integral:

enter image description here

Is it normal that Mathematica is not able to do such thing? Is there anything I can do to make it able to do the integral?

$\endgroup$
  • 2
    $\begingroup$ Quiet@Integrate[Evaluate[D[f[z], z] // FullSimplify], z] $\endgroup$ – Dr. belisarius Dec 26 '15 at 15:38
  • $\begingroup$ @Dr.belisarius, I tried your command, but it's still not able to do the integral. $\endgroup$ – Nahc Dec 26 '15 at 15:41
  • 2
    $\begingroup$ Dr. belisarius method works for me (Mathematica 10.3.1). Call the result int. Then evaluate FullSimplify[int == f[z]] and obtain output True, $\endgroup$ – murray Dec 26 '15 at 16:00
  • $\begingroup$ @murray Also works here, v9 $\endgroup$ – Dr. belisarius Dec 26 '15 at 16:11
  • $\begingroup$ @Dr.belisarius That works for me now, thank you. I'm now trying to calculate f[z_]:=(1-z)^a Hypergeometric2F1[1,-a,1-a,1/(1-z)]/((1-z)^a-1) Integrate[D[f[z],z],z]. And it seems that your method doesn't work for this case. $\endgroup$ – Nahc Dec 26 '15 at 16:57
4
$\begingroup$
$Version

(*  "10.3.1 for Mac OS X x86 (64-bit) (December 9, 2015)"  *)

f[z_] = Hypergeometric2F1[1, -a, 1 - a, 1/(1 - z)]/((1 - z)^a - 1);

f2[z_] = Integrate[D[f[z], z] // FullSimplify, z] // Quiet

(*  -((a*(1/(1 - z))^a*Beta[1/(1 - z), 
           -a, 0])/(-1 + (1 - z)^a))  *)

f3[z] = f2[z] // FullSimplify

(*  Hypergeometric2F1[1, -a, 1 - a, 
     1/(1 - z)]/(-1 + (1 - z)^a)  *)

f[z] == f2[z] == f3[z] // FullSimplify

(*  True  *)

EDIT: to address OP's question in comment. I do not know why changing the sign makes the problem harder for Mathematica; however, there is a straightforward workaround.

f4[z_] = -Hypergeometric2F1[1, -a, 1 - a, 1/(1 - z)]/((1 - z)^a - 1);

f5[z_] = -Integrate[D[-f4[z], z] // FullSimplify, z] // Quiet

(*  (a (1/(1 - z))^a Beta[1/(1 - z), -a, 0])/(-1 + (1 - z)^a)  *)

f6[z] = -(-f5[z] // FullSimplify)

(*  -(Hypergeometric2F1[1, -a, 1 - a, 1/(1 - z)]/(-1 + (1 - z)^a))  *)

f4[z] == f5[z] == f6[z] // FullSimplify

(*  True  *)
| improve this answer | |
$\endgroup$
  • $\begingroup$ That works for me, thank you. But if I add a minus sign in f[z] (f[z_] = -Hypergeometric2F1[1, -a, 1 - a, 1/(1 - z)]/((1 - z)^a - 1)) then it does't work. Do yo know why? $\endgroup$ – Nahc Dec 26 '15 at 17:28
  • $\begingroup$ @HChan - see edit above. $\endgroup$ – Bob Hanlon Dec 26 '15 at 17:45

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