1

This is the integrand:

1/beta/(2*z)/(1 - beta) // TraditionalForm

Integrating with respect to z, gives

Integrate[1/beta/(2*z)/(1 - beta), z]

-(Log[-2 (-1 + beta) beta z]/(2 (-1 + beta) beta))

What I hope to get is from doing so:

1/beta/2/(1 - beta)*Integrate[1/z, z]

Log[z]/(2 (1 - beta) beta)

But if I look at the two answers, they are not equivalent, eg the difference does not simplify to 0.

Should I make some assumptions in the first case? Or Am I doing something wrong?

Update:

ans1 = Integrate[1/beta/(2*z)/(1 - beta), z]
ans2 = 1/beta/2/(1 - beta)*Integrate[1/z, z]
tmp = ans1 - ans2 // FullSimplify

I was thinking that tmp should be zero, but I was wrong. It is a constant, which is free of z.

So both answers are correct.

But could I get the desired answer in the first place anyway?

Chen Stats Yu
  • 4,986
  • 2
  • 24
  • 50

2 Answers2

4

The brute force method to arrive at your second solution

f[z_] = 1/beta/(2*z)/(1 - beta);

cl = CoefficientList[f[z], 1/z];

cl.Integrate[(1/z)^Range[0, Length[cl] - 1], z]

Log[z]/(2*(1 - beta)*beta)

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
2

You could use a definite integral:

Integrate[1/beta/(2*z0)/(1 - beta), {z0, 1, z}, Assumptions -> {z > 1, 0 < beta < 1}]
(* Log[z]/(2 beta - 2 beta^2) *)

Of course, this requires by-hand tuning of the lower limit, but if you want a certain form (i.e. a certain choice of offset), then that's required anyway.

march
  • 23,399
  • 2
  • 44
  • 100