<s>[INST] Partial decomposition of $\frac{z^2}{(2z^2+3)((s^2+1)z^2+1)}$ Recently I have come arcross the following fraction

$$\dfrac{z^2}{(2z^2+3)((s^2+1)z^2+1)}$$

Hence I have encountered this fraction within a task of integration I want to do a partial decomposition. First of all I rewrote it as following
$$\dfrac{z^2}{(2z^2+3)((s^2+1)z^2+1)}=\dfrac{Az+B}{2z^2+3}+\dfrac{Cz+D}{(s^2+1)z^2+1} $$
which yields to a system of equations for $A,B,C$ and $D$
$$\begin{align}
0&=A(1+s^2)+3C\\
0&=B(1+s^2)+3D\\
0&=s^2A+2C\\
1&=s^2B+2D
\end{align}$$
Solving this system gives $A=C=0$ and $B=\dfrac{3}{s^2-2}$ and $D=-\dfrac{s^2-1}{s^2-2}$. By plugging in these values we arrive at

$$\dfrac{3}{(s^2-2)(2z^2+3)}-\dfrac{s^2-1}{(s^2-2)((s^2+1)z^2+1)}=\dfrac{s^2(z^2-3)+5z^2+6}{(s^2-2)(2z^2+3)((s^2+1)z^2+1)}$$

which is in fact not the wanted fraction. From the original task(solution to Problem 2 by ysharifi) I am going through I know, that the right partial decomposition should look like 

$$\dfrac1{3s^2+1}\left(\frac3{2z^2+3}-\frac1{(s^2+1)z^2+1}\right)$$

but honestly speaking I have no clue how to get to this. Could someone please go through the whole process with me. I am quite confused right now.
Thanks in advance.
 [/INST] Based on your demand, here's another method using residues
Let 
\begin{equation}
F(z)= \frac{z^2}{(2z^2+3)((s^2+1)z^2+1)}
=
\frac{\frac{z^2}{2(s^2+1)}}{(z^2 + \frac{3}{2})(z^2 + \frac{1}{s^2+1})}
\end{equation} 
\begin{equation}
 F(z)
 = \frac{\frac{z^2}{2(s^2+1)}}{\Pi_{i=0}^3(z-z_i)}
 =
 \frac{r_0}{z-z_0}
 +
 \frac{r_1}{z-z_1}
 +
 \frac{r_2}{z-z_2}
 +
 \frac{r_3}{z-z_3}
\end{equation}
where
\begin{equation}
 r_k = \lim_{z \rightarrow z_k}
 (z-z_k)F(z)
\end{equation}
The poles $z_k$ are the roots of the denominator, i.e.
$
 z^2 = -\frac{3}{2}
$
that gives the first two poles
$
 z_{0,1} = \pm \frac{\sqrt{3}}{\sqrt{2}}i
$
and similarly, we compute the second two poles as 
$
 z_{3,4} = \pm \sqrt{\frac{1}{s^2+1}}i
$
Now, let's compute $r_i$'s, as 
\begin{align}
 r_0 = \lim_{z \rightarrow z_0}
 (z-z_0) F(z)
 &=
 \frac{\frac{z_0^2}{2(s^2+1)}}{(z_0-z_1)(z_0-z_2)(z_0-z_3)} \\
 r_1 = \lim_{z \rightarrow z_1}
 (z-z_1) F(z)
 &=
 \frac{\frac{z_1^2}{2(s^2+1)}}{(z_1-z_0)(z_1-z_2)(z_1-z_3)} \\
 r_2 = \lim_{z \rightarrow z_2}
 (z-z_2) F(z)
 &=
 \frac{\frac{z_2^2}{2(s^2+1)}}{(z_2-z_0)(z_2-z_1)(z_2-z_3)} \\
 r_3 = \lim_{z \rightarrow z_3}
 (z-z_3) F(z)
 &=
 \frac{\frac{z_3^2}{2(s^2+1)}}{(z_3-z_0)(z_3-z_1)(z_3-z_2)} 
\end{align}
After you replace and compute your $r_i$'s, you get $F(z)$ in the most decomposed form. Then, you could combine $(z-z_0)(z-z_1) = 2z^2 + 3$ and $(z-z_1)(z-z_2) = (s^2+1)z^2 + 1$
</s>