# Computing infinite sum

**URL:** <https://forum.dynare.org/t/computing-infinite-sum/1068>\
**Category:** Dynare help (legacy posts)\
**Created:** [7 June 2009 17:01 UTC](https://forum.dynare.org/t/computing-infinite-sum/1068 "2009-06-07T17:01:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleksandr](https://forum.dynare.org/letter_avatar_proxy/v4/letter/o/dfb087/32.png) [@oleksandr](https://forum.dynare.org/u/oleksandr)\
**Post date:** [7 June 2009 17:01 UTC](https://forum.dynare.org/t/computing-infinite-sum/1068/1 "2009-06-07T17:01:56Z")

</div>

hi,

i’m trying to compute life-time utility function using specification of infinite sum as it’s shown on p.45 of dynare userguide, namely s=u+s(+1) where s is infinite sum and u utility function.  
however, there is small trouble. the output is the following  
\*\*  
??? Error using ==\> lnsrch1  
Some element of Newton direction isn’t finite. Jacobian maybe singular or there is a problem with initial values

Error in ==\> solve1 at 126  
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Error in ==\> dynare\_solve at 110  
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian\_flag,varargin{:});

Error in ==\> steady\_ at 69  
[oo\_.steady\_state,check] = dynare\_solve([M\_.fname ‘\_static’],…  
…

thanks for help  
alex\*\*

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [9 June 2009 09:13 UTC](https://forum.dynare.org/t/computing-infinite-sum/1068/2 "2009-06-09T09:13:42Z")

</div>

Hi Alex, In your example Dynare fails in finding the steady state. Shouldn’t the flow of utilities be discounted?  
Best, Stéphane.
