Intuition behind Heaviside expansion formula Hello my electrical engineering teacher gave me those formulas when teaching how to solve electrical circuits using Laplace transforms. Having a polynomial $Q(s)$ of degree $n$ and $P(s)$ with degree $m$ the if $m<n$ and $$F(s)=\frac{Q(s)}{P(s)}$$ then the inverse Laplace transform is given by $$f(t)=\sum_{k=1}^n\frac{P(s_k)}{Q'(s_k)}e^{s_kt}$$ also if $$F(s)=\frac{P(s)}{sR(s)}$$ then $$f(t)=\frac{P(0)}{R(0)}+\sum_{k=1}^{n-1}\frac{P(s_k)}{s_kR(s_k)}e^{s_kt}$$ and $s_k$ are the roots of the polynomial in the denominator. Now I have studied Laplace transform in math class, however my math teacher did not proved or mention those formulas. All that I found related to this was on this answer: https://math.stackexchange.com/a/248355/515527 
Could you perhaps give me some intuition or a proof for these theorems, even though it is used in electrical engineering I think I can make use of it everytime I have to do ILT.
 A: $\DeclareMathOperator{\Re}{Re}\DeclareMathOperator{\Im}{Im}\DeclareMathOperator{\Res}{Res}\def\e{\mathrm{e}}\def\i{\mathrm{i}}\def\d{\mathrm{d}}$In fact, your first formula should be for $F(s) = \dfrac{P(s)}{Q(s)}$ where $\deg P < \deg Q$ and all zeros of $Q$ are simple, and the second one should be$$
\mathcal{L}^{-1}(F)(t) = \frac{P(0)}{R(0)} + \sum_{k = 1}^n \frac{P(s_k)}{s_k R'(s_k)} \e^{s_k t}
$$
where $n = \deg R \geqslant \deg P$ and all zeros of $s R(s)$ are simple.
Lemma: Denote$$
γ(a, r; θ_1, θ_2) = \{a + r\e^{\i θ} \mid θ_1 < θ < θ_2 \},\\
D(a, r) = \{z \in \mathbb{C} \mid \Re z < a,\ |z - a| > r \},\\
E(a, r) = \{z \in \mathbb{C} \mid \Im z > 0,\ |z - a| > r \}.
$$
If $f$ is continuous on $D(a, r_0)$ and $\lim\limits_{\substack{|z| → ∞\\z \in D(a, r_0)}} f(z) = 0$, then$$
\lim_{r → ∞} \int\limits_{γ(a, r; \frac{π}{2}, \frac{3π}{2})} f(z) \e^{tz} \,\d z = 0. \quad \forall t > 0
$$
Proof: By making substitution $w = -\i(z - a)$,$$
\int\limits_{γ(a, r; \frac{π}{2}, \frac{3π}{2})} f(z) \e^{tz} \,\d z = \int\limits_{γ(0, r; 0, π)} f(\i w + a) \e^{t(\i w + a)} \,\d w = \e^{ta} \int\limits_{γ(0, r; 0, π)} f(\i w + a) \e^{\i tw} \,\d w.
$$
Because $g(w) := f(\i w + a)$ is continuous on $E(0, r_0)$ and$$
\lim_{\substack{|w| → ∞\\w \in E(0, r_0)}} g(w) = \lim\limits_{\substack{|w| → ∞\\w \in E(0, r_0)}} f(\i w + a) = \lim_{\substack{|z| → ∞\\z \in D(a, r_0)}} f(z) = 0,
$$
by Jordan's lemma,$$
\lim_{r → ∞} \int\limits_{γ(a, r; \frac{π}{2}, \frac{3π}{2})} f(z) \e^{tz} \,\d z = \e^{ta} \lim_{r → ∞} \int\limits_{γ(0, r; 0, π)} g(w) \e^{\i tw} \,\d w = 0.
$$
Now back to find $\mathcal{L}^{-1}(F)$ for $F(s) = \dfrac{P(s)}{Q(s)}$ where $\deg P < \deg Q$ and all zeros of $Q$ are simple. $Q$ can be written as $Q(s) = c \prod\limits_{k = 1}^n (s - s_k)$ where $c \in \mathbb{C}^*$ and $s_1, \cdots, s_n$ are distinct complex numbers, thus all singularities of $F$ are $s_1, \cdots, s_n$. By taking $a = \max\limits_{1 \leqslant k \leqslant n} \Re s_k + 1$,$$
\mathcal{L}^{-1}(F)(t) = \frac{1}{2π\i} \lim_{r → ∞} \int_{a - \i r}^{a + \i r} F(s) \e^{ts} \,\d s. \quad (t > 0)
$$
Denote $r_0 = \max\limits_{1 \leqslant k \leqslant n} |s_k|$, then $F$ is continuous on $D(a, r_0)$ and $\deg P < \deg Q$ implies $\lim\limits_{\substack{|z| → ∞\\z \in D(a, r_0)}} F(z) = 0$. For any $r > r_0$, by the residue thorem,$$
\frac{1}{2π\i} \int_{a - \i r}^{a + \i r} F(z) \e^{tz} \,\d z + \frac{1}{2π\i} \int\limits_{γ(a, r; \frac{π}{2}, \frac{3π}{2})} F(z) \e^{tz} \,\d z = \sum_{k = 1}^n \Res(F(z) \e^{tz}, s_k).
$$
Thus by the lemma,$$
\frac{1}{2π\i} \lim_{r → ∞} \int_{a - \i r}^{a + \i r} F(s) \e^{ts} \,\d s = \sum_{k = 1}^n \Res(F(z) \e^{tz}, s_k).
$$
Now, note that $Q'(z) = c\sum\limits_{k = 1}^n \prod\limits_{j ≠ k} (z - s_j)$. For each $k$, since $s_1, \cdots, s_n$ are distinct, then$$
(z - s_k)F(z) \e^{tz} = \frac{P(z)}{c\prod\limits_{j ≠ k} (z - s_j)} \e^{tz}$$
is holomorphic in a neighborhood of $s_k$. Thus$$
\Res(F(z) \e^{tz}, s_k) = \lim_{z → s_k} (z - s_k)F(z) \e^{tz} = \frac{P(s_k)}{c\prod\limits_{j ≠ k} (s_k - s_j)} \e^{t s_k} = \frac{P(s_k)}{Q'(s_k)} \e^{t s_k},
$$
where the last step is because $\prod\limits_{j ≠ k'} (s_k - s_j) = 0$ for $k' ≠ k$. Therefore,$$
\mathcal{L}^{-1}(F)(t) = \sum_{k = 1}^n \Res(F(z) \e^{tz}, s_k) = \sum_{k = 1}^n \frac{P(s_k)}{Q'(s_k)} \e^{s_k t}.
$$
For the second formula, take $Q(s) = s R(S)$. Since zeros of $Q$ are $s_0 = 0, s_1, \cdots, s_n$ and $Q'(s) = R(s) + s R'(s)$, then$$
\mathcal{L}^{-1}(F)(t) = \sum_{k = 0}^n \frac{P(s_k)}{Q'(s_k)} \e^{s_k t} = \frac{P(s_0)}{Q'(s_0)} \e^{s_0 t} + \sum_{k = 1}^n \frac{P(s_k)}{Q'(s_k)} \e^{s_k t} = \frac{P(0)}{R(0)} + \sum_{k = 1}^n \frac{P(s_k)}{s_k R'(s_k)} \e^{s_k t}
$$
A: If $\deg P < \deg Q$ and $Q$ doesn't have multiple zeroes, then the partial fraction decomposition of $P/Q$ has the form
$$\frac {P(s)} {Q(s)} = \sum_{Q(s_i) = 0} \frac {A_i} {s - s_i}.$$
Suppose $Q$ is monic. Then
$$P(s) = \sum_i A_i \prod_{j \neq i} (s - s_j), \\
P(s_i) = A_i \prod_{j \neq i} (s_i - s_j),$$
because only one term in $P(s_i)$ is non-zero. On the other hand,
$$Q'(s) = \sum_i \prod_{j \neq i} (s - s_j), \\
Q'(s_i) = \prod_{j \neq i} (s_i - s_j),$$
and we obtain
$$A_i = \frac {P(s_i)} {Q'(s_i)}.$$
We can see that the coefficients in the partial fraction decomposition are unchanged if $Q$ isn't monic. Then
$$\mathcal L^{-1} \!\left[ \frac {P(s)} {Q(s)} \right] =
\sum_i A_i e^{s_i t}.$$
From
$$\mathcal L^{-1} \!\left[ \frac {F(s)} s \right] = \int_0^t f(\tau) d\tau,$$
if $Q(0) \neq 0$, we have
$$\mathcal L^{-1} \!\left[ \frac {P(s)} {s Q(s)} \right] =
\sum_i \frac {A_i} {s_i} e^{s_i t} -
 \sum_i \frac {A_i} {s_i} = \\
\sum_i \frac {A_i} {s_i} e^{s_i t} + \frac {P(0)} {Q(0)}.$$
