# Solve Laplace equation: how to make the recursion stop?

**URL:** <https://community.wolfram.com/t/solve-laplace-equation-how-to-make-the-recursion-stop/16051>\
**Category:** Questions\
**Tags:** physics, equation-solving\
**Created:** [May 22, 2020, 6:39am UTC](https://community.wolfram.com/t/solve-laplace-equation-how-to-make-the-recursion-stop/16051 "2020-05-22T06:39:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![llllliyanliu](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@llllliyanliu](https://community.wolfram.com/u/llllliyanliu)\
**Post date:** [May 22, 2020, 6:39am UTC](https://community.wolfram.com/t/solve-laplace-equation-how-to-make-the-recursion-stop/16051/1 "2020-05-22T06:39:43Z")

</div>

Hello,

I’m implementing relaxation method to solve Laplaca equation. When the result is convergent enough, I want the recurrsion stops. But I used Nestlist, and cannot see how to make it stop by itself. I test the error until the error is smaller than 10^(-5), then stop it. But I want the algorithm do it by itself.  
The algorithm is as following:

 ![relaxation.png](https://global.discourse-cdn.com/wolfram/original/3X/1/c/1c57c99ce564b5610c5bcda711f9e4af7650fee5.png)

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/6db8cbb7-54b3-45a3-9eb0-5473de15d530)

 ![relaxation1.png](https://global.discourse-cdn.com/wolfram/original/3X/b/4/b4a5a96a2d8e17e168db9e3e4e53373d4d67445c.png)

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [May 22, 2020, 10:01am UTC](https://community.wolfram.com/t/solve-laplace-equation-how-to-make-the-recursion-stop/16051/2 "2020-05-22T10:01:20Z")

</div>

Have you tried `NestWhileList`?

---

<div class="post-metadata">

**Author:** ![llllliyanliu](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@llllliyanliu](https://community.wolfram.com/u/llllliyanliu)\
**Post date:** [May 22, 2020, 12:25pm UTC](https://community.wolfram.com/t/solve-laplace-equation-how-to-make-the-recursion-stop/16051/3 "2020-05-22T12:25:05Z")

</div>

I didn’t know that, I’ll try now. Thanks.
