# Dealing with removable singularities in cylindrical coordinates

**URL:** <https://fenicsproject.discourse.group/t/dealing-with-removable-singularities-in-cylindrical-coordinates/144>\
**Category:** variational formulation\
**Created:** [February 6, 2019, 2:52pm UTC](https://fenicsproject.discourse.group/t/dealing-with-removable-singularities-in-cylindrical-coordinates/144 "2019-02-06T14:52:04Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Xuefeng\_LIU](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/xuefeng_liu/32/660_2.png) [@Xuefeng\_LIU](https://fenicsproject.discourse.group/u/Xuefeng_LIU)\
**Post date:** [November 30, 2019, 2:58pm UTC](https://fenicsproject.discourse.group/t/dealing-with-removable-singularities-in-cylindrical-coordinates/144/7 "2019-11-30T14:58:06Z")

</div>

The singularity seems to be not properly processed in FEniCS.

Let us try the integral : Integral[1/Sqrt[x _x+y_ y], {x,0,1},{y,0,1}] = 1.76275  
Below is the dolfin code:

```
local_mesh = UnitSquareMesh(10,10)

singular_f1 = Expression("1/sqrt(x[0]*x[0]+x[1]*x[1])", degree = 8)
print( assemble( singular_f1*dx(local_mesh)) )

singular_f2 = Expression("sqrt(x[0]*x[0]+x[1]*x[1])", degree = 8)
print( assemble( Constant(1.0)/singular_f2*dx(local_mesh)) )

```

The first way to do integral gives: nan  
The second way gives raw result: 1.75835412.

Is there any idea to the integrally correctly.

* * *

**Update:** The problem comes to me when I want to define an extended FEM with a base function of singularity. For example, for the Poisson equation over an L-shaped domain. The domain has re-entry corner at (0,0).

```
V = {CG FEM} + { phi }
phi = r^{2/3} sin(2/3 \theta) * CuttingFunction
```

---

_[View the full topic](https://fenicsproject.discourse.group/t/dealing-with-removable-singularities-in-cylindrical-coordinates/144)._
