Fourier Series Solution 13.5.14

a=3
b=1
f[y_]=Sin[3 Pi y/b] 
g[y_]=Sin[2 Pi y/b]

Plot[{f[y],g[y]},{y,0,b},AspectRatio->Automatic]

B[j_,y_]=Sin[j Pi y/b]

bj[j_]=-(2/b) Coth[j Pi a/b]  Integrate[ f[y] B[j,y],{y,0,b}]

b3=-(2/b) Coth[3 Pi a/b]  Integrate[ f[y] B[3,y],{y,0,b}]

tbj[j_]=(2/b) Csch[j Pi a/b]  Integrate[ g[y] B[j,y],{y,0,b}]

tb2=(2/b) Csch[2 Pi a/b]  Integrate[ g[y] B[2,y],{y,0,b}]

A[j_,x_]=bj[j] (- Tanh[j Pi a/b]  Cosh[j Pi x/b]+  Sinh[j Pi x/b])+tbj[j] Sinh[j Pi x/b]

A3[x_]=b3 (- Tanh[3 Pi a/b]  Cosh[3 Pi x/b]+  Sinh[3 Pi x/b])+tbj[3] Sinh[3 Pi x/b]

A2[x_]=bj[2] (- Tanh[2 Pi a/b]  Cosh[2 Pi x/b]+  Sinh[2 Pi x/b])+tb2 Sinh[2 Pi x/b]

u[x_,y_,k_]:=Sum[A[j,x] B[j,y],{j,1,k}]

u23[x_,y_]=A2[x] B[2,y]+A3[x] B[3,y]

Plot[{f[y],u23[0,y]},{y,0,b}]

Plot[{f[y],u23[0,y]/2},{y,0,b}]

Plot[{g[y],u23[a,y]},{y,0,b}]

Plot[{g[y],u23[a,y]/2},{y,0,b}]

Plot3D[u23[x,y],{x,0,a},{y,0,b},PlotRange->All]

Animate[Plot[u23[x,y],{y,0,b},PlotRange->{-1,1}],{x,0,a}]