I'm trying to learn calc 2 before college and was doing the practice problems in the fourth edition of Larson and Edward's calculus textbook. The problem set I'm doing is right after the book introduced integration by parts, but the questions don't necessarily require integration by parts.
The problem written is basically $\int \frac{xe^{x}}{(x+1)^2}dx$, and I wasn't able to find a way to solve it with the tools given to me at this point in the book (It taught us u-substitution, integration by parts, trig identities, and basic algebra stuff like completing the square)
I did a u-substitution by letting $u=1+x$, $du=dx$, $x=u-1$
$$\implies \int \frac{xe^{x}}{(x+1)^2}dx=\int \frac{(u-1)e^{u-1}}{u^2}du=\int u^{-1}e^{u-1}-u^{-2}e^{u-1}$$
I had tried a lot of things at this point, but I really had no idea. After seeing the solution in the back of the book (it just gave the answer, not how to solve it), I realized that $\int u^{-1}e^{u-1}-u^{-2}e^{u-1}$ is the derivative of a product, so:
$$\int u^{-1}e^{u-1}-u^{-2}e^{u-1}=u^{-1}e^{u-1}+C=\frac{e^x}{x+1}+C$$
However, this isn't really like anything the book has shown at this point, so I think another way is intended. It is relating to the derivative of a product, so I assume you can use integration by parts at some point, but I have no idea where it would work. I also considered that you could do some sort of infinite series, but the book also hasn't gotten to that. If anyone would be able to help, that would be awesome!