# Integrate Without Expanding Numerator

#### paulmdrdo

##### Active member
how to solve this without expanding the numerator.
$\displaystyle \int\frac{(x-1)^3}{x^2}dx$

#### DreamWeaver

##### Well-known member
how to solve this without expanding the numerator.
$\displaystyle \int\frac{(x-1)^3}{x^2}dx$

Not sure if this counts as cheating or not, but I'd say contract the numerator instead!!

Substitute $$\displaystyle y=1-x\,$$ $$\displaystyle \Rightarrow$$

$$\displaystyle \int\frac{(x-1)^3}{x^2}\,dx=-\int\frac{y^3}{(1-y)^2}\,dy$$

Full solution...

$$\displaystyle \frac{d}{dy}\frac{1}{(1-y)}=-\frac{1}{(1-y)^2}$$

$$\displaystyle \Rightarrow$$

$$\displaystyle \frac{y^3}{(1-y)}-3\int\frac{y^2}{(1-y)} \,dy=$$

$$\displaystyle \frac{y^3}{(1-y)}-3\left[-y^2\log(1-y)+2\int y\log(1-y)\,dy\right]=$$

$$\displaystyle \frac{y^3}{(1-y)}+3y^2\log(1-y)-6\int y\log(1-y)\,dy$$

For that last integral, use the same substitution as before to obtain

$$\displaystyle \int y\log(1-y)\,dy=-\int (1-y)\log y\,dy=-\frac{1}{y}+\int y\log y\,dy=$$

$$\displaystyle -\frac{1}{y}+\frac{y^2}{2}\log y-\frac{1}{2}\int y\,dy=$$

$$\displaystyle -\frac{1}{y}+\frac{y^2}{2}\log y-\frac{y^2}{4}$$

The final answer is then

$$\displaystyle \frac{y^3}{(1-y)}+3y^2\log(1-y)-6\left(-\frac{1}{y}+\frac{y^2}{2}\log y-\frac{y^2}{4}\right)=$$

$$\displaystyle \frac{y^3}{(1-y)}+3y^2\log(1-y)+\frac{6}{y}-3y^2\log y+\frac{3y^2}{2}$$

#### paulmdrdo

##### Active member
no, your answer doesn't match the answer in my book.

#### Jameson

Staff member
no, your answer doesn't match the answer in my book.
I haven't checked this myself but did you remember to back-substitute $x$ in for $y$? His final answer is in terms of $y$ but he made the initial substitution $y=1-x$.

#### DreamWeaver

##### Well-known member
no, your answer doesn't match the answer in my book.

However, that doesn't make the one above incorrect. What form is given in your book?

#### paulmdrdo

##### Active member
the answer is in terms of x when expanding the numerator.

#### DreamWeaver

##### Well-known member
OK, so here was my solution...

$$\displaystyle \frac{d}{dy}\frac{1}{(1-y)}=-\frac{1}{(1-y)^2}$$

$$\displaystyle \Rightarrow$$

$$\displaystyle \frac{y^3}{(1-y)}-3\int\frac{y^2}{(1-y)} \,dy=$$

$$\displaystyle \frac{y^3}{(1-y)}-3\left[-y^2\log(1-y)+2\int y\log(1-y)\,dy\right]=$$

$$\displaystyle \frac{y^3}{(1-y)}+3y^2\log(1-y)-6\int y\log(1-y)\,dy$$

For that last integral, use the same substitution as before to obtain

$$\displaystyle \int y\log(1-y)\,dy=-\int (1-y)\log y\,dy=-\frac{1}{y}+\int y\log y\,dy=$$

$$\displaystyle -\frac{1}{y}+\frac{y^2}{2}\log y-\frac{1}{2}\int y\,dy=$$

$$\displaystyle -\frac{1}{y}+\frac{y^2}{2}\log y-\frac{y^2}{4}$$

The final answer is then

$$\displaystyle \frac{y^3}{(1-y)}+3y^2\log(1-y)-6\left(-\frac{1}{y}+\frac{y^2}{2}\log y-\frac{y^2}{4}\right)=$$

$$\displaystyle \frac{y^3}{(1-y)}+3y^2\log(1-y)+\frac{6}{y}-3y^2\log y+\frac{3y^2}{2}$$

In the line just above that last one, the terms on the RHS encased in large brackets have already been back-substituted, so now I'll do the other bit:

$$\displaystyle \frac{y^3}{(1-y)}+3y^2\log(1-y)-6\left(-\frac{1}{y}+\frac{y^2}{2}\log y-\frac{y^2}{4}\right)=$$

$$\displaystyle \to$$

$$\displaystyle \frac{(1-y)^3}{y}+3(1-y)^2\log y-6\left(-\frac{1}{y}+\frac{y^2}{2}\log y-\frac{y^2}{4}\right)=$$

$$\displaystyle \frac{(1-y)^3}{y}+3(1-y)^2\log y+\frac{6}{y}-3y^2\log y+\frac{3y^2}{2}$$

Also, y is a dummy variable here, much like your x, so the answer above is identical to

$$\displaystyle \frac{(1-x)^3}{x}+3(1-x)^2\log x+\frac{6}{x}-3x^2\log x+\frac{3x^2}{2}$$

Does that match your book???

#### bergausstein

##### Active member
i tried to solve this by expanding the numerator of the integrand,

$\displaystyle\int\frac{(x-1)^3}{x^2}dx = \int \frac{(x^3-3x^2+3x-1)}{x^2}dx = \int\frac{x^3}{x^2}dx-3\int\frac{x^2}{x^2}dx+3\int\frac{x}{x^2}dx-\int\frac{dx}{x^2}$...

...$\displaystyle\int xdx-3\int dx+3\int\frac{1}{x}dx-\int\frac{dx}{x^2} = \frac{x^2}{2}-3x+3ln(x)+\frac{1}{x}+C$

Last edited:

#### topsquark

##### Well-known member
MHB Math Helper
$$\displaystyle \frac{(1-x)^3}{x}+3(1-x)^2\log x+\frac{6}{x}-3x^2\log x+\frac{3x^2}{2}$$

Does that match your book???
I don't know what the book says, but yours is not correct.

...$\displaystyle\int xdx-3\int dx+3\int\frac{1}{x}dx-\int\frac{dx}{x^2} = \frac{x^2}{2}-3x+3ln(x)+\frac{1}{x}+C$
This one is correct.

-Dan

#### Chris L T521

##### Well-known member
Staff member
I decided to just keep applying integration by parts until it wasn't needed anymore (i.e. three times):

First time: $u=(x-1)^3$, $dv=\dfrac{1}{x^2}\,dx \implies \,du=3(x-1)^2\,dx$ and $v=-\dfrac{1}{x}$.

Thus,

$\int\frac{(x-1)^3}{x^2}\,dx = -\frac{(x-1)^3}{x} + 3\color{red}{\int\frac{(x-1)^2}{x}\,dx}$

Second time: $u=(x-1)^2$, $dv = \dfrac{1}{x}\,dx\implies \,du=2(x-1)\,dx = (2x-2) \,dx$ and $v=\ln x$.

Thus,

$\color{red}{\int\frac{(x-1)^2}{x}\,dx} = (x-1)^2\ln x - \int (2x-2)\ln x\,dx$

and hence

$\int\frac{(x-1)^3}{x^2}\,dx = -\frac{(x-1)^3}{x} + 3(x-1)^2\ln x - 3\color{blue}{\int(2x-2)\ln x\,dx}$

Third time: $u=\ln x$, $dv = (2x-2)\,dx \implies \,du=\dfrac{1}{x}\,dx$ and $v=x^2-2x$.

Thus,

\begin{aligned}\color{blue}{\int(2x-2)\ln x \,dx} &= (x^2-2x)\ln x - \int \frac{x^2-2x}{x}\,dx\\ &= (x^2-2x)\ln x - \int x-2 \,dx \\ &= (x^2-2x)\ln x - \frac{x^2}{2} + 2x + C\end{aligned}

Therefore, by not expanding the numerator, we get

$\int\frac{(x-1)^3}{x^2}\,dx = -\frac{(x-1)^3}{x} + 3(x-1)^2\ln x - 3(x^2-2x)\ln x + \frac{3}{2}x^2 -6x+C$