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

soln=First[NDSolve[{D[u[x,y],x,x]+D[u[x,y],y,y]==NeumannValue[0,y==1],u[x,0]==0,u[0,y]==0,u[2,y]==y(1-y)},u,{x,0,2},{y,0,1}]]

ContourPlot[u[x,y]/.soln,{x,0,2},{y,0,1},FrameLabel->{"x","y"},Contours->Range[0.01,0.21,0.03],PlotTheme->"Detailed",AspectRatio->Automatic]

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

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

soln=First[NDSolve[{D[u[x,y],x,x]+D[u[x,y],y,y]==NeumannValue[0,y==1]-NeumannValue[y,x==1],u[x,0]==0,u[0,y]==0},u,{x,0,1},{y,0,1}]]

ContourPlot[u[x,y]/.soln,{x,0,1},{y,0,1},FrameLabel->{"x","y"},Contours->Range[0.05,0.45,0.05],PlotTheme->{"Detailed"}]

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

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