Convolution Problem (ML Boas, Ch 8, Sec 10, Prob 18)

In summary, the convolution integral is not correct for t>a. You need to use Laplace transforms to solve for y for t<a. For t>a, the given initial conditions don't apply.
  • #1
agnimusayoti
240
23
Homework Statement
For ##y"+{\omega}^2y=f(t)## and if ##f(t)=1## for ##0<t<a##; ##f(t)=0## for ##t<0## and ##t>a##; show that:
1. For t < a: ##y=1/\omega^2(1-\cos {\omega t)}##
2. For t > a: ##y=1/\omega^2[\cos{\omega(t-a) - \cos{\omega t}]##

If intial condition for y=y'=0
Relevant Equations
Let G(P) be the Laplace transformation of g(t) and H(p) be the Laplace transformation of h(t), then; invers transformation of the product of two Laplace transformation is the convolution of two correspondence function. We define convolution of g(t) and h(t) as follow:
$$y=g*h=\int_{0}^{t} [g(t-\tau)-h(\tau)] d\tau$$
So, ##L(y)=Y=G(P) H(p)## and therefore ##L^{-1} (G(p) H(p))=g*h##
I can use the convolution integrals and get the idea of this concept for t<a. But, I can't get the answer for t>a.

MY idea is substitute ##f(t) = 0## to the ODE, then I have second order linear differential equations with right hand is zero. So, the solution is
$$y=Ae^{i\omega t} + Be^{-i\omega t}$$. From the initial condition, I get A = B = 0.

The answer should be:
$$y=\frac{1}{\omega^2} [\cos {\omega (t-a)} - \cos {\omega t}]$$

What should I do to get the answer? Thanks
 
Physics news on Phys.org
  • #2
agnimusayoti said:
MY idea is substitute f(t)=0
Which is correct and gives the right solution up to ##t=0##.
What about ##t\ge 0 ## ?
 
  • #3
What do you mean?
 
  • #4
I'm not sure if it's a typo, but your convolution integral isn't correct.
 
  • #5
agnimusayoti said:
I can use the convolution integrals and get the idea of this concept for t<a. But, I can't get the answer for t>a.

MY idea is substitute ##f(t) = 0## to the ODE, then I have second order linear differential equations with right hand is zero. So, the solution is
$$y=Ae^{i\omega t} + Be^{-i\omega t}$$. From the initial condition, I get A = B = 0.
For ##t>a##, the given initial conditions don't apply since presumably ##a>0##.

You didn't define what ##g## and ##h## are, but I'll assume ##h## satisfies
$$h''(t) + \omega^2 h(t) = \delta(t),$$ where ##\delta(t)## is the Dirac delta function, and ##g## is really ##f##. Is there some reason you wrote ##G(P)## as opposed to ##G(p)##, or did you mean ##p## when you wrote ##P##?

You shouldn't need to treat ##t<a## and ##t>a## separately. The convolution integral should automatically give you both results. Same with using Laplace Transforms. Show us what you did for ##t<a## to see we can see why you're not getting the correct result.
 
  • #6
Yeah I mean P is p. But, Boas suggest to separate the integral. Convolution integral for f(t) equal to 1 is the same with the answer. But for f(t) 0 my answer turns to zero, which is different from the key.

Mm, since this section before Dirac Delta Function, so I Think the answer should not need this function.
 
  • #7
agnimusayoti said:
$$y=g*h=\int_{0}^{t} [g(t-\tau)-h(\tau)] d\tau$$
This should be
$$y=g*h=\int_{0}^{t} [g(t-\tau)\cdot h(\tau)] d\tau$$
 
  • #8
Yes youre right. Again, a serious typo brought confusion in this forum. But, in my work, indeed I use the multiplication operator, not a minus one. But, still can get the answer.
 
  • #9
agnimusayoti said:
Yeah I mean P is p. But, Boas suggest to separate the integral. Convolution integral for f(t) equal to 1 is the same with the answer. But for f(t) 0 my answer turns to zero, which is different from the key.
First, how are you intended to solve it—evaluating the convolution integral or using Laplace transforms?

Second, what integral specifically are you trying to evaluate? You haven't shown us any of your work. What is ##g##? What is ##h##?

Third, I think you're misunderstanding what Boas says, but without seeing what you actually did, I'm only guessing.
 
Last edited:
  • #10
I solved with Laplace transform for interval 0 < t < a. Here is my work:
f(t) can be transformed to H(p) by integral transformation called Laplace transformation. Here, f(t) transformed to H(p) by: ##H(p)=\int_{0}^{\infty} f(t) e^{-pt} dt##.
For further notation, Y (capital) is Laplace transform (in "p" variable) for y, where y is the function in "t" variable.

$$L(y" + \omega^2y) = L(f(t))$$.
Here,
$$L(y")= \int_{0}^{\infty} e^{-pt} y" dt $$.
With integration by part for ##y" dt## as ##dv## and ##e^{-pt}## is ##u##,
$$\int u dv = u v - \int v du$$.
Hence, for the limit of integration I get
$$L(y'')=p^2 Y - p y_0 - y'_0$$.
Similarly, for first derivative, Laplace transform gives: $$L(y')=p Y - y_0$$.
So, Laplace transformation acts on both side gives:
$$p^2Y - p y_0 -y'_0 + \omega^2(pY - y_0)=H(p)$$
With given initial condition for ##y_0 = y'_0 = 0##, so
$$(p^2 + \omega^2) Y = H(p)$$
$$Y = (p^2 + \omega^2)^{-1} H(p)$$
If I define ##G(p)=\frac{1}{p^2 + \omega^2}## then I have:
$$Y = G(p) H(p)$$
The solution of ODE is invers transformation of Y. In other words, y is equal to inverse transformation of the product of two Laplace Transformation G(p) and H(p), which equal to the convolution of g*h.

Now, I will use the Convolution of two function, say g(t) and f(t). Convolution is notated by star *. Here,
$$g(t) * h(t) = \int_{0}^{t} g(t-\tau) h(\tau) d\tau =\int_{0}^{t} h(t-\tau) g(\tau) d\tau $$.

$$G(p) = \frac{1}{p^2 + \omega^2} \Rightarrow g(t) = \frac{1}{\omega} \sin \omega t \Rightarrow g(\tau)= \frac{1}{\omega} \sin \omega \tau $$
$$H(p) = L(f(t)) \Rightarrow h(t) = f(t) =1 $$ for t < a. Here, f(t) is the function in the problem. Therefore, ##g(t-\tau)=1.##
So,
$$y = g*h=\int_{0}^{t} (1)\left[\frac{1}{\omega} \sin \omega \tau \right] d\tau$$
$$y =\frac{1}{\omega^2} (1-cos \omega t) $$


For t > a; f(t) = 0. So, I get H(p) = L(f(t)) = 0. I can't get the answer for this case.
 
  • #11
Consider that the integral runs through ##0\leq\tau \leq a < t## ? Is f(t)=0 the entire trip?
 
  • #12
You don't treat the two cases separately that way. Note that when you calculate ##H(p)##, you integrate over ##(0,\infty)## so ##H(p)## incorporates all of the information about ##h(t)## already. You just need to be more careful about evaluating the convolution integral.

The function ##h(t-\tau)## is equal to 1 only if ##0<t-\tau<a##. You should be able to convince yourself that when ##t<a##, the integrand doesn't vanish over the entire interval ##0 < \tau < t##, so you end up with the integral you evaluated.

When ##t>a##, however, you again need ##\tau < t## so the upper limit doesn't change. But this time, you also need ##\tau > t-a > 0## for the integrand to not vanish, so the lower limit of the integral isn't 0 but ##t-a##. This will lead to the answer you desire.

An alternative would be to calculate the convolution as
$$\int_0^t g(t-\tau) h(\tau)\,d\tau$$ which makes the limits more straightforward to figure out in the two cases. But you need to recognized that when you invert ##G(p)##, you actually get ##\frac 1\omega \sin\omega t\ u(t)##, where ##u(t)## is the unit step function.

Edit: fixed typo/sign error
 
Last edited:
  • #13
benorin said:
Consider that the integral runs through ##0\leq\tau \leq a < t## ? Is f(t)=0 the entire trip?

mm, f(t) = 0 only if t > a. But, how this affect the integrand?

vela said:
The function ##h(\tau-t)## is equal to 1 only if ##0<t-\tau<a##. You should be able to convince yourself that when ##t<a##, the integrand doesn't vanish over the entire interval ##0 < \tau < t##, so you end up with the integral you evaluated.
Could you help me how to convince that the integrand doesn't vanish over that entire interval?

vela said:
When ##t>a##, however, you again need ##\tau < t## so the upper limit doesn't change. But this time, you also need ##\tau > t-a > 0## for the integrand to not vanish, so the lower limit of the integral isn't 0 but ##t-a##. This will lead to the answer you desire.

Uh,right. With this lower limit I get the answer. But, I still can't see the reason why the lower limit is difference for two cases?
 
  • #14
##h(\tau )## is what? When (I mean for which values of ##\tau##)? Examine the the inequalities involving ##a,t,## and ##\tau##, what are the breakpoints (i.e. when does ##f(t)## change)?
 
  • Like
Likes vela
  • #15
I will try to answer your guidelines:
First, I consider
$$H(p)=L[h(t)]=L[f(t)]$$
So, here $$h(t)=f(t)$$. From the problem f(t) = 1 for 0 < t < a and f(t) = 0 for t<0 or t>a. I can't write the brackets to show the value of f(t) using Latex.
Now, I change the variable t to ##\tau##; so I get:
$$h(\tau)=1$$ for ##0<t-\tau<a##
$$h(\tau)=0$$ for ##t-\tau > a##

Any mistakes from this step?
Then, how I define the limit of integration?

Now, you suggested to examine the inequalites involving those 3: ##a, t, \tau##. I think the inequalities are:
1. ##0<t-\tau<a##
2. ##t-\tau>a##
Again, how I examine these inequalities to find limit of integration?

Finally, I think the breakpoint is t=a. When t=a, the function is likely jump. Is it right? BUt, how this breakpoint helps me to examine the limits of integration?
 
  • #16
agnimusayoti said:
Now, I change the variable t to ##\tau##; so I get:
$$h(\tau)=1$$ for ##0<t-\tau<a##
$$h(\tau)=0$$ for ##t-\tau > a##

Any mistakes from this step?
Yes. Where are you getting ##0<t-\tau<a## from ##h(\tau)=1##? I don't see a ##t## in ##h(\tau)=1##.
 
  • #18
I see perhaps a point of confusion:

method #1:
vela said:
The function h(τ−t) is equal to 1 only if 0<t−τ<a. You should be able to convince yourself that when t<a, the integrand doesn't vanish over the entire interval 0<τ<t, so you end up with the integral you evaluated.
method #2:
vela said:
An alternative would be to calculate the convolution as
∫0tg(t−τ)h(τ)dτ which makes the limits more straightforward to figure out in the two cases. But you need to recognized that when you invert G(p), you actually get 1ωsin⁡ωt u(t), where u(t) is the unit step function.

which are you following?
 
  • #19
Wait, let me fix the Tex code and some error in post #5
$$h(t) =
\begin{cases}
1 & \text{if } 0<t<a \\
0 & \text{if } t > a
\end{cases} $$

Then, I change variable t to tau:
$$h(\tau) =
\begin{cases}
1 & \text{if } 0<\tau<a \\
0 & \text{if } \tau > a
\end{cases} $$

Again, I change variable ##\tau## to ##t-\tau##
$$h(t-\tau) =
\begin{cases}
1 & \text{if } 0<t-\tau<a \\
0 & \text{if } t-\tau > a
\end{cases} $$
 
  • #21
benorin said:
I see perhaps a point of confusion:

method #1:
method #2:which are you following?
I'm not sure. But, since my work use the convolution, (because in method 2 there is notation similar with convolution) so I think I'm following method 2.
 
  • #22
agnimusayoti said:
Again, I change variable ##\tau## to ##t-\tau##
$$h(t-\tau) =
\begin{cases}
1 & \text{if } 0<t-\tau<a \\
0 & \text{if } t-\tau > a
\end{cases} $$

Is it right?
 
  • #23
Pretty much, except you should also specify that the ##h(t-\tau) = 0## for ##t-\tau<0## as well.
 
  • #24
Yeah, youre right. Then, what should I do to get different limit of integration (from ##\tau = a## to ##\tau=t##?
Is it because:
agnimusayoti said:
$$h(t-\tau) =
\begin{cases}
1 & \text{if } 0<t-\tau<a \\
0 & \text{if } t<0 ; t-\tau > a
\end{cases} $$

Then, from second condition, h(t) equals to zero if ##t<0## and ##t>a##. For ##t < 0## can I say that this condition imply that integration should run from ##\tau = 0## to ##\tau=t## So that t always more than zero? And for ##t>a##; can I say that this condition imply that integration from ##\tau = a## to ##\tau = t## so that t always less than a?
 

FAQ: Convolution Problem (ML Boas, Ch 8, Sec 10, Prob 18)

What is a convolution problem in machine learning?

A convolution problem in machine learning involves using a mathematical operation called convolution to process data and extract features from it. This technique is commonly used in image and signal processing tasks.

How does convolution work?

Convolution involves multiplying a small part of the input data with a filter or kernel, then sliding the filter across the entire input data and repeating the process. This results in a new output signal or image that highlights certain features or patterns in the original data.

What is the purpose of convolution in machine learning?

The purpose of convolution in machine learning is to extract meaningful features from data that can then be used for tasks such as classification, object detection, and image recognition. It helps to reduce the complexity of the data and make it easier for machine learning algorithms to process.

What is the difference between 1D and 2D convolution?

1D convolution is used for processing one-dimensional data, such as time series data. 2D convolution, on the other hand, is used for processing two-dimensional data, such as images. The main difference is that 2D convolution involves sliding the filter across both the height and width of the data, while 1D convolution only slides across the length of the data.

How is the output size determined in a convolution problem?

The output size in a convolution problem is determined by the size of the input data, the size of the filter, and the stride (how much the filter moves at each step). The formula for calculating the output size is (N - F + 2P)/S + 1, where N is the input size, F is the filter size, P is the amount of padding, and S is the stride.

Back
Top