0
$\begingroup$

I'm trying to get an analytical solution of Laplace PDE with Dirichlet boundary conditions (in polar coordinates). I managed to solve it numerically with NDSolveValue and I know there is an analytical solution and I know what it is, but I would like DSolve to return it. But DSolve returns the input.

sol = 
  DSolve[
    {Laplacian[u[ρ, φ], {ρ, φ}, "Polar"] == 0,
    DirichletCondition[u[ρ, φ] == 0, 1 <= ρ <= 2 && φ == 0],
    DirichletCondition[u[ρ, φ] == 0, 1 <= ρ <= 2 && φ == π], 
    DirichletCondition[u[ρ, φ] == Sin[φ], ρ == 1 && 0 <= φ <= π], 
    DirichletCondition[u[ρ, φ] == 0., ρ == 2 && 0 <= φ <= π]}, 
    u, {ρ, 1, 2}, {φ, 0, π}];
$\endgroup$
2
$\begingroup$

Avoid using DirichletCondition in DSolve. Sometimes it works, but many times DSolve doesn't seem to understand it. You can get what you want as follows:

sol = 
  DSolve[
    {Laplacian[u[ρ, φ], {ρ, φ}, "Polar"] == 0, u[1, φ] == Sin[φ], u[2, φ] == 0},u[ρ,φ],{ρ, φ}, Assumptions-> 1<=ρ<=2];
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks a lot. Could you recommend me a book or any other resource on solving PDEs with Mathematica, please? It seems to have many nuances that is not clear for me (the difference between NDSolve and NDSolveValue for example). $\endgroup$ – Olga Aug 18 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.