Did I correctly derive this recurrence equation formula

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I started with the recurrence equation $spacespace x_n+1=ax_n+b space space$ and turned it into the formula at the bottom to allow us to find the value of any nth term in the form $space space x_n=f(n)$



Here is how I derived my formula for $f(n)$:



$$x_0=x$$
$$x_1=ax+b$$
$$x_2=a^2x+ab+b$$
$$x_3=a^3x+a^2b+ab+b$$
$$x_n=a^nx+a^n-1b+a^n-2b...a^2b+ab+b$$
Refer to the geometric progression equation:
$$sum_k=1^na^k-1b=fracb(1-a^n)1-a$$
$$x_n=a^nx+fraca^nb-ba-1$$
$$x_n=fraca^n+1x-a^nx+a^nb-ba-1$$
$$x_n=fraca^n(ax-x+b)-ba-1$$
Final simplification and substitution of $x_0=x$
$$x_n=fraca^n((a-1)x_0+b)-ba-1$$
Side Note: This idea originally came from problems I encountered in the Collatz Conjecture, eventually leading to create a general formula. Could this potentially be helpful to have other than my own personal use?







share|cite|improve this question






















  • Your question in your post does not agree with the title.
    – xbh
    Aug 16 at 6:30










  • Yes, this is right. It is called an arithmetico-geometric sequence. But this is an elementary and well-know result, nothing new.
    – Yves Daoust
    Aug 16 at 6:38















up vote
0
down vote

favorite












I started with the recurrence equation $spacespace x_n+1=ax_n+b space space$ and turned it into the formula at the bottom to allow us to find the value of any nth term in the form $space space x_n=f(n)$



Here is how I derived my formula for $f(n)$:



$$x_0=x$$
$$x_1=ax+b$$
$$x_2=a^2x+ab+b$$
$$x_3=a^3x+a^2b+ab+b$$
$$x_n=a^nx+a^n-1b+a^n-2b...a^2b+ab+b$$
Refer to the geometric progression equation:
$$sum_k=1^na^k-1b=fracb(1-a^n)1-a$$
$$x_n=a^nx+fraca^nb-ba-1$$
$$x_n=fraca^n+1x-a^nx+a^nb-ba-1$$
$$x_n=fraca^n(ax-x+b)-ba-1$$
Final simplification and substitution of $x_0=x$
$$x_n=fraca^n((a-1)x_0+b)-ba-1$$
Side Note: This idea originally came from problems I encountered in the Collatz Conjecture, eventually leading to create a general formula. Could this potentially be helpful to have other than my own personal use?







share|cite|improve this question






















  • Your question in your post does not agree with the title.
    – xbh
    Aug 16 at 6:30










  • Yes, this is right. It is called an arithmetico-geometric sequence. But this is an elementary and well-know result, nothing new.
    – Yves Daoust
    Aug 16 at 6:38













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I started with the recurrence equation $spacespace x_n+1=ax_n+b space space$ and turned it into the formula at the bottom to allow us to find the value of any nth term in the form $space space x_n=f(n)$



Here is how I derived my formula for $f(n)$:



$$x_0=x$$
$$x_1=ax+b$$
$$x_2=a^2x+ab+b$$
$$x_3=a^3x+a^2b+ab+b$$
$$x_n=a^nx+a^n-1b+a^n-2b...a^2b+ab+b$$
Refer to the geometric progression equation:
$$sum_k=1^na^k-1b=fracb(1-a^n)1-a$$
$$x_n=a^nx+fraca^nb-ba-1$$
$$x_n=fraca^n+1x-a^nx+a^nb-ba-1$$
$$x_n=fraca^n(ax-x+b)-ba-1$$
Final simplification and substitution of $x_0=x$
$$x_n=fraca^n((a-1)x_0+b)-ba-1$$
Side Note: This idea originally came from problems I encountered in the Collatz Conjecture, eventually leading to create a general formula. Could this potentially be helpful to have other than my own personal use?







share|cite|improve this question














I started with the recurrence equation $spacespace x_n+1=ax_n+b space space$ and turned it into the formula at the bottom to allow us to find the value of any nth term in the form $space space x_n=f(n)$



Here is how I derived my formula for $f(n)$:



$$x_0=x$$
$$x_1=ax+b$$
$$x_2=a^2x+ab+b$$
$$x_3=a^3x+a^2b+ab+b$$
$$x_n=a^nx+a^n-1b+a^n-2b...a^2b+ab+b$$
Refer to the geometric progression equation:
$$sum_k=1^na^k-1b=fracb(1-a^n)1-a$$
$$x_n=a^nx+fraca^nb-ba-1$$
$$x_n=fraca^n+1x-a^nx+a^nb-ba-1$$
$$x_n=fraca^n(ax-x+b)-ba-1$$
Final simplification and substitution of $x_0=x$
$$x_n=fraca^n((a-1)x_0+b)-ba-1$$
Side Note: This idea originally came from problems I encountered in the Collatz Conjecture, eventually leading to create a general formula. Could this potentially be helpful to have other than my own personal use?









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Aug 16 at 6:32

























asked Aug 16 at 6:21









Alex Maslach

233




233











  • Your question in your post does not agree with the title.
    – xbh
    Aug 16 at 6:30










  • Yes, this is right. It is called an arithmetico-geometric sequence. But this is an elementary and well-know result, nothing new.
    – Yves Daoust
    Aug 16 at 6:38

















  • Your question in your post does not agree with the title.
    – xbh
    Aug 16 at 6:30










  • Yes, this is right. It is called an arithmetico-geometric sequence. But this is an elementary and well-know result, nothing new.
    – Yves Daoust
    Aug 16 at 6:38
















Your question in your post does not agree with the title.
– xbh
Aug 16 at 6:30




Your question in your post does not agree with the title.
– xbh
Aug 16 at 6:30












Yes, this is right. It is called an arithmetico-geometric sequence. But this is an elementary and well-know result, nothing new.
– Yves Daoust
Aug 16 at 6:38





Yes, this is right. It is called an arithmetico-geometric sequence. But this is an elementary and well-know result, nothing new.
– Yves Daoust
Aug 16 at 6:38











2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










You can make it easier. Considering $$ x_n+1=a,x_n+b $$ let $x_n=y_n+c$ to make
$$y_n+1+c=a, y_n+ac+b$$ that is to say
$$y_n+1=a, y_n+(ac+b-c)$$ Choose $c$ such that $ac+b-c=0$ and you are back to the classical geometric sequence. Solve it for $y_n$ and go back to $x_n$.






share|cite|improve this answer



























    up vote
    0
    down vote













    This is a linear recurrence with constant coefficients and it can also be solved similarly to a linear ODE.



    The homogeneous equation is



    $$x_n+1=ax_n$$ and obviously has the general solution



    $$x_n=ca^n.$$



    Now a particular solution of the non-homegeneous equation



    $$x_n+1=ax_n+b$$ is given by a constant, let $d$, such that



    $$d=ad+b.$$



    We have



    $$x_n=ca^n+frac b1-a$$ and we plug the initial condition $x=x_0$,



    $$x_0=c+frac b1-a$$ and finally



    $$x_n=a^nx_0+frac1-a^n1-ab.$$




    Other method:



    The relation $x_n+1=ax_n$ hints the transformation $x_n=a^ny_n$, leading to the modified recurrence



    $$y_n+1=y_n+ba^-n,$$ which is solved by the summation of a geometric series



    $$y_n=y_0+bsum_k=1^na^-k=y_0+a^-1frac1-a^-n1-a^-1.$$



    Then



    $$x_n=a^nx_0+fraca^n-1a-1b.$$






    share|cite|improve this answer






















      Your Answer




      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      );
      );
      , "mathjax-editing");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "69"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2884461%2fdid-i-correctly-derive-this-recurrence-equation-formula%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote



      accepted










      You can make it easier. Considering $$ x_n+1=a,x_n+b $$ let $x_n=y_n+c$ to make
      $$y_n+1+c=a, y_n+ac+b$$ that is to say
      $$y_n+1=a, y_n+(ac+b-c)$$ Choose $c$ such that $ac+b-c=0$ and you are back to the classical geometric sequence. Solve it for $y_n$ and go back to $x_n$.






      share|cite|improve this answer
























        up vote
        2
        down vote



        accepted










        You can make it easier. Considering $$ x_n+1=a,x_n+b $$ let $x_n=y_n+c$ to make
        $$y_n+1+c=a, y_n+ac+b$$ that is to say
        $$y_n+1=a, y_n+(ac+b-c)$$ Choose $c$ such that $ac+b-c=0$ and you are back to the classical geometric sequence. Solve it for $y_n$ and go back to $x_n$.






        share|cite|improve this answer






















          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          You can make it easier. Considering $$ x_n+1=a,x_n+b $$ let $x_n=y_n+c$ to make
          $$y_n+1+c=a, y_n+ac+b$$ that is to say
          $$y_n+1=a, y_n+(ac+b-c)$$ Choose $c$ such that $ac+b-c=0$ and you are back to the classical geometric sequence. Solve it for $y_n$ and go back to $x_n$.






          share|cite|improve this answer












          You can make it easier. Considering $$ x_n+1=a,x_n+b $$ let $x_n=y_n+c$ to make
          $$y_n+1+c=a, y_n+ac+b$$ that is to say
          $$y_n+1=a, y_n+(ac+b-c)$$ Choose $c$ such that $ac+b-c=0$ and you are back to the classical geometric sequence. Solve it for $y_n$ and go back to $x_n$.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Aug 16 at 6:32









          Claude Leibovici

          112k1055127




          112k1055127




















              up vote
              0
              down vote













              This is a linear recurrence with constant coefficients and it can also be solved similarly to a linear ODE.



              The homogeneous equation is



              $$x_n+1=ax_n$$ and obviously has the general solution



              $$x_n=ca^n.$$



              Now a particular solution of the non-homegeneous equation



              $$x_n+1=ax_n+b$$ is given by a constant, let $d$, such that



              $$d=ad+b.$$



              We have



              $$x_n=ca^n+frac b1-a$$ and we plug the initial condition $x=x_0$,



              $$x_0=c+frac b1-a$$ and finally



              $$x_n=a^nx_0+frac1-a^n1-ab.$$




              Other method:



              The relation $x_n+1=ax_n$ hints the transformation $x_n=a^ny_n$, leading to the modified recurrence



              $$y_n+1=y_n+ba^-n,$$ which is solved by the summation of a geometric series



              $$y_n=y_0+bsum_k=1^na^-k=y_0+a^-1frac1-a^-n1-a^-1.$$



              Then



              $$x_n=a^nx_0+fraca^n-1a-1b.$$






              share|cite|improve this answer


























                up vote
                0
                down vote













                This is a linear recurrence with constant coefficients and it can also be solved similarly to a linear ODE.



                The homogeneous equation is



                $$x_n+1=ax_n$$ and obviously has the general solution



                $$x_n=ca^n.$$



                Now a particular solution of the non-homegeneous equation



                $$x_n+1=ax_n+b$$ is given by a constant, let $d$, such that



                $$d=ad+b.$$



                We have



                $$x_n=ca^n+frac b1-a$$ and we plug the initial condition $x=x_0$,



                $$x_0=c+frac b1-a$$ and finally



                $$x_n=a^nx_0+frac1-a^n1-ab.$$




                Other method:



                The relation $x_n+1=ax_n$ hints the transformation $x_n=a^ny_n$, leading to the modified recurrence



                $$y_n+1=y_n+ba^-n,$$ which is solved by the summation of a geometric series



                $$y_n=y_0+bsum_k=1^na^-k=y_0+a^-1frac1-a^-n1-a^-1.$$



                Then



                $$x_n=a^nx_0+fraca^n-1a-1b.$$






                share|cite|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  This is a linear recurrence with constant coefficients and it can also be solved similarly to a linear ODE.



                  The homogeneous equation is



                  $$x_n+1=ax_n$$ and obviously has the general solution



                  $$x_n=ca^n.$$



                  Now a particular solution of the non-homegeneous equation



                  $$x_n+1=ax_n+b$$ is given by a constant, let $d$, such that



                  $$d=ad+b.$$



                  We have



                  $$x_n=ca^n+frac b1-a$$ and we plug the initial condition $x=x_0$,



                  $$x_0=c+frac b1-a$$ and finally



                  $$x_n=a^nx_0+frac1-a^n1-ab.$$




                  Other method:



                  The relation $x_n+1=ax_n$ hints the transformation $x_n=a^ny_n$, leading to the modified recurrence



                  $$y_n+1=y_n+ba^-n,$$ which is solved by the summation of a geometric series



                  $$y_n=y_0+bsum_k=1^na^-k=y_0+a^-1frac1-a^-n1-a^-1.$$



                  Then



                  $$x_n=a^nx_0+fraca^n-1a-1b.$$






                  share|cite|improve this answer














                  This is a linear recurrence with constant coefficients and it can also be solved similarly to a linear ODE.



                  The homogeneous equation is



                  $$x_n+1=ax_n$$ and obviously has the general solution



                  $$x_n=ca^n.$$



                  Now a particular solution of the non-homegeneous equation



                  $$x_n+1=ax_n+b$$ is given by a constant, let $d$, such that



                  $$d=ad+b.$$



                  We have



                  $$x_n=ca^n+frac b1-a$$ and we plug the initial condition $x=x_0$,



                  $$x_0=c+frac b1-a$$ and finally



                  $$x_n=a^nx_0+frac1-a^n1-ab.$$




                  Other method:



                  The relation $x_n+1=ax_n$ hints the transformation $x_n=a^ny_n$, leading to the modified recurrence



                  $$y_n+1=y_n+ba^-n,$$ which is solved by the summation of a geometric series



                  $$y_n=y_0+bsum_k=1^na^-k=y_0+a^-1frac1-a^-n1-a^-1.$$



                  Then



                  $$x_n=a^nx_0+fraca^n-1a-1b.$$







                  share|cite|improve this answer














                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited Aug 16 at 6:51

























                  answered Aug 16 at 6:36









                  Yves Daoust

                  112k665207




                  112k665207






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2884461%2fdid-i-correctly-derive-this-recurrence-equation-formula%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      這個網誌中的熱門文章

                      Is there any way to eliminate the singular point to solve this integral by hand or by approximations?

                      Why am i infinitely getting the same tweet with the Twitter Search API?

                      Carbon dioxide