Recognitions:
Gold Member

## Heat equation, Fourier cosine transform

Right, now I get $u(x,y)=\frac{1}{\pi} \{ \int_0^{\infty} \frac{\sin [p(y+a)]e^{-px}}{p}dp + \int_0^{\infty} \frac{\sin [p(a-y)]e^{-px}}{p}dp \}$.
Now I have to use the residue theorem to calculate both integrals?

Edit: Hmm probably not... If I change p by z, the integral has no residue in z=0 which probably means it has no pole in z=0? Strange.
 Recognitions: Gold Member Homework Help Science Advisor Staff Emeritus Hint: $$\int_0^k \cos kp\,dk = \frac{\sin kp}{p}$$

Recognitions:
Gold Member
 Quote by vela Hint: $$\int_0^x \cos kx\,dx = \frac{\sin kx}{k}$$
Hmm, definitely not integration by parts. I don't really know right now.
 Recognitions: Gold Member Homework Help Science Advisor Staff Emeritus I edited my hint to make it more suggestive. Use it to evaluate the integral in post #17.
 Recognitions: Gold Member Ok vela, I've been helped on that particular integral (though I still have doubts) by JJacquelin. I think the main idea was to consider the integrand as a function of k, then differentiate it with respect to k. Then integrate this result (from 0 to infinity) with respect to p (it's slightly less "ugly" than the original integral, though I'm still unsure how to perform that integral but I will ask for help). Then integrate this result with respect to k and take the constant of integration equal to 0. All in all this gives $\int _0 ^{\infty }\frac{\sin (kp)e^{-px}}{p}dp=\arctan \left ( \frac{k}{x} \right )$. Hence $u(x,y)=\frac{1}{\pi} \arctan \left ( \frac{y+a}{x} \right )+\frac{1}{\pi} \arctan \left ( \frac{a-y}{x} \right )$. I'd like to know whether your method is the same. If it's a different, I'd like to try it but I don't see how I can use your hint so far. Edit: I just see that you just replied to my last post. I'll check this out.
 Recognitions: Gold Member Homework Help Science Advisor Staff Emeritus It's slightly different but yields the same result.
 Recognitions: Gold Member $I=\int _0 ^{\infty } \int _0^{k} \cos (kp)dke^{-xp}dp=\int _0^k \int _0 ^{\infty } \cos (kp)e^{-px}dpdk$. I'm stuck on that integral with respect to p (integral by parts failed and I don't see any useful substitution so I used Wolfram Alpha for it). $I=\int _0 ^k \frac{e^{-xp}[k \sin (kp)-x \cos (kp)]}{k^2+x^2} \big | _0 ^{\infty } dk =\int _0 ^k \frac{x}{k^2+x^2}dk=\arctan \left ( \frac{k}{x} \right )$. Edit: Apparently there are at least 2 ways to tackle down that integral (the one I used wolfram alpha). A double integration by parts or a rewriting of the cos term in function of exponentials. I'll be looking forward this. Thank you very much for all vela. So the answer is post #22 is correct, right?

Recognitions:
Gold Member
Homework Help
Staff Emeritus
 Quote by fluidistic $I=\int _0 ^{\infty } \int _0^{k} \cos (kp)dke^{-xp}dp=\int _0^k \int _0 ^{\infty } \cos (kp)e^{-px}dpdk$. I'm stuck on that integral with respect to p (integral by parts failed and I don't see any useful substitution so I used Wolfram Alpha for it).
As you noted, you have to integrate by parts twice. Or just look it up in a Laplace transform table, since that's what the integral is.

 Thank you very much for all vela. So the answer is post #22 is correct, right?
Yes, it matches what I found. You can verify that at x=0, it reproduces the boundary condition and as x→∞, the solution goes to 0, as you'd expect. It doesn't do anything crazy, so it looks like a valid solution.
 Recognitions: Gold Member Instead of starting a new thread about sine/cosine Fourier transform I'll ask here. Basically I wonder why the problem statement made it clear to take a cosine Fourier transform instead of just a Fourier transform. Is it because it is obvious that the solution to the PDE, u(x,y) is an even function for any fixed x? So that a common Fourier transform would lead to a cosine Fourier transform anyway. P.S.: Just for fun, I think I've plotted the solution function (see post 9 and maybe 10 of http://www.physicsforums.com/showthread.php?t=577993).
 Recognitions: Gold Member Homework Help Science Advisor Staff Emeritus It may have been simply for pedagogical reasons.

Recognitions:
Gold Member
 Quote by vela It may have been simply for pedagogical reasons.
Hmm ok I see. The point of my question was more like "taking the Fourier transform is the same as taking the cosine Fourier transform when the function which we wish to take the transform is even". Is what is inside " " right?
 Recognitions: Gold Member Homework Help Science Advisor Staff Emeritus Yes. That's where the Fourier cosine transform comes from, right? You plug the function into the regular Fourier transform integral and then simplify it using the fact the function is even.

Recognitions:
Gold Member
 Quote by vela Yes. That's where the Fourier cosine transform comes from, right? You plug the function into the regular Fourier transform integral and then simplify it using the fact the function is even.
Thank you, I wasn't 100% sure. That's exactly what I wanted to know.