<s>[INST] 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}$$
 [/INST] The partial expansion is:
$$\frac{s^2 + 6 s + 9}{(s - 3) (s - 2) (s - 1)}=\frac{18}{s-3}-\frac{25}{s-2}+\frac{8}{s-1}$$
Inverting term-by-term we get:
$$\mathcal{L}_s^{-1}\left(\frac{18}{s-3}\right)=18 e^{3 n}$$
$$-\mathcal{L}_s^{-1}\left(\frac{25}{s-2}\right)=-25 e^{2 n}$$
$$\mathcal{L}_s^{-1}\left(\frac{8}{s-1}\right)=8 e^n$$
And, putting it all together...
$$8 e^n-25 e^{2 n}+18 e^{3 n}$$
EDIT:
To get the quantities, $A$, $B$, $C$, we need to crate the partial fraction template using the denominator $(s-3)(s-2)(s-1)$
$$\frac{s^2 + 6 s + 9}{(s-3)(s-2)(s-1)}=\frac{A}{s-3}-\frac{B}{s-2}+\frac{C}{s-1}$$
Next, multiply the equation by the denominator:
$$\frac{(s^2 + 6 s + 9)(s-3)(s-2)(s-1)}{(s - 3) (s - 2) (s - 1)}=\frac{A(s-3)(s-2)(s-1)}{s-3}-\frac{B(s-3)(s-2)(s-1)}{s-2}+\frac{C(s-3)(s-2)(s-1)}{s-1}$$
And, after we simplify, it turns out that:
$$s^2 + 6 s + 9=A (s - 2) (s - 1)-B(s - 3)  (s - 1)+C(s - 3) (s - 2)$$
Solve for the unknown parameters by plugging in the roots of the denominators
For example, for root 3, plug in $s=3$ into the equation
$$3^2+3\dot6+9 = A(3-2))(3-1)+B(3-3)(3-1)+C(3-3)(3-2)$$
$$36=2A$$
$$A=18$$
Can you do the rest?
</s>