2

I have math problem $\int \frac{x}{1-x}\,dx$ and found two solutions for it:

1.$\int \frac{x}{1-x}\,dx=\int \frac{x-1+1}{1-x}\,dx=\int \frac{-1+x}{1-x}+\frac{1}{1-x}\,dx=\int -1\cdot\frac{1-x}{1-x}+\frac{1}{1-x}\,dx=\left\{\begin{array}{rcl} 1-x&=&t\\ -1\,dx&=&\,dt\\ dx&=&-1\,dt \end{array} \right\}=\int (-1+\frac{1}{t})\cdot-1\,dt=-1\int-1+\frac{1}{t}\,dt=-1(-x+\ln|t|)+C=\color{red}{x-\ln|1-x|+C}$

In this attempt, I moved $-1$ before the whole integral because all the elements of the integral are integrated by $dt$, so I used the formula to throw the factor before the integral.

2.$\int \frac{x}{1-x}\,dx=\int \frac{x-1+1}{1-x}\,dx=\int (-1+\frac{1}{1-x})\,dx=\int -1\,dx+\int \frac{1}{1-x}\,dx=\left\{\begin{array}{rcl} 1-x&=&t\\ -1\,dx&=&\,dt\\ dx&=&-1\,dt \end{array} \right\}=-x+\int \frac{1}{t}\cdot-1\,dt=-x-\int \frac{1}{t}\,dt=-x-\ln|t|+C=\color{blue}{-x-\ln|1-x|+C}$

In this example, I split the complex integral into component integrals using the formula, and the rest of the operations are the same.

I think both ways are correct, but they give different results. I took the derivative from both results, and it turned out that only the second solution is correct. Can someone explain to me why the second solution is correct and the first not?

urshuk
  • 81
  • 2
    How do you get $\int(-1 + \frac 1t)dt = (-x+\ln|t|)+C$? It should be $-t+\ln|t|+C$ – Sarvesh Ravichandran Iyer May 23 '23 at 13:34
  • 2
    The first one is incorrect, as $\int -dt = -t$, not $-x$ – Ninad Munshi May 23 '23 at 13:34
  • 1
    In $1$ , factoring out $-1$ gives $1+1/t$ – Peter May 23 '23 at 13:35
  • 1
    @SarveshRavichandranIyer I took the integral of the whole expression and added C as a constant. I think I added parentheses unnecessarily – urshuk May 23 '23 at 13:36
  • 3
    @SarveshRavichandranIyer I think I see my mistake in your comment. My expression means I should be integrating over t but I integrate -1 over x – urshuk May 23 '23 at 13:38
  • 1
    @urshuk Unnecessary steps still won't lead to the wrong answer, thankfully. There is only one incorrect step, which is that when you integrate with respect to $t$, you get an $x$ out instead of a $t$. Since $t=1-x$, the sign reverses, so if anything you can write $\int(-1+\frac 1t)dt = (x-1+\ln|t|)+C$ because $-t = x-1$. Any other expression and you have a problem. – Sarvesh Ravichandran Iyer May 23 '23 at 13:40
  • Then you can combine this with the $-1$ which you took out well before (and wrote a sentence about, which was very good from your side) to get the actual answer. Note that you will get a constant like $+1$ or something added on, but that can be added to the $C$ because antiderivatives are the same only up to a constant. That leads to the answer from the second argument, and the correct answer. – Sarvesh Ravichandran Iyer May 23 '23 at 13:42

0 Answers0