4

I am working on the following problem where I keep on getting one sign different than the answer in the back of the book:

Find the steady-state distribution of temperature in the half space $H = \{ y > 0 \}$ if the boundary temperature is $\displaystyle u(x,0) = \begin{cases} 1 & \text{if}\, -1<x<0 \\ 1-x & \text{if}\,0<x<1 \\ 0 & \text{otherwise}\end{cases}$.

I.e., I need to solve the Laplace equation $u_{xx}(x,y) + u_{yy}(x,y) = 0$ with the boundary condition $\displaystyle u(x,0) = \begin{cases} 1 & \text{if}\, -1<x<0 \\ 1-x & \text{if}\,0<x<1 \\ 0 & \text{otherwise}\end{cases}$.

First, I let $\displaystyle U(\alpha,y) = \frac{1}{2 \pi} \int_{-\infty}^{\infty}u(x,y)e^{-i\alpha x}dx$, and then converted the equation to

$\begin{align} -\alpha^{2} U(\alpha,y) + U^{\prime\prime}(\alpha,y) = 0 \end{align}$

which has a general solution of the form $U(\alpha,y) = A e^{-|\alpha|y}+B e^{|\alpha|y}. $

In order to make sure that our solution is bounded as we go off to $\infty$, we let $B = 0$, and so the general solution is of the form $U(\alpha,y)=A e^{-|\alpha|y}.$

Now, $\displaystyle F(\alpha) = \frac{1}{2 \pi} \int_{-\infty}^{\infty} f(x) \exp[i \alpha x] dx$

Let $G(\alpha) = \exp(-|\alpha|y)$, then $\displaystyle u(x,y) = f * g = \frac{1}{2\pi}f * \mathcal{F}^{-1}\left[\exp(-|\alpha|y)\right]$ where $'*'$ denotes the convolution product.

Earlier, I found $\displaystyle\mathcal{F}^{-1}\left[\exp(-|\alpha|y)\right] = \frac{2y}{(x-z)^{2}+y^{2}}$, so $\displaystyle \begin{align}u(x,y) = \frac{1}{2\pi} \int_{-\infty}^{\infty}f(z) \frac{2y}{(x-z)^{2}+y^{2}}dz \\ = \frac{1}{\pi} \int_{-1}^{0}\frac{y}{(x-z)^{2}+y^{2}}dz + \frac{1}{\pi}\int_{0}^{1}(1-z)\frac{y}{(x-z)^{2}+y^{2}}dz \\ = \frac{1}{\pi} \int_{-1}^{0}\frac{y}{(x-z)^{2}+y^{2}}dz + \frac{1}{\pi}\int_{0}^{1}\frac{y}{(x-z)^{2}+y^{2}}dz -\frac{1}{\pi}\int_{0}^{1}\frac{yz}{(x-z)^{2} + y^{2}}dz\end{align}$.

Next, I took care of the first two integrals by using the trig substitution $\displaystyle \tan \theta = \frac{x-z}{y}$, $\displaystyle z=x-y\tan \theta$, $dz = -y \sec^{2}\theta d\theta$, and so the above became:

$\displaystyle \begin{align} = -\frac{1}{\pi}\int_{z=-1}^{z=0}\frac{y^{2}\sec^{2}\theta d\theta}{y^{2}\sec^{2}\theta} - \frac{1}{\pi}\int_{z=0}^{z=1}\frac{y^{2}\sec^{2}\theta d\theta}{y^{2} \sec^{2}\theta} -\frac{1}{\pi}\int_{0}^{1}\frac{yz}{(x-z)^{2} + y^{2}}dz \\ = \displaystyle -\frac{1}{\pi}\left[ \theta \right]_{\arctan\left(\frac{x+1}{y} \right)}^{ \arctan\left(\frac{x}{y} \right)}-\frac{1}{\pi}\left[ \theta \right]_{\arctan\left(\frac{x}{y} \right)}^{ \arctan\left(\frac{x-1}{y} \right)} -\frac{1}{\pi}\int_{0}^{1}\frac{yz}{(x-z)^{2} + y^{2}}dz \\ = -\frac{1}{\pi} \left[\arctan\left( \frac{x}{y}\right)- \arctan \left(\frac{x+1}{y} \right) \right] - \frac{1}{\pi}\left[\arctan \left(\frac{x-1}{y} \right) - \arctan \left(\frac{x}{y} \right) \right]\\ -\frac{1}{\pi}\int_{0}^{1}\frac{yz}{(x-z)^{2} + y^{2}}dz\end{align}$.

Then, I used the fact that the $\arctan$ function is odd, and so $\arctan\left(\frac{x-1}{y}\right) = \arctan\left(\frac{-1+x}{y} \right) = \arctan \left( \frac{-(1-x)}{y}\right) = -\arctan \left(\frac{1-x}{y} \right)$. Therefore, the above becomes:

$\displaystyle \begin{align} -\frac{1}{\pi} \left[\arctan\left( \frac{x}{y}\right)- \arctan \left(\frac{x+1}{y} \right) \right] - \frac{1}{\pi}\left[-\arctan \left(\frac{1-x}{y} \right) - \arctan \left(\frac{x}{y} \right) \right] \\ -\frac{1}{\pi}\int_{0}^{1}\frac{yz}{(x-z)^{2} + y^{2}}dz \\ = -\frac{1}{\pi} \left[\arctan\left( \frac{x}{y}\right)- \arctan \left(\frac{x+1}{y} \right) \right] - \frac{1}{\pi}\left[-\left(\arctan \left(\frac{1-x}{y} \right) + \arctan \left(\frac{x}{y} \right)\right) \right] \\ -\frac{1}{\pi}\int_{0}^{1}\frac{yz}{(x-z)^{2} + y^{2}}dz \\ = \frac{1}{\pi} \left[\arctan \left(\frac{x+1}{y} \right) - \arctan\left( \frac{x}{y}\right) \right] + \frac{1}{\pi}\left[\arctan \left(\frac{1-x}{y} \right) +\arctan \left(\frac{x}{y} \right) \right]\\ -\frac{1}{\pi}\int_{0}^{1}\frac{yz}{(x-z)^{2} + y^{2}}dz\end{align}$

For the last integral, I let $u = x-z$, $z=x-u$, $dz=-du$. Then, $\displaystyle \begin{align}-\frac{1}{\pi}\int_{z=0}^{z=1}\frac{yz}{(x-z)^{2} + y^{2}}dz = -\frac{y}{\pi}\int_{z=0}^{z=1}\frac{x-u}{u^{2} + y^{2}} (-du) \\ = -\frac{y}{\pi}\int_{z=0}^{z=1}\frac{-x+u}{u^{2}+y^{2}}du \\ = -\frac{y}{\pi}\int_{z=0}^{z=1}\frac{-x}{u^{2}+y^{2}}du - \frac{y}{\pi}\int_{z=0}^{z=1}\frac{u}{u^{2}+y^{2}}du \\ = \frac{y}{\pi}\int_{z=0}^{z=1}\frac{x}{u^{2}+y^{2}}du - \frac{y}{\pi}\int_{z=0}^{z=1}\frac{u}{u^{2}+y^{2}}du \end{align}$

As before, on the first integral, I use the trig substitution $\tan \varphi = \frac{u}{y}$, $u = y \tan \varphi$, $du = y \sec^{2}\varphi d \varphi$, and $\displaystyle \frac{y}{\pi}\int_{z=0}^{z=1}\frac{x}{u^{2}+y^{2}} =\frac{x}{\pi}\arctan\left(\frac{u}{y} \right)_{z=0}^{z=1} = \frac{x}{\pi} \arctan\left( \frac{x-z}{y}\right)_{0}^{1} = \frac{x}{\pi}\arctan \left(\frac{x-1}{y}\right) - \frac{x}{\pi}\arctan \left(\frac{x}{y} \right)= -\frac{x}{\pi}\arctan \left(\frac{1-x}{y}\right) - \frac{x}{\pi}\arctan \left(\frac{x}{y} \right)$

On the second integral, I let $w=u^{2}+y^{2}$, $\displaystyle \frac{dw}{2} = u du$, and so obtain $\displaystyle -\frac{y}{\pi}\int_{0}^{1}\frac{u}{u^{2}+y^{2}}du = -\frac{y}{2\pi}\int_{z=0}^{z=1}\frac{dw}{w} = -\frac{y}{2\pi}\left[\ln |w| \right]_{z=0}^{z=1} = -\frac{y}{2\pi} \left[\ln(u^{2}+y^{2})\right]_{z=0}^{z=1} = -\frac{y}{2\pi}\left[\ln((x-z)^{2}+y^{2})\right]_{z=0}^{z=1} = -\frac{y}{2\pi}\left[\ln((x-1)^{2}+y^{2})\right] + \frac{y}{2\pi}\left[\ln(x^2+y^2)\right] \\= \frac{y}{2\pi}\ln \left[\frac{x^2+y^2}{(x-1)^2+y^2} \right] $.

Putting these back together, we have that $\displaystyle \begin{align}u(x,y) = \frac{1}{\pi} \left[\arctan \left(\frac{x+1}{y} \right) - \arctan\left( \frac{x}{y}\right) \right] + \frac{1}{\pi}\left[\arctan \left(\frac{1-x}{y} \right) +\arctan \left(\frac{x}{y} \right) \right] -\frac{x}{\pi}\arctan \left(\frac{1-x}{y}\right) - \frac{x}{\pi}\arctan \left(\frac{x}{y} \right)+ \frac{y}{2\pi}\ln \left[\frac{x^2+y^2}{(x-1)^2+y^2} \right] \\ = \frac{1}{\pi} \left[\arctan \left(\frac{x+1}{y} \right) - \arctan\left( \frac{x}{y}\right) \right] \mathbf{+} \frac{1-x}{\pi}\left[\arctan\left(\frac{x}{y}\right) + \arctan \left( \frac{1-x}{y}\right)\right]+\frac{y}{2\pi}\ln \left[\frac{x^2+y^2}{(x-1)^2+y^2} \right] \end{align}$

According to the back of my book, the final answer I am supposed to get is $\displaystyle \frac{1}{\pi}\left[\arctan \left(\frac{x+1}{y} \right)- \arctan \left(\frac{x}{y} \right)\right] \mathbf{-} \frac{1-x}{\pi}\left[\arctan \left(\frac{x}{y}\right) + \arctan \left(\frac{1-x}{y} \right) \right] + \frac{y}{2 \pi}\ln \left[\frac{x^{2}+y^{2}}{(x-1)^{2}+y^{2}} \right]$

The book gets $- \frac{1-x}{\pi}$ and I get $ +\frac{1-x}{\pi}$. Which one of us is right: me or the book? And if it's the book, where did I go wrong with that sign?

Thank you.

  • A general observation: Whenever you have an integral of the form $I=\int_{-\infty}^\infty e^{-s|x|}f(x),dx$, you can use symmetry to eliminate the odd part and restrict to positive $x$ i.e. $$\int_{-\infty}^\infty e^{-s|x|}f(x),dx=\int_{-\infty}^\infty e^{-s|x|}\left(\frac{f(x)+f(-x)}{2}\right),dx=\int_{0}^\infty e^{-sx}\left(f(x)+f(-x)\right),dx.$$ But this last expression is the form of a Laplace transform. You can either compute it directly, or look it up in a table of such transforms. – Semiclassical Dec 15 '16 at 03:11
  • Also, in your previous problem on the Neumann problem you correctly recognized that you could use the convolution theorem to separate $F(\alpha)$ from $e^{-y|\alpha|}$. That approach is still available to you here. – Semiclassical Dec 15 '16 at 03:22
  • @Semiclassical I still can't figure out where I went wrong with that sign - Maple wasn't that helpful because it expanded a lot of things out in a weird way. I need another set of eyes, so I just edited the question to contain all the details of every single step I did. And I put out a 50 point bounty on it. Even if someone were to go through them and tell me I'm correct, I'd award them the bounty. –  Dec 19 '16 at 23:16
  • The answer with $+$ is right: try taking the limit $y\to 0$ in these two expressions. To get $u(x,0) = 1-x$ you need the sign to be a $+$. – Winther Dec 19 '16 at 23:33
  • Note, $\partial_x^2 \exp(i\alpha x) = -\alpha^2 \exp(i\alpha x)$ and not $-\alpha \exp(i\alpha x)$ as you assumed in the converted equation \begin{align} -\alpha U(\alpha,y) + U^{\prime\prime}(\alpha,y) = 0 \end{align} – Tobias Dec 19 '16 at 23:37
  • @Tobias that was a typo. When I did the problem by hand, I had $-\alpha^{2}$, so that should have no effect on whether or not the answer I posted is correct. (And I just fixed the typo) –  Dec 19 '16 at 23:39
  • @Winther if you're 100% sure and want to post that as an answer, maybe showing that limit you're talking about, I'll accept it and award you the bounty. –  Dec 19 '16 at 23:41
  • @Semiclassical this one is now figured out, but if you could take a look at http://math.stackexchange.com/questions/2065485/fourier-transform-laplace-equation-on-infinite-strip-weird-solution-involvin I'd be so thankful :) –  Dec 20 '16 at 04:37

1 Answers1

5

Whenever you have done a long calculation and get results you are not sure about it's useful to do some simple consistency checks to convince yourself. You can try to check that your solution satisfy the PDE you are solving by plugging it into the PDE (this can be a bit cumbersome if done by hand) and, often simpler, you can try to check that you recover the correct initial condition $u(x,0)$ in the limit $y\to 0^+$ (an even simpler thing to do is just to plot the solution $u(x,\epsilon)$ for some small $\epsilon$ and see if it matches $u(x,0)$). If you do both of these then you can be sure that you have the correct solution.

All we have to do to show that the answer in the book is wrong is to show that it does not agree with the given initial conditions in the limit $y\to 0^+$. Using $\lim\limits_{t\to+\infty}\arctan(t) = \frac{\pi}{2}$ we find that

$$\lim_{y\to 0^+,~0<x<1} u^{\rm (Book)}(x,y) = \frac{1}{\pi}\left(\frac{\pi}{2}-\frac{\pi}{2}\right) \color{red}{-} \frac{1-x}{\pi}\left(\frac{\pi}{2} + \frac{\pi}{2}\right) + \frac{0}{2\pi}\log\left(\frac{x^2 + 0^2}{(x-1)^2 + 0^2}\right) = \color{red}{-}(1-x)$$

which is wrong. Your solution on the other hand gives the correct answer $\color{red}{+}(1-x)$.

I also checked that your answer is correct by using mathematical software that can do symbolic calculations. See the Mathematica code below, your answer passes all the checks.

(* The solution you have found *)
u[x_, y_] =    1/\[Pi] (ArcTan[(x + 1)/y] - ArcTan[x/y])  
            + (1 - x)/\[Pi] (ArcTan[x/y] + ArcTan[(1 - x)/y]) 
            + y/(2 \[Pi]) Log[(x^2 + y^2)/((x - 1)^2 + y^2)];

(* Check that u is a solution to the Laplace equation *)
D[u[x, y], x, x] + D[u[x, y], y, y] // FullSimplify          (* = 0   *)

(* Check that we recover the IC in the limit y -> 0+ *)
Assuming[x < -1            && y > 0, Limit[u[x, y], y -> 0]] (* = 0   *)
Assuming[x > -1  && x < 0  && y > 0, Limit[u[x, y], y -> 0]] (* = 1   *)
Assuming[x >  0  && x < 1  && y > 0, Limit[u[x, y], y -> 0]] (* = 1-x *)
Assuming[x >  1            && y > 0, Limit[u[x, y], y -> 0]] (* = 0   *)
Winther
  • 25,313
  • it says I can award the bounty in 23 hours. I will do so then :) –  Dec 19 '16 at 23:53
  • @JessyCat No need to hurry for my sake. Once you put up a bounty you might as well leave it till the end to see if you get any other (better) answers. – Winther Dec 20 '16 at 14:45
  • you were so great on this. Would it be possible for you to help me out with this one as well? http://math.stackexchange.com/questions/2093726/find-bounds-on-a-solution-to-diffusion-equation-with-lower-order-terms-and-inhom –  Jan 11 '17 at 19:57
  • @JessyCat I suspect you should be able to solve this without having to solve the PDE by appealing to some maximum principle: the maximum of $u(x,t)$ on the domain $[0,T]\times [0,1]$ has to lie on the boundary (I think this holds for you PDE, but you should check this). Thus I suspect we will have $-1 \leq u(x,t) \leq 1+ 4T$ for $0\leq t \leq T$. – Winther Jan 11 '17 at 20:41
  • I'm trying to solve the same PDE but with different boundary conditions here: http://math.stackexchange.com/questions/2093840/heat-equation-with-two-lower-order-terms but I'm at a standstill with the hel[p the guy who wrote the answer is trying to give me. –  Jan 11 '17 at 22:11