# Separation of variables and generalised fourier series

## Homework Statement

if $$\nabla^2u = 0$$ in $$0 \leq x \leq \pi, 0\leq y \leq \pi,$$

boundary conditions u(0,y)=0, $$u(\pi,y)=cos^2y, u_y(x,0) = u_y(x,\pi)=0$$

## Homework Equations

I am required to show that $$u(x,y) = \frac{x}{2\pi} + \frac{cos2ysinh2x}{2sinh2\pi}$$

## The Attempt at a Solution

I have done similar questions before for example consider then following problem:

$$\nabla^2u = 0$$ in $$0 \leq x \leq a, 0\leq y \leq b,$$

but with boundary conditions:

u(0,y)=0, u(a,y)=0, u(x,0)=0, u(x,b)=f(x)

I derived the general solution to be $$u(x,y) = \sum_{n=0}^\infty D_nsin\frac{n\pix}{a}sinh\frac{n\piy}{a}$$

with $$D_n =\frac{2}{asinh\frac{n\pib}{a}}\int_{0}^{a}f(x)sin\frac{n\pix}{a}dx$$ n=1,2,3....

.....This example I understand but in the first example I am confused so far I have done the following,

let u(x,y) =X(x)Y(y)

X(x) =Acospx + Bsinpx
Y(y) =Ccoshpy + Dsinhpy
then Y'(y) =Esinhpy + Fcoshpy

B.C's ->

X(0) =A=0

$$X(\pi)= Bsinp\pi=cos^2y$$

$$Y'(0) = F=0, Y'(\pi)=0 so Esinhp\pi=0$$ this seems to tell me nothing about E I have tried also type three solutions viz.

X(x)=Acoshpx + Bsinhpx

Y(y)= Ccospy + D sinpy
Y'(y)=Ecospy-Fsinpy

X(0)=A=0
$$X(\pi)= Bsinhp\pi =cos^2(y)$$

Y'(0)=E=0

$$Y'(pi)= -Fsinppi=0$$

when p = 1,2,3

so u(x,y) = $$\sum_{p=0}^\infty F_nsinpxsinhpy$$

which is markedly different to the form of solution required, what am I doing wrong??

Last edited: