# Harmonic function in square -PDE

1. Apr 21, 2016

### Dassinia

Hello, I have the solution of a problem but there's something I don't understand
1. The problem statement, all variables and given/known data
Find the harmonic function in the square {0<x<1, 0<y<1} with the boundary conditions
u(x,0)=x
u(x,1)=0
ux(0,y)=0
ux(1,y)=y²t

2. Relevant equations

3. The attempt at a solution
Part1:

We first solve the problem in the square with BC
u(x,0)=0 ; u(x,1)=0 ; ux(0,y)=0 ; ux(1,y)=y²

The solution is
u(x,y)= ∑ An cosh(nπx) sin(nπy) for n=1,2,....

Part2:
Then solving the problem in the square with BC
u1(x,0)=x ; u(x,1)=0 ; ux(0,y)=0 ; ux(1,y)=0

By separation of variable we solve
X''=-λX with X'(0)=X'(1)=0
Here the solution says that λ=(nπ)² n≥0 with eigenfunctions Xo=constant and Xn=cos(nπx) for n>0

and Y''=λY
For λ=0, we get Y''=0, solving and applying BC Yo(y)=A(y-1)
And for n=1,2,... Yn(y)=A(cosh(nπy)-cothan(nπy)*sinh(nπy))
u2(x,y)=Ao(y-1)+ΣAn (cosh(nπy)-cothan(nπy)*sinh(nπy))*cos(nπx)

What I don't understant, why in part 1, n starts at 1 and not 0 ?
And why in part 2 it starts at n=0, I understand that the sum is not defined for n=0 (coth(0)=oo) but how can I know the values that take n when i solve for the functions X and Y ?

Thanks

2. Apr 21, 2016

### LCKurtz

In part 2 you have an eigenvalue $\lambda = 0$ with eigenfunctions $X_0 = 1$ and $Y_0 = y-1$. So your expansion would be$$\sum_{n=0}^\infty c_nX_n(x)Y_n(y) = c_0(y-1) + \sum_{n=1}^\infty c_n(...)$$I didn't work through part 1 but my guess is that you don't have an eigenvalue $\lambda = 0$.

As an aside, you might find it instructive working the $Y$ equation to assume a form $Y = C\sinh(n\pi y) + D\sinh(n\pi(1-y))$ instead of the $\{\sinh ,\cosh\}$ pair.

3. Apr 21, 2016

### pasmith

The solution of $Y'' = 0$ which satisfies $Y(0) = 0$ and $Y(1) = 0$ is $Y(y) = 0$.

4. Apr 21, 2016

### Dassinia

I get it, thank you !