Confusion with how partial fractions work [duplicate]

I have trouble with the logic behind Partial Fractions, which I will elaborate about here. I have two problems with it.

Firstly, why, if I have a polynomial like

$$f(x)= \frac{3}{(x+4)^2(x+3)}$$

That when I decompose it I get something like:

$$\frac{3}{(x+4)^2(x+3)} = \frac{A}{x+4} + \frac{B}{(x+4)^2} + \frac{C}{x+3}$$

But why do I have an $x+4$ and a $(x+4)^2$ when there's only a $(x+4)^2$ and $x+3$ in the denominator? It seems like there is a lack of equivalence here, like we are breaking a conservation law here.

For instance, if it were like

$$\frac{3}{(x+3)(3x+4)}$$

We would have, more intuitively in my opinion:

$$\frac{3}{(x+3)(3x+4)} = \frac{A}{x+3} + \frac{B}{3x+4}$$

Which makes me feel like the logical proceed of the above example, and applying it to the first would be this:

$$\frac{3}{(x+4)^2(x+3)} = \frac{A}{(x+4)^2} + \frac{B}{x+3}$$

Okay, secondly:

Why, when we're dealing with a term of the form $(x^2 + C)$ where $C$ is some constant, its partial fraction decomposition is of the form $Ax + B$ in the numerator, like in the following example:

$$\frac{4}{(x-4)^2(x^2+3)} = \frac{A}{x-4} + \frac{B}{(x-4)^2} + \frac{Cx + D}{x^2+3}$$

I'm not sure what clues one in to doing that?

marked as duplicate by Hans Lundmark, TrueDefault, Glorfindel, user91500, Sahiba AroraJul 31 '17 at 10:13

So if the denominator is $(x+4)^2 (x+3)$, then that has degree 3, so the numerator could have any degree $\le 2$. So the numerator could be anything of the form $Ax^2 + Bx + C$, so there are 3 degrees of freedom on the left. Therefore there has to be 3 degrees of freedom on the right, so there has to be 3 terms, not 2. Otherwise the method could not possibly work. (This is assuming our method chooses the right side solely based on the denominator, which is the case for partial fractions.)
The other question (about $x^2+C$ in the denominator) has a similar answer.
The answer to the second question is that the chain rule results in a factor of the form $Ax+B$ in the numerator when the denominator is of the form $x^2+C$ (actually $B$ will be zero in this case). Try it: $$\int \frac{2x} {x^2 +C}=\ln (x^2+C)$$. As to your first question, notice that, in your example, for instance, $A$ and $B$ cannot be solved for uniquely...