How to find the inverse Laplace transform of the following fraction? Please help me to find the inverse Laplace transform of the following:
$$\frac{s^2+6s+9}{(s-1)(s-2)(s-3)}$$
Do I have to divide the fractions and use partial fractions decomposition?
Like this:
$$\frac{s^2}{(s-1)(s-2)(s-3)}=\frac{A}{s-1}+\frac{B}{s-2}+\frac{C}{s-3}$$
$$\frac{6s}{(s-1)(s-2)(s-3)}=\frac{A}{s-1}+\frac{B}{s-2}+\frac{C}{s-3}$$
$$\frac{9}{(s-1)(s-2)(s-3)}=\frac{A}{s-1}+\frac{B}{s-2}+\frac{C}{s-3}$$

We perform partial fraction decomposition on the expression first:
\begin{align*}
\frac{s^2 + 6s+9}{(s-1)(s-2)(s-3)} &= \frac{A}{s-1} + \frac{B}{s-2} + \frac{C}{s-3} \\
&= \frac{A(s-2)(s-3) + B(s-1)(s-3) + C(s-1)(s-2)}{(s-1)(s-2)(s-3)} \\
s^2 + 6s+9 &= A(s^2-5s+6) + B(s^2-4s+3) + C(s^2-3s+2) \\
&= (A+B+C)s^2 + (-5A-4B-3C)s + (6A+3B+2C)
\end{align*}
So we have the following system of equations, which can be solved by row reduction (the simpler way) or matrix inversion (the harder way):
\begin{align*}
\begin{pmatrix} 1 & 1 & 1 \\ -5 & -4 & -3 \\ 6 & 3 & 2 \end{pmatrix}
\begin{pmatrix} A \\ B \\ C\end{pmatrix} &= \begin{pmatrix} 1 \\ 6 \\ 9\end{pmatrix} \\
\begin{pmatrix} A \\ B \\ C\end{pmatrix} &= \begin{pmatrix} 8 \\ -25 \\ 18\end{pmatrix}
\end{align*}
So we have:
\begin{align*}
\frac{s^2 + 6s+9}{(s-1)(s-2)(s-3)} &= \frac{8}{s-1} - \frac{25}{s-2} + \frac{18}{s-3} \\
\mathcal{L}^{-1} \left\{ \frac{s^2 + 6s+9}{(s-1)(s-2)(s-3)} \right\} &= \mathcal{L}^{-1} \left\{ \frac{8}{s-1} - \frac{25}{s-2} + \frac{18}{s-3} \right\} \\
&=8 \cdot \mathcal{L}^{-1} \left\{ \frac{1}{s-1} \right\} - 25 \cdot \mathcal{L}^{-1} \left\{ \frac{1}{s-2} \right\} + 18 \cdot\mathcal{L}^{-1}\left\{ \frac{1}{s-3} \right\} \\
&= 8e^t - 25e^{2t}+18e^{3t}
\end{align*}
