Consider Laplace's equation in a rectangle with length and width of a and b respectively, with following boundary conditions: All the boundaries with $x < a/2$ have Drichlet boundary condition with $U=0$ and all the boundaries with $x>a/2$ have Drichlet boundary condition with $U=V_0$ (where $V_0$ is a constant).
Is there a solution (U(x,y)) in simple form?
Is there a solution along a line in middle of rectangle (U(x,y=b/2)) in simple form?
$$ \nabla^2U=0 $$
Symmetry dictates that the solution should satisfy $u(a/2,y)=V_0/2$ for $0<y<b$. Thus, we first, consider the problem $$\Delta u=0, \: u(0,y)=u(x,0)=u(x,b)=0, \text{ and } u(a/2,y)=V_0/2.$$ This problem can be solved by separation of variables and Fourier series; we obtain $$ u(x,y) = \frac{1}{2} V_0 \sum _{n=0}^{\infty } \frac{4 \, \text{csch}\left(\frac{(2 n+1) \pi a}{2 b}\right) \sin \left(\frac{(2 n+1) \pi y}{b}\right) \sinh \left(\frac{(2 n+1) \pi x}{b}\right)}{(2 n+1) \pi }. $$ Note that it is very easy to see that $u$ is harmonic and that the 3 zero boundary conditions are satisfied. The coefficients are chosen to satisfy the remaining boundary condition.
With this part in hand, we can define $$u(x,y) = V_0-u(a-x,y)$$ for $a/2<x\leq a$. For $a=8$, $b=5$, and $V_0=2$, the solution looks like so: