4

V 12. on windows.

I have a question about using Mathematica's GreenFunction to verify known result for Green function for Laplacian in 2D. (I also have question for 3D, but may be I'll post that in separate question)

In 2D, Green function is given in many places. Here is a screen shot from one book

Mathematica graphics

And https://en.wikipedia.org/

I was trying to see if I can get same result using Mathematica's Green function.

At first I tried this (below, I used y1,y2 in place of $\zeta,\eta$ since easier to type

ClearAll[u, x, y, y1, y2];
GreenFunction[Laplacian[u[x, y], {x, y}], 
 u[x, y], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, {y1,y2}]

But Mathematica did not like it because of {y, -Infinity, Infinity}. So I found this below works

GreenFunction[Laplacian[u[x, y], {x, y}], u[x, y], {x, -Infinity, Infinity}, y, {y1, y2}]

Mathematica graphics

But this does not look like the known result $-\frac{1}{2 \pi} \ln r$ where $r=\sqrt{ (x-y_1)^2 + (y-y_2)^2}$.

So I am not sure if the second try above is still not correct, or if there is another syntax I should try. How to tell it one wants the Green function for the whole space in 2D then?

Question is: How to use GreenFunction to obtain same result shown in book for 2D?

Nasser
  • 143,286
  • 11
  • 154
  • 359

1 Answers1

5

As I mentioned in a comment, the following (almost) reproduces the textbook result:

GreenFunction[-Laplacian[u[x, y], {x, y}], u[x, y], {x, y} ∈ FullRegion[2], {ξ, η}]
   -Log[(y - η)^2 + (x - ξ)^2]/(4 π)

where the identity $\log(\sqrt{x})=\frac12\log x$ was automatically applied. (This specific example is also in the docs.)

Similarly, for the 2D Helmholtz operator,

GreenFunction[-(Laplacian[u[x, y], {x, y}] + u[x, y]), u[x, y],
              {x, y} ∈ FullRegion[2], {ξ, η}]
   -1/4 I HankelH2[0, Sqrt[(y - η)^2 + (x - ξ)^2]]

For three dimensions the Poisson equation evaluates,

GreenFunction[-Laplacian[u[x, y, z], {x, y, z}], u[x, y, z],
              {x, y, z} ∈ FullRegion[3], {ξ, η, ζ}]
   1/(4 π Sqrt[(z - ζ)^2 + (y - η)^2 + (x - ξ)^2])

but the 3D Helmholtz operator does not (perhaps GreenFunction[] has not yet been taught how to evaluate it).

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574