Solve the second order linear non-homogeneous difference equations

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











up vote
0
down vote

favorite












Consider the following linear difference equation
$$ f_k = 1 + frac12 f_k+1 + frac12 f_k-1, 1le k le n-1$$



with $f_0 = f_n = 0$. How do I find the solution? I consider the homogeneous version
$$ f_k+1 - 2f_k + f_k-1 = -1$$



and found that the solution is $C_1 + C_2 k$. But I don't know how to find a particular solution to the non-homogeneous equation.







share|cite|improve this question




















  • what happens to $C_3 k^2 ; ?$
    – Will Jagy
    Aug 8 at 21:13










  • "No guessing needed": math.stackexchange.com/a/1680820/362604
    – Rafa Budría
    Aug 8 at 21:18















up vote
0
down vote

favorite












Consider the following linear difference equation
$$ f_k = 1 + frac12 f_k+1 + frac12 f_k-1, 1le k le n-1$$



with $f_0 = f_n = 0$. How do I find the solution? I consider the homogeneous version
$$ f_k+1 - 2f_k + f_k-1 = -1$$



and found that the solution is $C_1 + C_2 k$. But I don't know how to find a particular solution to the non-homogeneous equation.







share|cite|improve this question




















  • what happens to $C_3 k^2 ; ?$
    – Will Jagy
    Aug 8 at 21:13










  • "No guessing needed": math.stackexchange.com/a/1680820/362604
    – Rafa Budría
    Aug 8 at 21:18













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Consider the following linear difference equation
$$ f_k = 1 + frac12 f_k+1 + frac12 f_k-1, 1le k le n-1$$



with $f_0 = f_n = 0$. How do I find the solution? I consider the homogeneous version
$$ f_k+1 - 2f_k + f_k-1 = -1$$



and found that the solution is $C_1 + C_2 k$. But I don't know how to find a particular solution to the non-homogeneous equation.







share|cite|improve this question












Consider the following linear difference equation
$$ f_k = 1 + frac12 f_k+1 + frac12 f_k-1, 1le k le n-1$$



with $f_0 = f_n = 0$. How do I find the solution? I consider the homogeneous version
$$ f_k+1 - 2f_k + f_k-1 = -1$$



and found that the solution is $C_1 + C_2 k$. But I don't know how to find a particular solution to the non-homogeneous equation.









share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Aug 8 at 20:55









3x89g2

3,83011132




3,83011132











  • what happens to $C_3 k^2 ; ?$
    – Will Jagy
    Aug 8 at 21:13










  • "No guessing needed": math.stackexchange.com/a/1680820/362604
    – Rafa Budría
    Aug 8 at 21:18

















  • what happens to $C_3 k^2 ; ?$
    – Will Jagy
    Aug 8 at 21:13










  • "No guessing needed": math.stackexchange.com/a/1680820/362604
    – Rafa Budría
    Aug 8 at 21:18
















what happens to $C_3 k^2 ; ?$
– Will Jagy
Aug 8 at 21:13




what happens to $C_3 k^2 ; ?$
– Will Jagy
Aug 8 at 21:13












"No guessing needed": math.stackexchange.com/a/1680820/362604
– Rafa Budría
Aug 8 at 21:18





"No guessing needed": math.stackexchange.com/a/1680820/362604
– Rafa Budría
Aug 8 at 21:18











2 Answers
2






active

oldest

votes

















up vote
0
down vote



accepted










Easily you can determine that for the homogeneous recurrence equation



$$
f^h_k+1-2f^h_k+f^h_k-1 = 0
$$



the solution is



$$
f^h_k = c_1 + c_2 k
$$



now, a particular solution which should be polynomial, you can propose



$$
f^p_k = c_1 + c_2 k + c_3 k^2
$$



and the coefficient's determination is obtained by substitution in



$$
f^p_k+1-2f^p_k+f^p_k-1 + 1 = 0
$$



obtaining the condition



$$
1+2c_3 = 0Rightarrow c_3 = -frac 12
$$



and finally



$$
f_k = f^h_k + f^p_k = c_1 + c_2 k-frac 12 k^2
$$






share|cite|improve this answer



























    up vote
    0
    down vote













    Apart from trying what Will Jagy said, you can also note that, for $n=2,3,4,ldots$,
    $$beginalignsum_k=2^n,(n-k+1)cdot(-1)&=sum_k=2^n,(n-k+1),left(f_k-2,f_k-1+f_k-2right)
    \&=f_n+sum_k=2^n-1,big((n-k+1)-2(n-k)+(n-k-1)big),f_k\
    &phantomaaaaa+big((n-2)-2(n-1)big),f(1)+(n-1),f(0)
    \
    &=f_n-n,f(1)+(n-1),f(0),.
    endalign$$
    Thus, for every $n=0,1,2,ldots$,
    $$f_n(n)=n,f(1)-(n-1),f(0)-sum_k=2^n,(n-k+1)=n,f(1)-(n-1),f(0)-fracn(n-1)2,.$$






    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%2f2876578%2fsolve-the-second-order-linear-non-homogeneous-difference-equations%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
      0
      down vote



      accepted










      Easily you can determine that for the homogeneous recurrence equation



      $$
      f^h_k+1-2f^h_k+f^h_k-1 = 0
      $$



      the solution is



      $$
      f^h_k = c_1 + c_2 k
      $$



      now, a particular solution which should be polynomial, you can propose



      $$
      f^p_k = c_1 + c_2 k + c_3 k^2
      $$



      and the coefficient's determination is obtained by substitution in



      $$
      f^p_k+1-2f^p_k+f^p_k-1 + 1 = 0
      $$



      obtaining the condition



      $$
      1+2c_3 = 0Rightarrow c_3 = -frac 12
      $$



      and finally



      $$
      f_k = f^h_k + f^p_k = c_1 + c_2 k-frac 12 k^2
      $$






      share|cite|improve this answer
























        up vote
        0
        down vote



        accepted










        Easily you can determine that for the homogeneous recurrence equation



        $$
        f^h_k+1-2f^h_k+f^h_k-1 = 0
        $$



        the solution is



        $$
        f^h_k = c_1 + c_2 k
        $$



        now, a particular solution which should be polynomial, you can propose



        $$
        f^p_k = c_1 + c_2 k + c_3 k^2
        $$



        and the coefficient's determination is obtained by substitution in



        $$
        f^p_k+1-2f^p_k+f^p_k-1 + 1 = 0
        $$



        obtaining the condition



        $$
        1+2c_3 = 0Rightarrow c_3 = -frac 12
        $$



        and finally



        $$
        f_k = f^h_k + f^p_k = c_1 + c_2 k-frac 12 k^2
        $$






        share|cite|improve this answer






















          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          Easily you can determine that for the homogeneous recurrence equation



          $$
          f^h_k+1-2f^h_k+f^h_k-1 = 0
          $$



          the solution is



          $$
          f^h_k = c_1 + c_2 k
          $$



          now, a particular solution which should be polynomial, you can propose



          $$
          f^p_k = c_1 + c_2 k + c_3 k^2
          $$



          and the coefficient's determination is obtained by substitution in



          $$
          f^p_k+1-2f^p_k+f^p_k-1 + 1 = 0
          $$



          obtaining the condition



          $$
          1+2c_3 = 0Rightarrow c_3 = -frac 12
          $$



          and finally



          $$
          f_k = f^h_k + f^p_k = c_1 + c_2 k-frac 12 k^2
          $$






          share|cite|improve this answer












          Easily you can determine that for the homogeneous recurrence equation



          $$
          f^h_k+1-2f^h_k+f^h_k-1 = 0
          $$



          the solution is



          $$
          f^h_k = c_1 + c_2 k
          $$



          now, a particular solution which should be polynomial, you can propose



          $$
          f^p_k = c_1 + c_2 k + c_3 k^2
          $$



          and the coefficient's determination is obtained by substitution in



          $$
          f^p_k+1-2f^p_k+f^p_k-1 + 1 = 0
          $$



          obtaining the condition



          $$
          1+2c_3 = 0Rightarrow c_3 = -frac 12
          $$



          and finally



          $$
          f_k = f^h_k + f^p_k = c_1 + c_2 k-frac 12 k^2
          $$







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Aug 8 at 21:32









          Cesareo

          5,8572412




          5,8572412




















              up vote
              0
              down vote













              Apart from trying what Will Jagy said, you can also note that, for $n=2,3,4,ldots$,
              $$beginalignsum_k=2^n,(n-k+1)cdot(-1)&=sum_k=2^n,(n-k+1),left(f_k-2,f_k-1+f_k-2right)
              \&=f_n+sum_k=2^n-1,big((n-k+1)-2(n-k)+(n-k-1)big),f_k\
              &phantomaaaaa+big((n-2)-2(n-1)big),f(1)+(n-1),f(0)
              \
              &=f_n-n,f(1)+(n-1),f(0),.
              endalign$$
              Thus, for every $n=0,1,2,ldots$,
              $$f_n(n)=n,f(1)-(n-1),f(0)-sum_k=2^n,(n-k+1)=n,f(1)-(n-1),f(0)-fracn(n-1)2,.$$






              share|cite|improve this answer
























                up vote
                0
                down vote













                Apart from trying what Will Jagy said, you can also note that, for $n=2,3,4,ldots$,
                $$beginalignsum_k=2^n,(n-k+1)cdot(-1)&=sum_k=2^n,(n-k+1),left(f_k-2,f_k-1+f_k-2right)
                \&=f_n+sum_k=2^n-1,big((n-k+1)-2(n-k)+(n-k-1)big),f_k\
                &phantomaaaaa+big((n-2)-2(n-1)big),f(1)+(n-1),f(0)
                \
                &=f_n-n,f(1)+(n-1),f(0),.
                endalign$$
                Thus, for every $n=0,1,2,ldots$,
                $$f_n(n)=n,f(1)-(n-1),f(0)-sum_k=2^n,(n-k+1)=n,f(1)-(n-1),f(0)-fracn(n-1)2,.$$






                share|cite|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Apart from trying what Will Jagy said, you can also note that, for $n=2,3,4,ldots$,
                  $$beginalignsum_k=2^n,(n-k+1)cdot(-1)&=sum_k=2^n,(n-k+1),left(f_k-2,f_k-1+f_k-2right)
                  \&=f_n+sum_k=2^n-1,big((n-k+1)-2(n-k)+(n-k-1)big),f_k\
                  &phantomaaaaa+big((n-2)-2(n-1)big),f(1)+(n-1),f(0)
                  \
                  &=f_n-n,f(1)+(n-1),f(0),.
                  endalign$$
                  Thus, for every $n=0,1,2,ldots$,
                  $$f_n(n)=n,f(1)-(n-1),f(0)-sum_k=2^n,(n-k+1)=n,f(1)-(n-1),f(0)-fracn(n-1)2,.$$






                  share|cite|improve this answer












                  Apart from trying what Will Jagy said, you can also note that, for $n=2,3,4,ldots$,
                  $$beginalignsum_k=2^n,(n-k+1)cdot(-1)&=sum_k=2^n,(n-k+1),left(f_k-2,f_k-1+f_k-2right)
                  \&=f_n+sum_k=2^n-1,big((n-k+1)-2(n-k)+(n-k-1)big),f_k\
                  &phantomaaaaa+big((n-2)-2(n-1)big),f(1)+(n-1),f(0)
                  \
                  &=f_n-n,f(1)+(n-1),f(0),.
                  endalign$$
                  Thus, for every $n=0,1,2,ldots$,
                  $$f_n(n)=n,f(1)-(n-1),f(0)-sum_k=2^n,(n-k+1)=n,f(1)-(n-1),f(0)-fracn(n-1)2,.$$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Aug 8 at 21:28









                  Batominovski

                  23.6k22779




                  23.6k22779






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2876578%2fsolve-the-second-order-linear-non-homogeneous-difference-equations%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      這個網誌中的熱門文章

                      How to combine Bézier curves to a surface?

                      Mutual Information Always Non-negative

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