# Poisson Solver FFT

1. Nov 8, 2009

### rustpanjguh

Hi,

As part of my homework, I wrote a MatLab code to solve a Poisson equation
Uxx +Uyy = F(x,y)

with periodic boundary condition in the Y direction and Neumann boundary condition in the X direction. I used the finite difference method in the X direction and FFT in the Y direction to numerically solve for Uxx and Uyy. Now the teacher is asking to use our numerical solver and test it for interesting functions.

My code solves the equations with above conditions and with smooth U with order two accuracy, and now the teacher wants us to run our code for interesting cases, like non-periodic functions or non-smooth functions.
Here are my questions:

1. I need help coming up with a periodic (in y) non-smooth function so I can test my code. Can someone help me find such functions? (MatLab implementation of function would be great)

2. When I find such function and run my code using it, then what should I expect? Should I expect that a 1st order approximation, or total explosion of solution?

3. As I mentioned For a non periodic function I got a 1st order error rate. Is that what I should expect?