Using appropriate conformal maps, solve the Dirichlet problem (for Laplace's equation) for the following region and boundary condition: $U=\{\text{Im}(z)>0\cup \text{Im}(z)=0\}$, with boundary conditions $f(x,0)=0$ when $\mod(x)>1$ and $f(x,0)=1$ when $\mod(x)<1$
I have not been able to make much progress: by trial and error I have found a few functions satisfying the boundary conditions, but they do not satisfy Laplace's equation. any help will be greatly appreciated!
The answer to your question is given by the Poisson integral for the upper half plane $\mathbb H$. The solution is
$$P_f(x+iy) = \frac {1}{\pi} \int_{- \infty}^{\infty} \frac{y}{(x-\xi)^2 + y^2} f(\xi)d\xi$$
for $x + i y \in \mathbb H$. The integral evaluates as
$$P_f(x+iy) = \frac {y}{\pi} \int_{- 1}^{1} \frac{1}{\xi^2 -2\xi x + x^2 + y^2}d\xi = \frac {1}{\pi}\left(\arctan\frac {1-x}{y} -\arctan\frac {-1-x}{y}\right).$$
We have $P_f(x+iy)=f(x+iy)$ if $y=0, |x| \neq 1$ (I assume $\operatorname{mod}(x)$ means $|x|)$.