Find $\int 1/u dx$, where $u$ is polynomial in $x$ 
What is
$$\int \frac{1}{u}dx,$$
where $u$ is a polynomial in terms of $x$?

Is there any formula to expand it ?
I know that $\displaystyle\int\frac{1}{x} dx = \log|x| + C$
So I think  $\displaystyle\int\frac{1}{u} dx $ should be $\displaystyle\frac{\log|u|}{\frac{du}{dx}} + C$ , but I am not sure.
 A: Since your question is about any general polynomial, I will try to give a general idea. Let us assume you want to calculate
$$\int \frac 1{P(x)}\;\text{d}x$$
where $P(x)$ is a polynomial in $x$.
We will decompose $P(x)$ into its factors as
$$P(x)=(x-a_1)(x-a_2)\dots (x-a_n)^{ ^\#}$$
Now, write the equation
$$\frac 1{P(x)}=\frac{A_1}{x-a_1}+\frac{A_2}{x-a_2}\dots \frac{A_n}{x-a_n}^{ ^{\#\#}}$$
and solve for the coefficients $A_1,A_2,\dots A_n$ (either by comparing coefficients or by putting specific values).
Once you have all the values of $A_1,A_2,\dots A_n$, you can write
$$\int \frac 1{P(x)}\;\text{d}x=\int \left(\frac{A_1}{x-a_1}+\frac{A_2}{x-a_2}\dots \frac{A_n}{x-a_n}\right)\;\text{d}x$$
which you can break up into
$$\int \frac 1{P(x)}\;\text{d}x=\int\frac{A_1}{x-a_1}\;\text{d}x+\int\frac{A_2}{x-a_2}\;\text{d}x\dots +\int\frac{A_n}{x-a_n}\;\text{d}x$$
and integrate term by term. Note that since the $A_i$'s are all constants, the $\frac{A_i}{x-a_i}$ terms can be integrated very easily.
Hope that helps.

$\#$ Note that it was assumed that all polynomials can be factored in the mentioned form (in other words, complex roots were allowed) since I tried to sketch a general case. However, it may happen that for particular cases, other methods prove to be more helpful, and that's why textbooks teach around fifteen different tricks for different rational functions. Here's a short list of the plethora of such tricks available.

$\#\#$ Note that this equation assumes that your decomposition doesn't have repeated roots. If it has repeated roots, almost the same procedure is followed except this equation will have terms of all degree. In particular, if your given expression decomposes into
$$P(x)=(x-1)^2(x-2)^3$$
then, this equation will turn into
$$\frac 1{P(x)}=\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x-2}+\frac{D}{(x-2)^2}+\frac{E}{(x-2)^3}$$
with which you need to proceed in the same way as before. I hope I could make myself clear.
However you must remember that there's no predefined formula for computation of such integrals, all we have are different ways and methods as I mentioned in my answer
A: A few things you may be interested in:

If the integral can be expressed as the form:
$$\int\frac{u'}{u}dx=\ln|u|+C$$

If the polynomial can be factored you can use partial fraction decomposition (there are many questions on here solved using this method)

Finally, contour integration using residue theorem works well for many polynomials
