Message Boards Message Boards


[✓] Solve this indefinite integral?

Posted 7 months ago
5 Replies
3 Total Likes

I evaluate $$\int \frac{1}{y (y-1)} \, dy$$ which I expect to give $$\log (y-1)-\log (y)$$ and I get $$\log (1-y)-\log (y)$$

Is this a bug?

5 Replies

Is this a bug?

No this is a correct anti-derivative because of

In[2]:= Together[D[Log[1 \[Minus] y] \[Minus] Log[y], y]]
Out[2]= 1/((-1 + y) y)

Read about another correct anti-derivative here Doing an integral: From Mathematica Version 1.0 to 11.0

Welcome to Wolfram Community! Please make sure you know the rules: 

Please next time add Wolfram Language code to your post so other members can reproduce your result and understand your question better. Also add any Wolfram|Alpha queries you used.

Posted 7 months ago

Thank you very much.

Yes, it never occurred to me that D[Log[1 - y], y] could be the same as D[Log[y - 1], y]

Sorry for not stopping to think.

I guess the reason Mathematica chooses the first anti-derivative is because of its preference for putting terms in $y^0$ first.

If I had been dealing with y's less than 1, I would have been happy with my result...getting negative numbers inside the logarithm was a bit of a shock (not that I was actually evaluating them, but I could see that for the part of the parameter space I was dealing with it was a problem).

It's still good to have A. P. Prudnikov, Yu. A. Brychkov, O. I. Marichev (who works since years with Wolfram): Integrals and Series (Moscow 1981, russian) on the book shelf, and there in § 1.2.5 no. 9, p. 31:

Integrate[1/(x (x + a)), x] = Log[Abs[x/(x+a)]]/a

it's the same thing as discussed in Doing an integral ... mentioned above. To make a long story short: use the Prudnikov et. al. solution as long as $x$ is real.

Two of the integral table workers (Brychkow and Marichev) wrote an interesting blog article New Derivatives of the Bessel Functions Have Been Discovered with the Help of the Wolfram Language! Enjoy!

Posted 6 months ago

Thank you very much. That is a very interesting and useful post. (Doing an integral ...)

In effect, Mathematica leaves out the Abs[]

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract