Partial fractions decomposition. Why $cx+d$ instead of $cx$ for the numerator of $(x^2+2$). I understand that the aim of partial fractions decomp. is simply to reach (an) integrable functions, but then I have trouble wrapping my head around why you cannot make the numerator of something like $x^2+2$ equal to $Cx$ alone and then later use u-sub. The question I tried this on and failed was this:enter image description here

 A: Imagine if you were just dividing by $x^2+2$ alone; would you expect the numerator of the remainder to be a multiple of $x$? There's no reason to expect that when you divide a polynomial by $x^2+2$, you get no constant term in the remainder. Indeed, $1/(x^2+2)$ is already in simplest form and clearly cannot be written of the form $cx/(x^2+2)$. Ultimately, it doesn't make sense to ask why you can't write the answer in a certain form when there's no reason to expect it to come out in that form in the first place - it's like asking why, when dividing a number by $100$, you can't always express the remainder as a number with $0$ in the units digit.
Edit: based on Andrei's comment, I guess you're used to getting constant terms over linear functions. But that's like long-dividing by single-digit numbers and getting single-digit remainders, until one day you divide by a double-digit number...
A: When you set up $\frac{Ax+B}{x^2+2}=\frac{Ax}{x^2+2}+\frac{B}{x^2+2},$ you can use $u-$sub on the first term and on the second term, you can write
$$
\frac{B}{x^2+2}=\frac{B}{2((x/\sqrt{2})^2+1}=\frac{B/2}{((x/\sqrt{2})^2+1}.
$$
Then with $u=x/\sqrt{2}$, you obtain an easy $\arctan$ anti-derivative. It's really not that bad.
A: It is a question of number of unknows and number ogf equations.
$$\frac{x^3+5}{x^2(x^2+2)}=\frac{A}{x}+\frac{B}{x^2}+\frac{Cx+D}{x^2+2}=\frac{Ax(x^2+2)+B(x^2+2)+(Cx+D)x^2}{x^2(x^2+2)}$$
Compare the coefficients of varous powers of $x$ on both sides of numerator to ger
Four equations for  four unknowns as$$A+C=1, B+D=0, 2A=0, 2B=5\implies A=0, C=1, B=5/2,D=-5/2.$$
A: Of course you would try to look for $Cx$ in your case because in general to integrate $\frac 1{x^2+bx+c}$ where the denominator cannot be further factored in $\mathbb{R}$, you would aim for something like $\frac{C(2x+b)}{x^2+bx+c}$. In your case $b=0$ and hence you would look for $Cx$.
In your case your $Cx$ appears naturally:
$$\frac{x^3+5}{x^2(x^2+2)}= \frac{\overbrace{x}^{Cx}}{x^2+2} + \frac{5}{x^2(x^2+2)}$$
$$=\frac{x}{x^2+2} + \frac 52\frac{2+x^2-x^2}{x^2(x^2+2)}$$
$$=\frac{x}{x^2+2} + \frac 52\frac 1{x^2}- \frac 52\frac 1{x^2+2}$$
A: In my opinion, the best way to understand why this is the case is to consider the partial fraction decomposition over $\mathbb{C}$ instead. It is much more intuitive once you get it. Here is the theorem from Fundamentals of Complex Analysis by Saff and Snider p. 105:
"
If
$$R_{m,n}(z) = \frac{a_0 + a_1z + a_2z^2 + \cdots + a_mz^m}{b_n(z-\zeta_1)^{d_1}(z-\zeta_2)^{d_2} \cdots (z- \zeta_r)^{d_r}}$$
is a rational function whose denominator degree $n = d_1 + d_2 + \cdots + d_r$ exceeds its numerator degree $m$, then $R_{m,n}(z)$ has a partial fraction decomposition of the form
$$R_{m,n}(z) = \frac{A_0^{(1)}}{(z-\zeta_1)^{d_1}} + \frac{A_1^{(1)}}{(z- \zeta_1)^{d_1 - 1}} + \cdots + \frac{A_{d_1-1}^{(1)}}{(z-\zeta_1)} \\
+ \frac{A_0^{(2)}}{(z-\zeta_2)^{d_2}} + \cdots + \frac{A_{d_2 - 1}^{(2)}}{(z - \zeta_2)}\\
+ \cdots
+ \frac{A_0^{(r)}}{(z- \zeta_r)^{d_r}} + \cdots + \frac{A_{d_r - 1}^{(r)}}{(z- \zeta_r)}$$
where the $\lbrace A_s^{(j)}$ are constants. (The $\zeta_k$'s are assumed distinct.)
"
Really try to understand how the subscript of $A$ behaves. With your example this becomes that
$$\frac{x^3 +5}{x^2(x^2+2)} = \frac{x^3 + 5}{x^2(x + i \sqrt{2})(x - i \sqrt{2})} = \frac{A_0^{(1)}}{x^2} + \frac{A_1^{(1)}}{x} + \frac{A_0^{(2)}}{x + i \sqrt{2}} + \frac{A_0^{(3)}}{x - i \sqrt{2}}.$$
Now, by the Fundamental Theorem of Algebra, any quadratic in the denominator will necessarily have two complex roots yielding the above behaviour. We can put all of these together and have a linear term ($bX + c$ form where $b$ and $c$ are some combination of the $A_s^{(j)}$'s) on the top.
So why look at it this way? Well, because then this implies that one can deal with partial fraction decomposition in the same way and even generalize the previous observation to understand the following intuitively. If you have a polynomial of degree $n$ on the denominator then its partial fraction decomposition will have a term which such a polynomial in the denominator, and in which the numerator is a polynomial with degree at most $n-1$. This for $n = 2$ is precisely your problem.
