I am trying to find the inverse z-transform of
\begin{equation} x(z)=\frac{z^3+2z^2-2z}{(z-2)(z^2+2)} \end{equation}
and for this we need to get partial fractions. I have tried multiple approaches, the first
$z^3+2z^2-2z:z^3-2z^2+2z-4=1+\frac{4z^2-4z-4}{(z-2)(z^2+2)}$ which can be further separated as:
$1+4\frac{z^2(z-1)}{(z-2)(z^2+2)}-\frac{4}{(z-2)(z^2+2)}$
But here , nothing cancels out, so with those denominators, nothing can be made out for an inverse z-transform.
Then I tried
\begin{equation} \frac{z^3+2z^2-2z}{(z-2)(z^2+2)}=\frac{z(z^2+2z-2)}{(z-2)(z^2+2)} \end{equation}
\begin{equation} \frac{z(z^2+2z-2)}{(z-2)(z^2+2)}=\frac{z^2(z+2)}{(z-2)(z^2+2)}-\frac{2z}{(z-2)(z^2+2)} \end{equation}
But here also, no part of the function can be simplified further.
I was tempted to use Cauchy integral formula on for higher order functions, on
\begin{equation} x(z)=\frac{z^3+2z^2-2z}{(z-2)(z^2+2)} \end{equation}
but can that be done?
Thanks
UPDATE;
taking the partial fractions from the decomposition:
$1+\frac{2}{z-2}+\frac{2z}{(z^2+2)}$, we get the inverse z.transform by the table:
Inverse z-transform of 1:
$1=\delta_n $ for $ \{\delta_0=1, \ \ \delta_{n\ne0}=0, \}$
$\frac{2}{z-2}$ For this, I couldn't find a inverse z-transform from the table, however I did a calculation of it using Cauchy's theorem
$\frac{2}{z-2}\rightarrow Res(2)=\lim_{z\rightarrow 2}\frac{2z^{n-1}}{z-2}=\frac{(z-2)2z^{n-1}}{z-2}=2^n$
Same for the third term, I couldn't find an inverse z-transform from the table, hence:
$\frac{2z}{(z^2+2)}\rightarrow Res(\sqrt{2}i)=\lim_{z\rightarrow \sqrt{2}i}\frac{2zz^{n-1}}{(z^2+2)}=\frac{2z}{(z+2i)}=\frac{2(\sqrt{2}i)^n}{(2\sqrt{2}i)}=( i)^{n-1}$
and the second pole:
$\frac{2z}{(z^2+2)}\rightarrow Res(-\sqrt{2}i)=\lim_{z\rightarrow -\sqrt{2}i}\frac{2zz^{n-1}}{(z^2+2)}=\frac{2z}{(z-2i)}=\frac{2(-\sqrt{2}i)^n}{(-2\sqrt{2}i)}= (-1)^n(i)^{n-1}$
but this last transform is not correct according to WA
$$ \frac{z^3+2z^2-2z}{(z-2)(z^2+2)} = 1 + {2 \over z-2} + {2z \over z^2+2} $$ You know that the solution is of the form $$ a + {b \over z-2} + {cz+d \over z^2+2} $$ Reduce to the same denominator, identify with your initial fraction, deduce linear relations between a,b,c,d, solve.
You can be a bit faster, e.g. by noticing that a is the limit of the fraction when $z$ goes to infinity, and thus should be 1. Also you can get $b$ by multiplying the fraction by $z-2$ and letting $z$ goes to 2.
Note also that you can use a CAS such as maxima to check your result.
$$1 + {2 \over z-2} + {2z \over z^2+2}$$