I came across an integration question, which I tried to solved through substitution, but my answer is wrong. I entered the same question in Wolfram Alpha engine and saw the "Step-by-Step" solution which first used a long division.

I've got no problem with Wolfram Engine's approach but I want to know why my answer is wrong

So here is the question:

Evalute: $$\int \frac {x+7}{x+9} dx$$

My Solution:

Let $u=x+9$, therefore





$$\int \frac{u-2}{u}du=\int \left(\frac uu-\frac2u\right)du= \int\left(1-\frac2u\right)du=u-2\ln{u}$$ $$u-2\ln{u}=(x+9)-2\ln{(x+9)}$$

Solution from Wolfram Alpha

By long division, we get:


So the Integral becomes:

$$\int \left(1-\frac{2}{x+9}\right)dx$$

Here another step was done: $u=x+9$, but it was trivial after coming this far...

$$\int \left(1-\frac{2}{x+9}\right)dx=x-2\ln{(x+9)}$$


The wolfram answer is wrong unless you add parenthesis to make it $x - 2\ln(x+9)$.

Your answer isn't wrong, the two expressions $(x+9) - 2\ln(u) = (x+9) - 2\ln(x+9)$ and $x-2\ln(x+9)$ seem to differ only by a constant. Remember that antiderivatives are only unique up to adding constant functions.

  • $\begingroup$ Sorry, that was my bad. I edited the last line. Anyways I understood your explanation. $\endgroup$ – Uzair Apr 7 '15 at 17:53

If you look carefully you will notice that the two solutions differ only by a constant, the constant of integration


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.