A textbook way to integrate $\frac{a}{x}$ is $\int \frac{a}{x} dx = a\ln(x) $

However the answer to the question $\int \frac{x+1}{x} dx$

is not $(x+1)\ln(x)$

but is rather $\frac{x}{x} + \frac{1}{x} = 1 + ln(x) $

I see the logic of the latter answer but I don't understand why the former is wrong.

Thanks for your help.

  • 3
    $\begingroup$ Your doubt seems to come from the fact that you apparently think that $$\int\frac{x+1}xdx=(x+1)\int\frac{dx}x=(x+1)\log x$$ which is completely wrong, of course. $\endgroup$ – DonAntonio May 19 at 16:35
  • $\begingroup$ $a$ is a constant, not a function of $x$. You can't treat a function of $x$, such as $x+1$, or anything involving $x$, as a constant. $\endgroup$ – KM101 May 19 at 16:38
  • 1
    $\begingroup$ Also, the answer is $x+\ln\vert x\vert+C$, not $1+\ln(x)$. $\endgroup$ – KM101 May 19 at 16:43
  • $\begingroup$ thanks for all your helpful comments. The answer is listed as 1+ln|x|+C but might be a typo as your answer makes much more sense. Thank you. $\endgroup$ – Joseph May 19 at 16:52

The former is wrong because your way of integrating $a/x$ works (in general) only if $a$ does not depend on $x$. Since $x+1$ does depend on $x$, you can not use this rule.

An analogy: For a constant $a$, we have $\int a\, \mathrm dx = a x + C$. However, we don’t have $\int \dfrac1x\, \mathrm dx = 1 + C$.

  • 1
    $\begingroup$ Cheers! That makes much more sense $\endgroup$ – Joseph May 19 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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