# Homework Help: Heat equation, Fourier cosine transform

1. Feb 9, 2012

### fluidistic

1. The problem statement, all variables and given/known data
Problem 8-17 from Mathew's and Walker's book:
Use a cosine transform with respect to y to find the steady-state temperature distribution in a semi-infinite solid $x>0$ when the temperature on the surface $x=0$ is unity for $-a<y<a$ and zero outside this strip.

2. Relevant equations
Heat equation: $\frac{\partial u}{ \partial t}+k \nabla u =0$.
Cosine Fourier transform: $f(x)=\frac {1} {\pi} \int _0 ^{\infty } g(y) \cos (xy )dy$.

3. The attempt at a solution
I've made a sketch of the situation, I don't think I have any problem figuring out the situation.
Now I'm stuck. Should I perform "brainlessly" a cosine transform to the heat equation as it is, or should I set $\frac{\partial u }{\partial t}=0$ since it's a steady state distribution of temperature? This would make $\nabla u =0 \Rightarrow \frac{\partial u }{\partial x }+\frac{\partial u }{\partial y }=0$ (Laplace equation). Should I apply now the cosine transform?

2. Feb 9, 2012

### vela

Staff Emeritus
That should be $\nabla^2 u$. You need to find the general solution first.

3. Feb 9, 2012

### fluidistic

Oops right, true.
Do you mean I should solve the heat equation with say for example separation of variables? If I get the general solution, then why would I need to perform a cosine tranform?

4. Feb 9, 2012

### vela

Staff Emeritus
Sorry, you're right. You want to set $\partial u/\partial t=0$ and then Fourier transform the equation.

5. Feb 9, 2012

### fluidistic

Ok I've checked another source for the definition of the cosine transform, I'll use it instead. I'm having a doubt however.
u depends on x,y and t.
The cosine transform with respect to y: $\mathbb{F_c}(u)=U_c (p,t)=\int _0 ^{\infty} u \cos (py)dy$. I have no problem with this. I notice that in my exercise the range of y is from negative to positive infinity rather than 0 to positive infinity; but it doesn't matter, I can solve it from 0 to infinity and then use the fact that the function u is symmetric with respect to the x axis, I believe.
$\mathbb{F_c} \left ( \frac{\partial u }{\partial x} \right )=\int _0 ^{\infty} \frac{\partial u }{\partial x } \cos (py)dy$. In order to solve this integral I know I can use integral by parts but I'm not 100% sure that it's worth $p U_s(p,t)-u(0,y,t)$ (where $U_s$ is the sine transform) because the derivative of u is with respect to x while the integration is with respect to y. This would also mean that $\mathbb{F_c} \left ( \frac{\partial ^2 u }{\partial x^2} \right )=-p^2U_c (p,t)-\frac{\partial u }{\partial x}(0,y,t)$.
Is this ok so far?

6. Feb 10, 2012

### vela

Staff Emeritus
It's actually only a function of x and y because you're looking for the steady-state solution.

That's right. You can use the cosine transform because the boundary condition is an even function of y.

You can't integrate by parts like that because the derivative is with respect to x, but the integration is with respect to y. What you can do is switch the order of integration and differentiation, so you'll end up with
$$\mathbb{F_c}\left[\frac{\partial^2 u(x, y)}{\partial x^2}\right] = \frac{\partial^2}{\partial x^2} \mathbb{F_c}[u(x,y)] = \frac{\partial^2}{\partial x^2} u(x,p)$$

7. Feb 10, 2012

### fluidistic

Ok thank you very much vela.
I have a little problem with the cosine transform of $\frac{\partial ^2 u }{\partial y^2}$. Is it $-p^2 U_c (p,x)-\frac{\partial u }{\partial y} \big | _{y=0}$? If so, I don't know how to evaluate the last term.
Edit: $\mathbb{F_c} \left ( \frac{\partial u (x,y)}{\partial y} \right )=[u(x,y)\cos (py)]^{y=\infty}_{y=0}+p\int _0^{\infty } u(x,y)\sin (py)dy=-u(x,0)+p U_s (p,x)$. Not sure how to evaluate $u(x,0)$ either here. I only know $u(0,0)$ which is worth 1, but no more than this, on the x-axis.

Last edited: Feb 10, 2012
8. Feb 11, 2012

### vela

Staff Emeritus
Yes, it is. From the symmetry of the physical problem, we know u(x,y) will be symmetric about the x-axis. What does this imply about the derivative at y=0?

This shouldn't matter because $\frac{\partial u (x,y)}{\partial y}$ isn't in the problem.

9. Feb 11, 2012

### fluidistic

Ok thank you vela!
This means that $\frac{\partial u }{\partial y} \big | _{y=0}=0$.
Thus the PDE is equivalent to $\frac{\partial ^2 U_c (p,x)}{\partial x^2}-p^2 U_c (p,x)=0$. Since $p>0$, $U_c(p,x)=Ae^{px}+Be^{-px}$. Now I think it's time to take the inverse cosine transform.

10. Feb 11, 2012

### fluidistic

So this gives me $\mathbb{F} _c ^{-1} [U_c(p,x)]=u(x,y)=\frac{2}{\pi} \int _0 ^{\infty} U_c (p,x) \cos (py)dp$. Is this ok?
$U_c(p,x)=Ae^{px}+Be^{-px}$. So that $u(x,y)=\frac{2}{\pi} \int _0 ^{\infty } (Ae^{px}+Be^{-px} ) \cos (py)dp$. This doesn't look a correct answer to me though, let alone how to simplify it and calculate A and B from the boundary conditions.

11. Feb 12, 2012

### vela

Staff Emeritus
Remember that the "constants" can still depend on p. That is,
$$U_c(x, p) = A(p)e^{px} + B(p)e^{-px}$$ You want a bounded solution as $x \to \infty$, so you can toss the first term.

Before you take the inverse transform, you want to incorporate the boundary condition for x=0 by doing essentially what was done on pages 242 and 243 in Mathews and Walker to determine B(p).

12. Feb 12, 2012

### fluidistic

I am a bit confused here. I want u(x,y) to be bounded when x tends to infinity. I guess you mean that this also imply that A(p) must be worth 0 in wich case it's something I have to digest.

I get $U_c(p,0)=B(p)=\int _0^{\infty} u(0,y) \cos (py)dp$.
I think something is wrong here.

13. Feb 12, 2012

### vela

Staff Emeritus
Why? That's correct. You were given what u(0,y) is equal to.

EDIT: Oops, missed that you were integrating with respect to p.

Last edited: Feb 13, 2012
14. Feb 13, 2012

### fluidistic

True but it's not single valued. It depends on y actually so this makes B depend on y too. Furthermore for $-a<y<a$, $B(p)=\int _0^{\infty } \cos (py ) dp$ which isn't definied.
I think that if the integration was with respect to y rather than p, I would have less problems.
If I integrate with respect to y rather than p, I get $B(p)=\frac{\sin (pa)}{p}$ so that $U_c(p,x)=\frac{e^{-px}\sin (pa)}{p}$. Now time to take the inverse transform.

15. Feb 13, 2012

### vela

Staff Emeritus
I didn't notice you were integrating with respect to p. Your latter result is correct. You're just setting x=0 in
$$U_c(x,p) = \int_0^\infty u(x,y)\cos py\,dy = B(p)e^{-px}.$$

16. Feb 13, 2012

### fluidistic

No problem vela, so far you've been of so much help for me...
I'm stuck at solving the integral when taking the inverse transform. $\mathbb{F_c}^{-1} [U_c (p,x)]=u(x,y)=\frac{2}{\pi} \int _0^{\infty} \frac{e^{-px}\sin (pa) \cos (py) dp}{p}$. This would be the answer to the problem but I'm hoping to simplify this result. Not sure how to tackle that integral.

17. Feb 13, 2012

### vela

Staff Emeritus
Use a trig identity on $2\sin (pa)\cos (py)$. You'll end up with two integrals of the form
$$I=\int_0^\infty \frac{\sin kp}{p} e^{-px}\,dp,$$ where k is a constant, which is the Laplace transform of (sin kp)/p.

18. Feb 13, 2012

### fluidistic

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.

Last edited: Feb 13, 2012
19. Feb 13, 2012

### vela

Staff Emeritus
Hint:
$$\int_0^k \cos kp\,dk = \frac{\sin kp}{p}$$

Last edited: Feb 15, 2012
20. Feb 13, 2012

### fluidistic

Hmm, definitely not integration by parts. I don't really know right now.

21. Feb 15, 2012

### vela

Staff Emeritus
I edited my hint to make it more suggestive. Use it to evaluate the integral in post #17.

22. Feb 15, 2012

### fluidistic

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.

23. Feb 15, 2012

### vela

Staff Emeritus
It's slightly different but yields the same result.

24. Feb 15, 2012

### 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). $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?

Last edited: Feb 15, 2012
25. Feb 15, 2012

### vela

Staff Emeritus
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.

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.