Solving convolution problem with $\delta(x)$ function

325 Views Asked by At

Suppose we had the functions: $$g(t)=\theta(t)(e^{-t}+2e^{-2t})+2\delta(t)$$ and $$u(t)=2(\theta(t)-\theta(t-2))$$ Then we have $$u*g=\int_{-\infty}^{\infty}g(\tau)u(t-\tau)d\tau=2\int_{t-2}^{t}(e^{-\tau}+2e^{-2\tau}+2\delta(\tau))d\tau$$ which then reduces to: $$u*g=-2e^{-t}+2e^{-2t}+2e^{-2t+4}-2e^{-2t}+4(\theta(t)-\theta(t-2))$$

However, using Laplace transform I arrived to this result: $$u*g=(\theta(t)-\theta(t-2))(16-4e^{-t}-4e^{-2t})$$

The fact that the results do not agree leads me to believe that I am missing something very important while doing the integration part.

In all of the above lines, $\theta(x)$ represents the unit step function, and $\delta(x)$ is the Dirac impulse function. Using the advice I got in the comments I got : $$u*g=2\int_{t-2}^{t}(e^{-\tau}\theta(\tau)+2e^{-2\tau}\theta(\tau)+2\delta(\tau))d\tau$$ Then, I tried solving the integral, but making this suspicious step in the calculations: $$\int_{t-2}^{t}e^{-\tau}\theta(\tau)d\tau=-e^{-\tau}\theta(\tau) |^{t}_{t-2}$$

The result I got is: $$u*g=\theta(t)(-2e^{-2t}-2e^{-2t}+4)+\theta(t-2)(2e^{-t+2}+2e^{-2t+4}-4)$$

2

There are 2 best solutions below

0
On BEST ANSWER

Let me walk you through both ways of computing the convolution. First let's compute the convolution in the time domain. Define

$$f(t)=(e^{-t}+2e^{-2t})\theta(t)\\g(t)=f(t)+2\delta(t)\tag{1}$$

We have

$$(u*g)(t)=(u*f)(t)+2u(t)\tag{2}$$

$$(u*f)(t)=\int_{-\infty}^{\infty}u(\tau)f(t-\tau)d\tau=2\int_{0}^2\theta(t-\tau)\left(e^{-(t-\tau)}+2e^{-2(t-\tau)}\right)d\tau\tag{3}$$

We have to distinguish three cases. For $t<0$, the integral $(3)$ is zero. For $0\le t\le 2$ we have

$$2\int_{0}^t\theta(t-\tau)\left(e^{-(t-\tau)}+2e^{-2(t-\tau)}\right)d\tau=2\left(2-e^{-t}-e^{-2t}\right)\tag{4}$$

Finally, for $t>2$ we get

$$2\int_{0}^2\theta(t-\tau)\left(e^{-(t-\tau)}+2e^{-2(t-\tau)}\right)d\tau=2\left(e^{-(t-2)}+e^{-2(t-2)}-e^{-t}-e^{-2t}\right)\tag{5}$$

Combining this with Eq. $(2)$ we get

$$(u*g)(t)=\begin{cases}0,&t<0\\ 8-2e^{-t}-2e^{-2t},&0\le t\le 2\\ 2\left(e^{-(t-2)}+e^{-2(t-2)}-e^{-t}-e^{-2t}\right),&t>2\end{cases}\tag{6}$$

If we use the Laplace transform we get

$$U(s)=\frac{2}{s}\left(1-e^{-2s}\right)\\ G(s)=\frac{1}{s+1}+\frac{2}{s+2}+2$$

and

$$\begin{align}U(s)G(s)&=\left(\frac{2}{s(s+1)}+\frac{4}{s(s+2)}+\frac{4}{s}\right)\left(1-e^{-2s}\right)\\&=\left(\frac{8}{s}-\frac{2}{s+1}-\frac{2}{s+2}\right)\left(1-e^{-2s}\right)\end{align}\tag{7}$$

The inverse transform of $(7)$ is

$$(u*g)(t)=\left(8-2e^{-t}-2e^{-2t}\right)\theta(t)-\left(8-2e^{-(t-2)}-2e^{-2(t-2)}\right)\theta(t-2)\tag{8}$$

It is straightforward to show that $(6)$ and $(8)$ are identical.

0
On

This is a convolution between $g(t)=\theta(t)f(t)+2\delta(t)$ with $f(t)=e^{-t}+2e^{-2t}$ and the rectangular function $u(t)=2[\theta(t)-\theta(t-2)]$. So we have $$ \begin{align} (g*u)(t)=((\theta f)*u)(t)+2\underbrace{(\delta *u)(t)}_{=u(t)} \end{align} $$ and $$ ((\theta f)*u)(t)=\begin{cases} 0 & \text{for }t < 0\\ 2\int_0^t f(\tau)\mathrm d \tau & \text{for }0\le t < 2\\ 2\int_{t-2}^t f(\tau)\mathrm d \tau & \text{for } t \ge 2 \end{cases} $$ that is $$ ((\theta f)*u)(t)=\begin{cases} 0 & \text{for }t < 0\\ 2\left(2- e^{-t}-e^{-2 t}\right) & \text{for }0\le t < 2\\ 2\left((e^2-1) e^{-t}+(e^4-1) e^{-2 t}\right) & \text{for } t \ge 2 \end{cases} $$ and calling $a(t)=e^{-t}+e^{-2 t}$ $$\begin{align} ((\theta f)*u)(t)&=2\left[2-a(t)\right]\cdot[\theta(t)-\theta(t-2)]+ 2\left[a(t-2)-a(t)\right]\theta(t-2) \end{align} $$ and then

$$\begin{align} (g*u)(t)&=2\left[2-a(t)\right]\theta(t)+ 2\left[a(t-2)-2\right]\theta(t-2)+2u(t)\tag 1 \end{align} $$

With Laplace transform we have $$ G(s)U(s)=\mathcal{L}\left\{(g∗u)(t)\right\}=F(s)U(s)+2U(s) $$ where $F(s)=\mathcal{L}\left\{f(t)\theta(t)\right\}=\frac{1}{s+1}+\frac{2}{s+2}$ and $U(s)=2\mathcal{L}\left\{\theta(t)-\theta(t-2)\right\}=2\frac{1-e^{-2s}}{s}$ and then $$ F(s)U(s)=2\left[\frac{2}{s}-A(s)\right](1-e^{-2s}) $$ where $A(s)=\frac{1}{s+1}+\frac{1}{s+2}=\mathcal{L}\{a(t)\theta(t)\}$ and $a(t)=e^{-t}+e^{-2 t}$.

So we have $$\mathcal{L}^{-1}\left \{ F(s)U(s)\right \}=2\left[2-a(t)\right]\theta(t)+ 2\left[a(t-2)-2\right]\theta(t-2)$$ and then

$$\mathcal{L}^{-1}\left\{ G(s)U(s)\right\}=2\left[2-a(t)\right]\theta(t)+ 2\left[a(t-2)-2\right]\theta(t-2)+2u(t)\tag 2$$