# Solving Poisson's equation with Dirac delta function

**URL:** <https://community.freefem.org/t/solving-poissons-equation-with-dirac-delta-function/2036>\
**Category:** General Discussion\
**Created:** [October 3, 2022, 9:46pm UTC](https://community.freefem.org/t/solving-poissons-equation-with-dirac-delta-function/2036 "2022-10-03T21:46:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenGPN](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/stephengpn/32/1358_2.png) [@StephenGPN](https://community.freefem.org/u/StephenGPN)\
**Post date:** [October 3, 2022, 9:46pm UTC](https://community.freefem.org/t/solving-poissons-equation-with-dirac-delta-function/2036/1 "2022-10-03T21:46:47Z")

</div>

Hello everybody!

I clearly understand how to solve a standard Poisson’s equation in FF++. But can anyone suggest me how to solve it having the Dirac delta function as a RHS? I’m pretty newbie with FF+ so I’d appreciate any help you can give.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [October 4, 2022, 4:38am UTC](https://community.freefem.org/t/solving-poissons-equation-with-dirac-delta-function/2036/2 "2022-10-04T04:38:13Z")

</div>

Here is an example: [FreeFem-sources/Laplace-RHS-Dirac.edp at master · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/master/examples/tutorial/Laplace-RHS-Dirac.edp).

---

<div class="post-metadata">

**Author:** ![StephenGPN](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/stephengpn/32/1358_2.png) [@StephenGPN](https://community.freefem.org/u/StephenGPN)\
**Post date:** [October 28, 2022, 2:36pm UTC](https://community.freefem.org/t/solving-poissons-equation-with-dirac-delta-function/2036/3 "2022-10-28T14:36:44Z")

</div>

Thank you for suggestion! It really helped me

---

<div class="post-metadata">

**Author:** ![ksugahar](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/ksugahar/32/2115_2.png) [@ksugahar](https://community.freefem.org/u/ksugahar)\
**Post date:** [September 10, 2023, 5:51am UTC](https://community.freefem.org/t/solving-poissons-equation-with-dirac-delta-function/2036/4 "2023-09-10T05:51:05Z")

</div>

Dirac delta funtion is generally difficult to implement in FEM. I am inerested in your problem and how you will do it.

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [September 10, 2023, 9:21pm UTC](https://community.freefem.org/t/solving-poissons-equation-with-dirac-delta-function/2036/5 "2023-09-10T21:21:03Z")

</div>

If I understand the example it is also an anser to my question about adding  
things without an integration 🙂 Apparently and correct me if wrong the b term  
in the example avoids the need to specify an “int2d” for example. For singular  
stuff, my first reaction is fourier/laplace reciprocal space. Since the weak form  
has an inherent integration step integrabe singularities I guess can take  
care of themselves if you can do it yourself. With long ranges things,  
say 1/r^n, I guess you just do the integrals but end up with non-zero b  
elements everywhere.
