<s>[INST] Solve $ \int{\frac{7x^2 + 1}{(x+1)(x-1)(x+3)}}\,dx $ I don’t know how to solve this integral:
$$\int{\frac{7x^2 + 1}{(x+1)(x-1)(x+3)}}\,dx$$
I know this is a rational integral but I don’t know how to write it in a different way
 [/INST] Let me elaborate on partial fraction, and give you a way that doesn't involve solving linear systems.
We have
$$\frac{(7x^2 + 1)}{(x+1)(x-1)(x+3)}=\frac{A}{x+1}+\frac{B}{x-1}+\frac{C}{x+3}.$$
Let's multiply both sides by (x+1)(x-1)(x+3); we get
$$7x^2+1 = A(x-1)(x+3)+B(x+1)(x+3)+C(x-1)(x+1).$$
Since this equality must hold for all $x$, let us plug in some nice values of $x$:


*

*$x=-1$ yields $\ \ 7+1 = A(-1-1)(-1+3)$ and so $A=-2$

*$x=+1$ yields $\ \ 7+1 = B(+1+1)(+1+3)$ and so $B=+1$

*$x=-3$ yields $63+1 = C(+3-1)(+3+1)$ and so $C=+8$


With this we finally get
$$\frac{(7x^2 + 1)}{(x+1)(x-1)(x+3)}=-\frac{2}{x+1}+\frac{1}{x-1}+\frac{8}{x+3}.$$
This methods works every time you have (one or more) linear factors. You can solve for as many constants as you have linear factors.
</s>