# Given $x(t) = u(t)$ and $h(t) = \cos(\pi t)u(t)$, how do we find the response $y(t)$?

Given $x(t) = u(t)$ and $h(t) = \cos(\pi t)u(t)$, find the response $y(t)$.

$y(t) = \int_{0}^{\infty}h(\tau)x(t−\tau)\, d\tau=\int_{0}^{\infty}\cos(\pi\tau)u(t−\tau)\, d\tau$

I can solve this if I can plot, $u(t−\tau)$.

• I can solve this if i can plot, \$u(t−τ)\$. – HOLYBIBLETHE Feb 23 '13 at 13:32
• @RajeshKSingh: For all τ < t, u(t−τ) = 0. For all τ >= t, u(t−τ) = 1. The plot is a line along the x-axis (y=0) up to but not including x=τ, then a step discontinuity at x=τ, then a line y=1 going right to infinity. Any good electric circuit analysis textbook should explain this, as it is a critical concept for transient analysis of RLC circuits. – John R. Strohm Feb 23 '13 at 13:56
• This was tagged "untagged". I retagged it, "integration". If someone has a better tag idea, go for it. – Gerry Myerson Feb 24 '13 at 3:13
• I don't see why the integral isn't $\int_{0}^{\infty}cos(\pi\tau)u(\tau)u(t-\tau)d\tau$. – assumednormal Feb 24 '13 at 3:20
• This really belongs on dsp.SE – Dilip Sarwate Feb 24 '13 at 3:52

We generally use Laplace transform to evaluate these; using convolution can get really cumbersome.

Recall that Laplace transform of convolution of two functions is equal to the product of Laplace transforms of the individual functions. So, in order to get y(t), we just need to find the Laplace transforms of x(t) and h(t), multiply them and then do the Inverse transform on the result.

$$X(s) = L\{x(t)\}\\ H(s) = L\{h(t)\}\\ y(t) = {L}^{-1}\{X(s).H(s)\}$$

I cannot tell if you are asking whether your integral for $y(t)$ is correct, or, assuming it is correct, how to compute it and then plot the response. I'll proceed assuming the latter since you don't tell us enough information to accurately judge the former.

$$y(t) = \int_{0}^{\infty}h(\tau)x(t−\tau)\, d\tau=\int_{0}^{\infty}\cos(\pi\tau)u(t−\tau)\, d\tau={\sin(\pi t)\over \pi}u(t)={\sin(\pi t)\over \pi},\quad t>0.$$

I did the convolution integral here with Mathematica or Wolfram Alpha.

The unit step function $u(\cdot)$ has the property that whenever what is inside those parentheses is positive, the function has value $1$ while if what is inside those parentheses is _negative, the function has value $0$. Now, when you write $$y(t) =\int_{0}^{\infty}\cos(\pi\tau)u(t−\tau)\, d\tau$$ you are finding the value of the output for a fixed value of of $t$, say $t=2.138$. So now let us look at $u(2.138-\tau)$ as $\tau$ increases from $0$ to $\infty$. That stuff inside the parentheses is going to have value $2.138 > 0$ at $\tau = 0$, and also positive value as long as $\tau < 2.138$. Once $\tau$ sweeps past $2.138$, that stuff inside parentheses is going to be negative and so $u(2.138-\tau)$ will have value $0$. So, we conclude that $$y(2.138) =\int_{0}^{\infty}\cos(\pi\tau)u(2.138−\tau)\, d\tau = \int_{0}^{2.138}\cos(\pi\tau)\cdot 1\, d\tau.$$ Repeating the same argument for $t=4.917$ we see that $$y(4.917) =\int_{0}^{\infty}\cos(\pi\tau)u(4.917−\tau)\, d\tau = \int_{0}^{4.917}\cos(\pi\tau)\cdot 1\, d\tau.$$ After a few more attempts like this, a light will begin to shine in your head as you shout "Hey, Ma, I think I am beginning to see a pattern here!" and conclude that for any fixed positive real number $t$, $$y(t) =\int_{0}^{\infty}\cos(\pi\tau)u(t−\tau)\, d\tau = \int_{0}^{t}\cos(\pi\tau)\, d\tau.$$ I hope that you can evaluate that last integral without any difficulty.