# Solving integral without simplifying equation

So, I was solving some exercises and got stuck in a seemingly simple integration: $$\int \frac{2dx}{2x+2}$$ So I started out by factoring out 2 from the integral and solved $$2\int \frac{dx}{2x+2} = \ln(2x+2).$$ However, while checking the answer, I see that it's actually supposed to go $$\int \frac{2dx}{2x+2} = \int \frac{dx}{x+1} = \ln(x+1).$$ Since this integral was only a small part of the whole problem, the answer didn't care to explain how and why it simplified the integrand first instead of factoring out 2. For me, those were always two equivalent ways of solving the integral and I can't understand why they result in different answers.

To make things even more confusing, even though WolframAlpha agrees that $$\int \frac{2dx}{2x+2} \ne 2 \int \frac{dx}{2x+2},$$ when I ask it to solve the first equation, the very first step is takes is, quite literally:

"Factor out constants: $$= 2 \int \frac{dx}{2x+2}$$

Which is the second equation! This baffles me because now, Wolfram is saying that the same exact equation results in two different answers and since I can't see the rest of the step-by-step solution because I don't have a Pro account, I'm left in the dark.

In the end, I concluded that there must be some kind of rule that forces you to simplify the integrand BEFORE factoring out any constants (which means Wolframs step-by-step is doing it wrong even though the final answer is right) but I wanted to verify this as I couldn't find anything relevant on the subject.

Thanks in advance to all!

• You forgot the integration constant in both integrals. – Mattos Apr 10 '16 at 12:42
• @Mattos I omitted them to make the whole question cleaner as I don't think they interfere on the problem. – Alexandre Bacellar Apr 10 '16 at 12:44
• But the constants do 'interfere', which is why you are getting confused. The integrals are equivalent if you were to solve for $C$. – Mattos Apr 10 '16 at 12:44
• @Mattos yes but the constants only appear after you integrate and then you're left with ln(2x+2)+C1 which is still different than ln(x+1)+C2. For both to be equal, at least one of the constants would have to be a function of x and, therefore, not be a constant anymore. EDIT: Nevermind, I see what you mean in Ian Millers answer. Thanks! – Alexandre Bacellar Apr 10 '16 at 12:51
• $\ln(2x+2)=\ln2+\ln(x+1)$ – Ian Miller Apr 10 '16 at 12:52

## 1 Answer

Both answers are correct. The different answers are equivalent once you include the constant of integration.

$$\ln(2x+2)+c=\ln2+\ln(x+1)+c$$

This is the same as the answer given in the book/wolfram but their constant of integration will be equal to yours plus the extra $\ln2$.

NOTE: The only part of your statement which isn't right is that:

$$\int\frac{2dx}{2x+2}\text{ }does\text{ }equal\text{ }2\int\frac{dx}{2x+2}$$

However when entered into WolframAlpha it has given you two answers which only different by a constant.

• Oh, ok, I see what you mean! Completely forgot about logarithmic proprieties. Thanks! NOTE: on your note, you mean that my wrong statement is that both integrals are different, not equal, right? – Alexandre Bacellar Apr 10 '16 at 12:57
• I meant that the two integrals are equal. Your use of not-equals isn't correct. Simply taking a factor of two out doesn't make them not-equal. Too many negatives in both our sentences :) – Ian Miller Apr 10 '16 at 13:00
• Ah yes. The only reason why I said that is because both the book and Wolfram were giving what I thought were different answers but it's all clear now. – Alexandre Bacellar Apr 10 '16 at 13:22