SetDirectory[$HomeDirectory<>"/Documents/handouts/math467/LaplaceNeumann"]

Example 01

u[n_Integer][x_,y_]:=(-4/((π^3)))Sum[(1/((((2k-1))^3)Sinh[(2k-1)π]))Cosh[(2k-1)π x]Cos[(2k-1)π y],{k,1,n,1}]

DensityPlot[u[25][x,y],{x,0,1},{y,0,1},FrameLabel->{"x","y"},PlotTheme->{"Detailed"}]

Export["example01.pdf",%,"PDF"]

Export["example01.eps",%%,"EPS"]

Example 02

u[n_Integer][r_,θ_]:=-2Sum[((((-1))^k)(r^k)/(k^2))Sin[k θ],{k,1,n,1}]

DensityPlot[u[25][Sqrt[(x^2)+(y^2)],ArcTan[x,y]],{x,-1,1},{y,-1,1},FrameLabel->{"x","y"},PlotTheme->{"Detailed"},RegionFunction->Function[{x,y},(x^2)+(y^2)≤1],PlotPoints->50]

Export["example02.pdf",%,"PDF"]

Export["example02.eps",%%,"EPS"]