# Convolution integral

• I
Dear "General Math" Community,
my goal is to calculate the following integral $$\mathcal{I} = \int_{-\infty }^{+\infty }\frac{f\left ( \mathbf{\vec{x}} \right )}{\left | \mathbf{\vec{c}}- \mathbf{\vec{x}} \right |}d^{3}x$$ in the particular case in which $f\left ( \mathbf{\vec{x}} \right )=f\left ( x \right )$ where $x=\left | \mathbf{\vec{x}} \right |$.
I switched to spherical coordinates and wrote $\left | \mathbf{\vec{c}- \mathbf{\vec{x}}} \right |= \sqrt{c^{2}+x^{2}-2cx\cos \vartheta }$ and $d^{3}x=x^{2}\cos \vartheta d\varphi d\vartheta dx$. After the integration in $\varphi$ and $\vartheta$ it just remains $$\mathcal{I} = \frac{1}{c}\int_{0}^{c}fx^{2}dx+\int_{c}^{+\infty }fxdx.$$
The integral can also be seen as the convoultion of the function $f$ with the function $\frac{1}{\left | \mathbf{\vec{x}} \right |}$ so I expect to find the same result if I evaluate $$\mathscr{F}^{-1}\left \{ \hat{f} \cdot \frac{1}{k^{2}}\right \}$$ where $\hat{f}$ and $\frac{1}{k^{2}}$ are the Fourier transforms of the function $f$ and the Coulomb potential up to some coefficients respectively.
So now I can write $$\int_{0}^{2\pi }\int_{-\frac{\pi }{2}}^{\frac{\pi}{2}}\int_{0}^{\infty }\frac{\hat{f}}{k^{2}}k^{2}e^{i\vec{\mathbf{k}}\cdot \vec{\mathbf{x}}}\cos \vartheta d\vartheta dkd\varphi = 2\pi\int_{-\frac{\pi }{2}}^{\frac{\pi}{2}}\int_{0}^{\infty }\frac{\hat{f}}{k^{2}}k^{2}e^{ikx\sin \vartheta } \cos \vartheta d\vartheta dk=$$$$=2\pi \int_{0}^{\infty }\hat{f}dk\int_{-\frac{\pi }{2}}^{\frac{\pi }{2}}e^{ikx\sin \vartheta } \cos \vartheta d\vartheta.$$
Performing the integration in $\vartheta$ yelds $\frac{1}{kx}\sin \left ( kx \right )$ which finally brings to $$\frac{1}{x}\int_{0}^{\infty }\frac{f}{k}\sin \left ( kw \right )dk.$$
I am stuck at this point and I do not see how to recover the first solution.
Can anybody help me out?
Thank you very much in advance

BvU
Homework Helper
I switched to spherical coordinates and wrote $$|\vec c− \vec x|=\sqrt{c^2+x^2−2cx\cos\theta }\ \ \ \rm { and } \ \ d^3 x= x^2\sin\theta \;d\phi \; d\theta \;dx$$
But these ##\theta## are not one and the same !

(##d^3 x## has a ##\sin\theta##!)

(Anyone know why ##\TeX## comes with a different font for the x in the d3x above ?)

Last edited:
ShayanJ
Gold Member
But these ##\theta## are not one and the same !

(##d^3 x## has a ##\sin\theta##!)

(Anyone know why ##\TeX## comes with a different font for the x in the d3x above ?)
In general you're correct. But you can choose your z axis to be parallel with ## \vec c ## or ## \vec x ##. Then the angle between them is the same as the ## \theta ## of the spherical coordinates.

blue_leaf77
Homework Helper
I switched to spherical coordinates and wrote |⃗c−⃗x|=√c2+x2−2cxcosϑ\left | \mathbf{\vec{c}- \mathbf{\vec{x}}} \right |= \sqrt{c^{2}+x^{2}-2cx\cos \vartheta } and d3x=x2cosϑdφdϑdxd^{3}x=x^{2}\cos \vartheta d\varphi d\vartheta dx. After the integration in φ\varphi and ϑ\vartheta it just remains
I=1c∫c0fx2dx+∫+∞cfxdx.​
Don't you think you need to change ##\cos \theta## in ##|\vec c - \vec x|## to ##\sin \theta##?

BvU
Homework Helper
kaniello ?

Hello and sorry for not being online yesterday.

Can you please explain me better what do you mean by :
Don't you think you need to change ##\cos \theta## in ##|\vec c - \vec x|## to ##\sin \theta##?

blue_leaf77
Homework Helper
Hello and sorry for not being online yesterday.

Can you please explain me better what do you mean by :
Can you tell us which angle ##\theta## is in your formula for volume element ##
d^{3}x=x^{2}\cos \vartheta d\varphi d\vartheta dx
##? Please describe in terms of angle subtended by which vectors.

Can you tell us which angle ##\theta## is in your formula for volume element ##
d^{3}x=x^{2}\cos \vartheta d\varphi d\vartheta dx
##? Please describe in terms of angle subtended by which vectors.
I did my best to draw it [emoji6]

blue_leaf77
Homework Helper
I see, now what about vector ##\vec c##? Since it's fixed in the integration, you need to pick certain direction for it. To which direction did you align ##\vec c##?

Can you tell us which angle ##\theta## is in your formula for volume element ##
d^{3}x=x^{2}\cos \vartheta d\varphi d\vartheta dx
##? Please describe in terms of angle subtended by which vectors.
This is maybe more clear

blue_leaf77
Homework Helper
Yes I understand what ##\theta## is, it's the angle between ##\vec x## and its projection in the ##(x_1,x_2)## plane. But we also need to know where ##\vec c## is in your diagram.

I see, now what about vector ##\vec c##? Since it's fixed in the integration, you need to pick certain direction for it. To which direction did you align ##\vec c##?
What if pick the red line?

blue_leaf77
Homework Helper
What if pick the red line?
You can but that's not a wise choice. If you do that, the expression for ##|\vec c - \vec x|## will get very messy, for instance the angle between ##\vec x## and ##\vec c## is not always ##\theta## as you defined in the picture. Only for ##\vec x## that lies in the same plane as ##\vec c## and ##x_3## axis can be described by your ##\theta##. I suggest that you pick ##x_3## to align your vector ##\vec c##.

You can but that's not a wise choice. If you do that, the expression for ##|\vec c - \vec x|## will get very messy, for instance the angle between ##\vec x## and ##\vec c## is not always ##\theta## as you defined in the picture. Only for ##\vec x## that lies in the same plane as ##\vec c## and ##x_3## axis can be described by your ##\theta##. I suggest that you pick ##x_3## to align your vector ##\vec c##.
My intention was in fact to place the red lines in the plane ##x_1 x_2## so that it forms the angle ##\theta## with ##\vec x##. As you suggested ##\vec x## should be in the plane ##\vec c## x_3## axis.

blue_leaf77
Homework Helper
My intention was in fact to place the red lines in the plane ##x_1 x_2## so that it forms the angle ##\theta## with ##\vec x##. As you suggested ##\vec x## should be in the plane ##\vec c## x_3## axis.
No, since you integrate over the entire space, ##\vec x## can have arbitrary direction. There is actually no difficulty in changing ##\vec c## to ##x_3## axis while expressing ##|\vec c -\vec x|## in terms of ##\theta##. You just need to use sine instead of cosine which was the reason I asked in post #4.

No, since you integrate over the entire space, ##\vec x## can have arbitrary direction. There is actually no difficulty in changing ##\vec c## to ##x_3## axis while expressing ##|\vec c -\vec x|## in terms of ##\theta##. You just need to use sine instead of cosine which was the reason I asked in post #4.
Thanks a lot for the explanation.

With that hint I repeated the calculations and found:
##\int_{0}^{\infty }\int_{-\frac{\pi }{2}}^{\frac{\pi }{2}}\frac{f\left ( x \right )}{\sqrt{c^{2}+x^{2}-2cx\sin \vartheta }}x^{2}\cos \vartheta d\vartheta dx=\int_{0}^{\infty }f\left ( x \right )x^{2}\int_{-\frac{\pi }{2}}^{\frac{\pi }{2}}\frac{1}{\sqrt{c^{2}+x^{2}-2cx\sin \vartheta }}\cos \vartheta d\vartheta dx##
##\int_{-\frac{\pi }{2}}^{\frac{\pi }{2}}\frac{1}{\sqrt{c^{2}+x^{2}-2cx\sin \vartheta }}\cos \vartheta d\vartheta = \int_{-1}^{1}\frac{1}{\sqrt{c^{2}+x^{2}-2cxt }}dt## (where ##t = \sin \vartheta \cos \vartheta d\vartheta =dt##) ##=...=-\frac{2}{cx}\left ( \sqrt{c^{2}+x^{2}-2cx}-\sqrt{c^{2}+x^{2}+2cx} \right )##.
Reinserting this in the integral in x I get :
## \frac{1}{c}\int_{0}^{c}fx^{2}dx+\int_{c}^{+\infty }fxdx##
How can I link this result with ##\frac{1}{x}\int_{0}^{\infty }\frac{f}{k}\sin \left ( kw \right )dk## coming from the inverse Fourier transform?

blue_leaf77
Homework Helper
Reinserting this in the integral in x I get :
1c∫c0fx2dx+∫+∞cfxdx
How do you get that result? That doesn't seem correct to me. For instance try setting ##\vec c = 0##, using your calculation you get
$$\frac{1}{c} \int_0^{\infty} xf(x) dx$$
while using the original integral you get
$$\int_0^{\infty} \frac{f(x)}{x} dx$$

How do you get that result? That doesn't seem correct to me. For instance try setting ##\vec c = 0##, using your calculation you get
$$\frac{1}{c} \int_0^{\infty} xf(x) dx$$
while using the original integral you get
$$\int_0^{\infty} \frac{f(x)}{x} dx$$
The integral in ##\vartheta## returns $$\sqrt{c^{2}+x^{2}-2cx}-\sqrt{c^{2}+x^{2}+2cx}$$ which must be inserted in the integral in ##x## taking care to break the integral into ##0\leqslant x < c## and ##c< x < \infty ## due to the first radicand.
If ##c=0## from the original integral one gets ##\mathcal{I}=\int_{-\infty }^{+\infty }\frac{f}{\left | \vec{x} \right |}dx^{3}=2\pi *2\int_{0}^{\infty }\frac{f}{x}x^{2}dx \sim\int_{0}^{\infty }fxdx##
and from the calcuation ##\lim_{c \to 0} \left (\frac{1}{c}\int_{0}^{c}fx^{2}dx+\int_{c}^{\infty }fxdx \right )=\int_{0}^{\infty }fxdx##. So actually it looks correct to me.

blue_leaf77
Homework Helper
Ah my bad I forgot that there is another ##x^2## coming from the volume element.

Ah my bad I forgot that there is another ##x^2## coming from the volume element.
Hi blue_leaf77,

so, up to now we have proven that the result ##\mathcal{I}=\int_{-\infty }^{+\infty }\frac{f\left ( \left | \vec{x} \right | \right )}{\left | \vec{c}-\vec{x} \right |}d^{3}x = \frac{1}{c}\int_{0}^{c}fx^{2}dx+\int_{c}^{\infty }fxdx## is correct.

Still my question is : how can I recover this result from the convolution integral?
$$\mathcal{I}=\int_{-\infty }^{+\infty }\frac{f\left ( \left | \vec{x} \right | \right )}{\left | \vec{c}-\vec{x} \right |}d^{3}x = \mathcal{F}^{-1}\left \{ \frac{\hat{f}}{k^{2}} \right \}=...=\frac{1}{x}\int_{0}^{\infty }\frac{f}{k}\sin \left ( kx \right )$$