Answer :

To solve the integral
[tex]\[ \int \left( \frac{3}{x} + \frac{7}{x^2} - \frac{5}{x-7} \right) \, dx, \][/tex]
we'll integrate each term separately.

1. For the first term, [tex]\(\frac{3}{x}\)[/tex]:
[tex]\[ \int \frac{3}{x} \, dx = 3 \int \frac{1}{x} \, dx = 3 \ln |x| + C_1, \][/tex]
where [tex]\(C_1\)[/tex] is a constant of integration.

2. For the second term, [tex]\(\frac{7}{x^2}\)[/tex]:
[tex]\[ \int \frac{7}{x^2} \, dx = 7 \int x^{-2} \, dx. \][/tex]
Recall that the integral of [tex]\(x^n\)[/tex] is [tex]\(\frac{x^{n+1}}{n+1}\)[/tex] for [tex]\(n \neq -1\)[/tex]. Here, [tex]\(n = -2\)[/tex]:
[tex]\[ 7 \int x^{-2} \, dx = 7 \left( \frac{x^{-1}}{-1} \right) = -\frac{7}{x} + C_2, \][/tex]
where [tex]\(C_2\)[/tex] is a constant of integration.

3. For the third term, [tex]\(\frac{5}{x-7}\)[/tex]:
[tex]\[ \int \frac{5}{x-7} \, dx = 5 \int \frac{1}{x-7} \, dx = 5 \ln |x-7| + C_3, \][/tex]
where [tex]\(C_3\)[/tex] is a constant of integration.

Now, we combine all these results:
[tex]\[ \int \left( \frac{3}{x} + \frac{7}{x^2} - \frac{5}{x-7} \right) \, dx = 3 \ln |x| - \frac{7}{x} - 5 \ln |x-7| + C, \][/tex]
where [tex]\(C = C_1 + C_2 + C_3\)[/tex] is the overall constant of integration.

Thus, the final result is:
[tex]\[ 3 \ln |x| - 5 \ln |x-7| - \frac{7}{x} + C. \][/tex]