I am trying to solve Laplace's equation using ApproxFun with the following 
boundary conditions

{
\phi(x, 0) &= 0 \\
\phi(x, 1) &= \frac{1}{(1 + x)^2 + 1} \\
\phi(0, y) &= \frac{y}{1 + y^2} \\
\phi(1, y) &= \frac{y}{4 + y^2}
\end{aligned}
}

I'm not clear how to express these. I've tried

{
d = Interval()^2

f1 = Fun((x,y)->0)
f2 = Fun((x,y)->1 / ((1 + x)^2 + 1))
f3 = Fun((x,y)->y / (1 + y^2))
f4 = Fun((x,y)->y / (4 + y^2))

u = [dirichlet(d),lap(d)]\[f1,f2,f3,f4]
}

and

{
u = [dirichlet(d),lap(d)]\[zeros(1),f2,f3,f4]
}

but in both cases I get errors (which I can attach).

I can see ldirichlet and rdirichlet exist but I need to specify the top and 
bottom as well.

Reply via email to