Using superposition and time invariance to find RL circuit response I am confusing reading book by Chaparro (Signal System with Matlab) in example 2.7. He gives a question, a RL circuit with unit-step source $ v(t) = u(t) $ will result a response,

$$ i(t) = (1- e^{-t}) u(t) $$

If the input changed $ v(t) = u(t) - u(t-2) $, we are asked to the new response of RL system.

In the given solution (see the figure), he only use superposition and time invariance principle to bring the following,

$$ i(t) − i(t − 2) = 2(1 − e ^ {−t} ) u(t) − 2(1 − e ^ {(t−2)} ) u(t − 2) $$

Based on my understanding on superposition and time invariance, it should be,

$$ i(t) − i(t − 2) = (1 − e ^ {−t} )u(t) − (1 − e ^ {(-t+2)} ) u(t − 2) $$

But, I've checked it with graphical method (convolution) and Matlab script, the given answer (plot of $i(t)$, $-i(t-2)$ and $ i(t)-i(t-2)$) is true. Here is how,

First I obtain $h(t)$ from $i(t)$ by derrivation,

$$i(t) = v(t) * h(t)$$

I got $h(t)=e^{-t}u(t)$. By convolving $h(t)$ with $i(t)-i(t-2)$ I got the same plot on the book (Using matlab conv).

Anyone can explain, how superposition and time-invariant principle can bring the answer?

Thanks in advance.

Screenshot of the book (from Google Book)



Plot of $i(t)$, $-i(t-2)$ and $ i(t)-i(t-2)$
The answer to your last question is no. Nobody can explain how that answer was obtained because it's wrong. The fact that it is wrong is obvious, because due the term $e^{(t-2)}$ (with a positive power of $t$!), the output will keep increasing indefinitely, which is impossible for a stable system (such as the given RL-circuit).

Your answer is the correct one, and you must have made a mistake while checking the book's answer.