Question: The **differential equation** is the following:

$ydx+(\frac{y^2}{4}-2x)dy=0$

It can be written as:

$\frac{y}{2x-\frac{y^2}{4}}=\frac{dy}{dx}$

However, this is not the linear shape. So we rewrite the equation as:

$\frac{2x-\frac{y^2}{4}}{y}=\frac{dx}{dy}\to\frac{dx}{dy}-\frac{2x}{y}=-\frac{y}{4}$

The **integrating factor** is:

$e^{\int{\frac{-2dy}{y}}}=\frac{k}{y^2}$ and k can't be zero (1).

If you **apply the integrating factor** to the original equation you get:

$\frac{k}{y}dx+(\frac{k}{4}-\frac{-2xk}{y^2})dy=0$

According to the **definition of an exact differential equation**, it must be true that the partial derivative in Y of $\frac{k}{y}$ is equal to the partial derivative in X of $(\frac{k}{4}-\frac{-2xk}{y^2})$. This leaves us with the equality:

$\frac{-k}{y^2}=\frac{-2k}{y^2}$

So the only possible solution is $k=0$, but this a **contradiction** (1).

How is it possible? Am I making a mistake? How can I get an integrating factor other than zero?

Answer: 
You can not just apply the integrating factor to the original equation. You need to apply it to the equation that you computed it for.
$$
\frac1{y^2}\frac{xy}{xy}-\frac{2x}{y^3}=-\frac1{4y}
$$
is nicely integrable.
$$ydx+(\frac{y^2}{4}-2x)dy=0$$
$$y\dfrac {dx}{dy}+(\frac{y^2}{4}-2x)=0$$
$$y\dfrac {dx}{dy}-2x=-\frac{y^2}{4}$$
The integrating factor is easy to find now.
$$y^2\dfrac {dx}{dy}-2yx=-\frac{y^3}{4}$$
$$\dfrac {y^2\dfrac {dx}{dy}-2yx}{y^4}=-\frac{1}{4y}$$
$$\left (\dfrac {x}{y^2}\right)'=-\frac{1}{4y}$$
As @Moo commented $\mu(y)=\dfrac {1}{y^3}$
. Now the DE is exact:
$$d\left (\dfrac {x}{y^2}\right)+\frac{dy}{4y}=0$$