Laplace equation in a square with mixed boundary conditions

The length of the side of the square is a. The boundary conditions are the following:
(1) the left edge is kept at temperature T=C2
(2) the bottom edge is kept at temperature T=C1
(3) the top and right edges are perfectly insulated, that is $$\dfrac{\partial T}{\partial x}=0,\dfrac{\partial T}{\partial y}=0$$
Solve for $$T(x,y)$$ in steady state.
The situation is described by the Laplace equation. It would be a bit difficult to directly solve for this problem since this is a mixed BC problem. I want to break it down into several (for example, two) problems that are easier to solve. So far I don't have any idea how to break it down, since the mixed BC makes it difficult to break down the problem. Does anybody have any suggestion?

Thanks.
 PhysOrg.com science news on PhysOrg.com >> Ants and carnivorous plants conspire for mutualistic feeding>> Forecast for Titan: Wild weather could be ahead>> Researchers stitch defects into the world's thinnest semiconductor
 What is the value of T(0,0) ( at the left bottom corner) ? At the left edge T(0,y)=C2 At the bottom edge T(x,0)=C1 Hence T(0,0)=C2=C1 ?

 Quote by JJacquelin What is the value of T(0,0) ( at the left bottom corner) ? At the left edge T(0,y)=C2 At the bottom edge T(x,0)=C1 Hence T(0,0)=C2=C1 ?
Not really. IMHO, the value on the corner is not particularly important. And, C1 is not equal to C2.

Laplace equation in a square with mixed boundary conditions

Of course, I supposed that C1 and C2 are not equal.
My remark was about the wording of conditions (1) and (2) : These conditions are NOT for all the edge length : The corner must be excluded.
It is important to see that the solution will include the Heaviside step function.
Isn't it ?

 Quote by JJacquelin It is important to see that the solution will include the Heaviside step function. Isn't it ?
Certainly
$$T(x,y) = \left\{ \begin{array}{r@{\quad}l} C_2 & x < y \\ C_1 & x > y \\ \end{array}\right.$$
is a weak solution of Laplace's equation which satisfies the boundary conditions.
 Recognitions: Gold Member Is there a reason why you can't use separation of variables?

 Quote by Chestermiller Is there a reason why you can't use separation of variables?
Actually, no: if $F(x,y)$ is the solution of Laplace's equation in a unit square subject to $F(x,0) = 1$, $F(0,y) = 0$, $\partial F/\partial x(1,y) = 0$ and $\partial F/\partial y(x,1) = 0$ then the solution of the OP's problem is
$$T(x,y) = C_1F(x/a,y/a) + C_2F(y/a,x/a)$$.

And to find $F(x,y)$, let $k_n = \frac{2n + 1}{2}\pi$ for $n \geq 0$ and use the eigenfunctions
$$f_n(x,y) = \sin(k_n x)Y_n(y)$$
where
$$Y_n(y) = \cosh(k_ny) - \tanh(k_n)\sinh(k_ny).$$

 Quote by pasmith $$Y_n(y) = \cosh(k_ny) - \tanh(k_n)\sinh(k_ny).$$
I think you can write the y-component solution as $$\cosh(k_n(a-y))$$
 I think my real problem is: when the boundary condition on the bottom edge is T(x,0)=f(x), BC on left edge is T(0,y)=0, BC on right and top edges are perfect insulation (suppose we don't care about the values on the four corners), is it correct to obtain the Fourier coefficients using $$b_n\cosh(k_n(a))=\int_0^a\sin(k_nx)f(x)dx$$, with $$k_n=(n+0.5)\pi$$. The thing that bothers me is that the integration interval is not a multiple of the period of the basis function $$\sin(k_nx)$$.

 Quote by samuelandjw I think you can write the y-component solution as $$\cosh(k_n(a-y))$$
But mine has the advantage that $Y(0) = 1$ (although I could write it as $\cosh(k_n(y-a))/\cosh(k_na)$)

 Quote by samuelandjw I think my real problem is: when the boundary condition on the bottom edge is T(x,0)=f(x), BC on left edge is T(0,y)=0, BC on right and top edges are perfect insulation (suppose we don't care about the values on the four corners), is it correct to obtain the Fourier coefficients using $$b_n\cosh(k_n(a))=\int_0^a\sin(k_nx)f(x)dx$$ with $$k_n=(n+0.5)\pi$$
If you're integrating between 0 and a then $k_n = (n+0.5)\pi/a$ and you're missing a factor of $\int_0^a \sin^2(k_nx)\,\mathrm{d}x$ on the left hand side of the first equation, but yes.

Integrating
$$I = \int_0^a \sin(k_nx)\sin(k_mx)\,\mathrm{d}x$$
by parts twice (differentiating the $k_n$ part each time) gives
$$I = \frac{k_n^2}{k_m^2}I$$
so that $I = 0$ unless $n = m$, when
$$\int_0^a \sin^2(k_nx)\,\mathrm{d}x = \int_0^a \frac12(1 - \cos(2k_nx))\,\mathrm{d}x = \left[\frac12 x - \frac{1}{4k_n} \sin(2k_nx)\right]_0^a = \frac{a}{2}$$
since $2k_n = (2n+1)\pi/a$.
 Just a general point: if $X_k'' = -k^2X_k$, $k > 0$, then $$\int_a^b X''_k X_l\,\mathrm{d}x = [X_lX_k']_a^b - \int_a^b X_k'X_l'\,\mathrm{d}x = [X_lX_k' - X_kX_l']_a^b + \int_a^b X_kX_l''\,\mathrm{d}x$$ so that $$(l^2 - k^2) \int_a^b X_kX_l\,\mathrm{d}x = [X_lX_k' - X_kX_l']_a^b$$ so if $k \neq k$ $$\int_a^b X_kX_l\,\mathrm{d}x = \frac{[X_lX_k' - X_kX_l']_a^b}{(l^2 - k^2)}$$ Now if we require that, for all $k$, $AX_k(a) + BX_k'(a) = 0$ with $A^2 + B^2 \neq 0$ and $CX_k(b) + DX_k'(b) = 0$ with $C^2 + D^2 \neq 0$ then $X_lX_k' - X_kX_l'$ vanishes at $x = a$ and $x = b$ and the functions $X_k$ will be orthogonal with respect to the inner product $$\int_a^b f(x)g(x)\,\mathrm{d}x.$$ Calculating the determinant of a 2x2 matrix shows that if $X_k \neq 0$ then $k$ must be chosen so that $$(AC + BDk^2)\sin(k(b-a)) + (AD + BC)k\cos(k(b-a)) = 0$$

Recognitions:
Gold Member
 Quote by samuelandjw The length of the side of the square is a. The boundary conditions are the following: (1) the left edge is kept at temperature T=C2 (2) the bottom edge is kept at temperature T=C1 (3) the top and right edges are perfectly insulated, that is $$\dfrac{\partial T}{\partial x}=0,\dfrac{\partial T}{\partial y}=0$$ Solve for $$T(x,y)$$ in steady state. The situation is described by the Laplace equation. It would be a bit difficult to directly solve for this problem since this is a mixed BC problem. I want to break it down into several (for example, two) problems that are easier to solve. So far I don't have any idea how to break it down, since the mixed BC makes it difficult to break down the problem. Does anybody have any suggestion? Thanks.
The function u(x,y)= C2 for all x and y satisfies U(0)= C2 and $u_x(1)+ u_y(1)= 0+ 0= 0$. Let v= T- u Then $nabla v= \nabla T= 0$ while v(0, y)= C2- C2= 0 and $v_x(1, y)= T_x(1, y)= 0[/tex]. So let [itex]v(x,y)= \sum_{n=0}^\infty A_n(y) sin(n\pi x/a)$. The differential equation reduces to $\sum_{n=0}^\infty A''_n sin(n\pi x/a)- (n\pi/a)\sum_{n= 0}^\infty sin(n\pi x/a)= 0$ which is the same as $\sum_{n=0}^\infty (A''_n- (n\pi/a)Asin(n\pi x/a)$ which is equivalent to $A''_n- (n\pi/a)A= 0$ for all n. Once you have found the Fourier series for v, add u= C2 to get T(x, y).
 Recognitions: Gold Member Here are some additional thoughts on this problem: For the specified boundary conditions, $$T(x,y)= \frac{C1+C2}{2}-\frac{(C1-C2)}{2}G(x,y)$$ with G(x,0) = -1 G(0,y) = +1 G(x,2a) = -1 G(2a,y) = +1 The second pair of boundary conditions, by symmetry, automatically guarantee that the zero flux boundary conditions at x = a and y = a are satisfied. In addition to these conditions, the value of the function G is zero along all the diagonals: G(ζ,ζ) = 0 G(ζ,-ζ) = 0 Chet