I don't know how to solve this integral 
Could you please help me compute the following integral: $$\int \frac{(x^2+x-4)}{x(x^2+4)}dx$$

What I've done so far is:

$$\int \frac{(x^2+x-4)}{x(x^2+4)}dx = \int \frac{A}{x}dx+\int \frac{B}{x^2+4}dx$$

So

$$x^2+x-4 = A(x^2-4)+Bx$$

And I did this so I could figure out the value of A and B but I am having a rough time trying to calculate A because of the $x^2$.
I've also seen that the solution solves this exercise by separating the fraction's numerator like this:

$$\int \frac{(x^2+x-4)}{x(x^2+4)}dx = \int \frac{x^2}{x(x^2+4)}dx+\int \frac{x}{x(x^2+4)}dx + \int \frac{-4}{x(x^2+4)}dx $$

When do I know that I have to use this? Is what I though correct? If yes, how do I continue it?
Thank you very much. Please, let me know if something is not very clear in my question.
Agapita.

Hint:
It must be
$$\dfrac{x^2+x-4}{x(x^2+4)}=\dfrac Ax+\frac{Bx+C}{x^2+4}$$
then
\begin{align*}
x^2+x-4&=A(x^2+4)+(Bx+C)x\\
&=(A+B)x^2+Cx+4A
\end{align*}
