For each of these five boundary conditions we find the exact solution of Laplace's Equation and add them together to get the solution of the original problem.
The solution of Laplace's equation that satisfies the first boundary condition is \[ \sin \left(\frac{\pi}{3} x\right) \frac{\sinh \left(\frac{\pi}{3} (2-y)\right)}{\sinh\left(\frac{\pi }{3}\, 2 \right)} \]
The solution of Laplace's equation that satisfies the second boundary condition is \[ \frac{1}{2} \sin \left( \frac{2\pi}{3} x \right) \frac{\sinh \left(\frac{2\pi}{3} (2-y)\right)}{\sinh\left(\frac{2\pi }{3}\, 2 \right)} \]
The first solution, the second solution and the sum of the first and the second solutions are
The solution of Laplace's equation that satisfies the third boundary condition is \[ -\frac{2}{3} \sin \left( \frac{\pi}{2} y \right) \frac{\sinh \left(\frac{\pi}{2} (3-x)\right)}{\sinh\left(\frac{\pi}{2}\, 3 \right)} \]
The third solution, the preceding sum and the sum of the first, the second and the third solutions are
The solution of Laplace's equation that satisfies the fourth boundary condition is \[ -\frac{1}{2} \sin \left( \pi y \right) \frac{\sinh \left(\pi x \right)}{\sinh\left(\pi \, 3 \right)} \]
The fourth solution, the preceding sum and the sum of the first, the second, the third, and the fourth solutions are
The solution of Laplace's equation that satisfies the "straight edges" boundary condition is \[ \frac{1}{6} \bigl( 3 + 8 x + 9 y - 5 x y \bigr) \]
The solution to the "straight edges" boundary condition, the preceding sum, and the sum of the first, the second, the third, the fourth, and the solution to the "straight edges" boundary conditions are
Finally, the solution of the given boundary value problem for Laplace's equation is the sum of the preceding solutions: \begin{align*} \sin \left(\frac{\pi}{3} x\right) & \frac{\sinh \left(\frac{\pi}{3}(2-y)\right)}{\sinh\left(\frac{\pi }{3}\, 2 \right)} +\frac{1}{2} \sin \left( \frac{2\pi}{3} x \right) \frac{\sinh \left(\frac{2\pi}{3}(2-y)\right)}{\sinh\left(\frac{2\pi }{3}\, 2 \right)} \\ &\qquad - \frac{2}{3} \sin \left( \frac{\pi}{2} y \right) \frac{\sinh \left(\frac{\pi}{2}(3-x)\right)}{\sinh\left(\frac{\pi}{2}\, 3 \right)} -\frac{1}{2} \sin \left( \pi y \right) \frac{\sinh \left(\pi x \right)}{\sinh\left(\pi \, 3 \right)} +\frac{1}{6} \bigl( 3 + 8 x + 9 y - 5 x y \bigr) \end{align*} We close this section with a big graph of this solution: