function which is harmonic in the upper half plane (Poisson's formula) Problem : Find a function which is harmonic in the upper half plane $y>0$ and which on the $x$-axis takes the value $-1$ if $x<0$ and $1$ if $x>0$ ,(using Poisson's integral formulas for a Half plane) my book gives the answer $1-(2/\pi)\arctan(y/x)$ ... and although I know what the Possion's formula for the Upper half plane , I cannot see how this answer was obtained ... Any help is greatly appreciated....
 A: Recall Poisson's integral formula for the half-plane says that if $U : \mathbb{R} \to \mathbb{R}$ is piecewise continuous and bounded, then
$$
f(x,y) = \frac{y}{\pi} \int_{-\infty}^{\infty} \frac{U(t)}{(x-t)^{2} +y^{2}} dt,
$$
is harmonic in the upper half-plane and has boundary values $f(x,0) = U(x)$.
So, given your boundary values, we have
$$
U(x) = \begin{cases} -1 & x < 0 \\  1 & x > 0. \end{cases}
$$
Note, as we are integrating, we don't care what the value of $U(0)$ is.
Then, 
\begin{equation} 
f(x,y) = \frac{y}{\pi} \int_{-\infty}^{\infty} \frac{U(t) dt}{(x-t)^{2} +y^{2}} = \frac{y}{\pi} \left[ \int_{0}^{\infty} \frac{dt}{(x-t)^{2} + y^{2}} - \int_{-\infty}^{0} \frac{dt}{(x-t)^{2} + y^{2}}\right].
\end{equation}
I'll compute the first integral, and leave the second as practice. Using the change of variables $u = x-t$, we see that $d u = -dt$. So,
\begin{align*}
 \int_{0}^{\infty} \frac{dt}{(x-t)^{2} + y^{2}} &= \int_{0}^{\infty} \frac{-du}{u^{2} + y^{2}}\\
& = \frac{-1}{y} \arctan\left( \frac{x-t}{y} \right) \bigg|_{t=0}^{\infty}\\
& = \frac{1}{y} \arctan\left(\frac{t-x}{y}\right) \bigg|_{t=0}^{\infty} \\
& = \frac{1}{y} \left( \frac{\pi}{2} - \arctan \frac{x}{y} \right).
\end{align*}
Now use similar technique to perform the other integral. Don't forget the $\frac{y}{\pi}$ out in front of Poisson's formula, and be wary of negative signs.
