Solving A Linear Recurrence Relation With Complex Roots

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











up vote
1
down vote

favorite












Question:



For the given linear homogeneous difference equation, find the general solution:



$$y_n+2 + y_n+1 + y_n = 0$$



With the initial conditions of:



$$y(0)=sqrt3, y(1) = 0$$



Attempted Answer:



I approached the problem normally as one would except by solving the auxiliary equation which yields:



$$m^2 + m + 1 = 0$$
$$implies m = frac-12 pm fracisqrt32$$



Now the general solution is of form:



$$y_n = A left(frac-12 - fracisqrt32right)^n
+ B left(frac-12 + fracisqrt32right)^n $$



Here is the part where I get stuck when I substitute the initial conditions to form a system of equations:



$$A + B = sqrt3$$
$$A left(frac-12 - fracisqrt32right)
+ B left(frac-12 + fracisqrt32right) = 0$$



Now to make my life easier (which it really didn't), I decided to take a 'shortcut' and rewrite the 2nd equation as the sum of an imaginary and real part:



$$frac-12(A + B) + ifracsqrt32(-A + B) = 0 + 0i$$



Since the real part on the LHS must equal the real part on the RHS, and the same applies for the imaginary part, we obtain:



$$frac-12(A + B) = 0$$
$$fracsqrt32(-A + B) = 0$$



So the above implies that $A = B = -B$ which can only be true if $A = B = 0$. However if that is the case, then the first equation in the system of equations ($A + B = sqrt3$) implies that 0 = $sqrt3$.



I know that there is a mistake somewhere in the logic of my reasoning (I think perhaps when I equated each real and imaginary part of the LHS to the RHS) but I don't know why and where exactly. Please point out my mistake.







share|cite|improve this question






















  • @AndréNicolas from continuation, he just made a typo. I fixed it
    – gt6989b
    Oct 26 '15 at 21:00






  • 1




    Your mistake is in assuming that $A$ and $B$ are real: $x + iy = 0 implies x=0$ and $y=0$ is only true when $x,yinmathbbR$.
    – Winther
    Oct 26 '15 at 21:06











  • I see, but I thought the coefficients that are part of the general solution $y_n$ (i.e. $A$ & $B$ in this case) are always all real?
    – OthmanEmpire
    Oct 26 '15 at 23:49










  • Thanks to everyone who contributed to the answer--they are a bit beyond me but I think I understand them a bit better after looking at them again after a month.
    – OthmanEmpire
    Nov 27 '15 at 15:42














up vote
1
down vote

favorite












Question:



For the given linear homogeneous difference equation, find the general solution:



$$y_n+2 + y_n+1 + y_n = 0$$



With the initial conditions of:



$$y(0)=sqrt3, y(1) = 0$$



Attempted Answer:



I approached the problem normally as one would except by solving the auxiliary equation which yields:



$$m^2 + m + 1 = 0$$
$$implies m = frac-12 pm fracisqrt32$$



Now the general solution is of form:



$$y_n = A left(frac-12 - fracisqrt32right)^n
+ B left(frac-12 + fracisqrt32right)^n $$



Here is the part where I get stuck when I substitute the initial conditions to form a system of equations:



$$A + B = sqrt3$$
$$A left(frac-12 - fracisqrt32right)
+ B left(frac-12 + fracisqrt32right) = 0$$



Now to make my life easier (which it really didn't), I decided to take a 'shortcut' and rewrite the 2nd equation as the sum of an imaginary and real part:



$$frac-12(A + B) + ifracsqrt32(-A + B) = 0 + 0i$$



Since the real part on the LHS must equal the real part on the RHS, and the same applies for the imaginary part, we obtain:



$$frac-12(A + B) = 0$$
$$fracsqrt32(-A + B) = 0$$



So the above implies that $A = B = -B$ which can only be true if $A = B = 0$. However if that is the case, then the first equation in the system of equations ($A + B = sqrt3$) implies that 0 = $sqrt3$.



I know that there is a mistake somewhere in the logic of my reasoning (I think perhaps when I equated each real and imaginary part of the LHS to the RHS) but I don't know why and where exactly. Please point out my mistake.







share|cite|improve this question






















  • @AndréNicolas from continuation, he just made a typo. I fixed it
    – gt6989b
    Oct 26 '15 at 21:00






  • 1




    Your mistake is in assuming that $A$ and $B$ are real: $x + iy = 0 implies x=0$ and $y=0$ is only true when $x,yinmathbbR$.
    – Winther
    Oct 26 '15 at 21:06











  • I see, but I thought the coefficients that are part of the general solution $y_n$ (i.e. $A$ & $B$ in this case) are always all real?
    – OthmanEmpire
    Oct 26 '15 at 23:49










  • Thanks to everyone who contributed to the answer--they are a bit beyond me but I think I understand them a bit better after looking at them again after a month.
    – OthmanEmpire
    Nov 27 '15 at 15:42












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Question:



For the given linear homogeneous difference equation, find the general solution:



$$y_n+2 + y_n+1 + y_n = 0$$



With the initial conditions of:



$$y(0)=sqrt3, y(1) = 0$$



Attempted Answer:



I approached the problem normally as one would except by solving the auxiliary equation which yields:



$$m^2 + m + 1 = 0$$
$$implies m = frac-12 pm fracisqrt32$$



Now the general solution is of form:



$$y_n = A left(frac-12 - fracisqrt32right)^n
+ B left(frac-12 + fracisqrt32right)^n $$



Here is the part where I get stuck when I substitute the initial conditions to form a system of equations:



$$A + B = sqrt3$$
$$A left(frac-12 - fracisqrt32right)
+ B left(frac-12 + fracisqrt32right) = 0$$



Now to make my life easier (which it really didn't), I decided to take a 'shortcut' and rewrite the 2nd equation as the sum of an imaginary and real part:



$$frac-12(A + B) + ifracsqrt32(-A + B) = 0 + 0i$$



Since the real part on the LHS must equal the real part on the RHS, and the same applies for the imaginary part, we obtain:



$$frac-12(A + B) = 0$$
$$fracsqrt32(-A + B) = 0$$



So the above implies that $A = B = -B$ which can only be true if $A = B = 0$. However if that is the case, then the first equation in the system of equations ($A + B = sqrt3$) implies that 0 = $sqrt3$.



I know that there is a mistake somewhere in the logic of my reasoning (I think perhaps when I equated each real and imaginary part of the LHS to the RHS) but I don't know why and where exactly. Please point out my mistake.







share|cite|improve this question














Question:



For the given linear homogeneous difference equation, find the general solution:



$$y_n+2 + y_n+1 + y_n = 0$$



With the initial conditions of:



$$y(0)=sqrt3, y(1) = 0$$



Attempted Answer:



I approached the problem normally as one would except by solving the auxiliary equation which yields:



$$m^2 + m + 1 = 0$$
$$implies m = frac-12 pm fracisqrt32$$



Now the general solution is of form:



$$y_n = A left(frac-12 - fracisqrt32right)^n
+ B left(frac-12 + fracisqrt32right)^n $$



Here is the part where I get stuck when I substitute the initial conditions to form a system of equations:



$$A + B = sqrt3$$
$$A left(frac-12 - fracisqrt32right)
+ B left(frac-12 + fracisqrt32right) = 0$$



Now to make my life easier (which it really didn't), I decided to take a 'shortcut' and rewrite the 2nd equation as the sum of an imaginary and real part:



$$frac-12(A + B) + ifracsqrt32(-A + B) = 0 + 0i$$



Since the real part on the LHS must equal the real part on the RHS, and the same applies for the imaginary part, we obtain:



$$frac-12(A + B) = 0$$
$$fracsqrt32(-A + B) = 0$$



So the above implies that $A = B = -B$ which can only be true if $A = B = 0$. However if that is the case, then the first equation in the system of equations ($A + B = sqrt3$) implies that 0 = $sqrt3$.



I know that there is a mistake somewhere in the logic of my reasoning (I think perhaps when I equated each real and imaginary part of the LHS to the RHS) but I don't know why and where exactly. Please point out my mistake.









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Oct 26 '15 at 20:59









gt6989b

30.7k22248




30.7k22248










asked Oct 26 '15 at 20:48









OthmanEmpire

2515




2515











  • @AndréNicolas from continuation, he just made a typo. I fixed it
    – gt6989b
    Oct 26 '15 at 21:00






  • 1




    Your mistake is in assuming that $A$ and $B$ are real: $x + iy = 0 implies x=0$ and $y=0$ is only true when $x,yinmathbbR$.
    – Winther
    Oct 26 '15 at 21:06











  • I see, but I thought the coefficients that are part of the general solution $y_n$ (i.e. $A$ & $B$ in this case) are always all real?
    – OthmanEmpire
    Oct 26 '15 at 23:49










  • Thanks to everyone who contributed to the answer--they are a bit beyond me but I think I understand them a bit better after looking at them again after a month.
    – OthmanEmpire
    Nov 27 '15 at 15:42
















  • @AndréNicolas from continuation, he just made a typo. I fixed it
    – gt6989b
    Oct 26 '15 at 21:00






  • 1




    Your mistake is in assuming that $A$ and $B$ are real: $x + iy = 0 implies x=0$ and $y=0$ is only true when $x,yinmathbbR$.
    – Winther
    Oct 26 '15 at 21:06











  • I see, but I thought the coefficients that are part of the general solution $y_n$ (i.e. $A$ & $B$ in this case) are always all real?
    – OthmanEmpire
    Oct 26 '15 at 23:49










  • Thanks to everyone who contributed to the answer--they are a bit beyond me but I think I understand them a bit better after looking at them again after a month.
    – OthmanEmpire
    Nov 27 '15 at 15:42















@AndréNicolas from continuation, he just made a typo. I fixed it
– gt6989b
Oct 26 '15 at 21:00




@AndréNicolas from continuation, he just made a typo. I fixed it
– gt6989b
Oct 26 '15 at 21:00




1




1




Your mistake is in assuming that $A$ and $B$ are real: $x + iy = 0 implies x=0$ and $y=0$ is only true when $x,yinmathbbR$.
– Winther
Oct 26 '15 at 21:06





Your mistake is in assuming that $A$ and $B$ are real: $x + iy = 0 implies x=0$ and $y=0$ is only true when $x,yinmathbbR$.
– Winther
Oct 26 '15 at 21:06













I see, but I thought the coefficients that are part of the general solution $y_n$ (i.e. $A$ & $B$ in this case) are always all real?
– OthmanEmpire
Oct 26 '15 at 23:49




I see, but I thought the coefficients that are part of the general solution $y_n$ (i.e. $A$ & $B$ in this case) are always all real?
– OthmanEmpire
Oct 26 '15 at 23:49












Thanks to everyone who contributed to the answer--they are a bit beyond me but I think I understand them a bit better after looking at them again after a month.
– OthmanEmpire
Nov 27 '15 at 15:42




Thanks to everyone who contributed to the answer--they are a bit beyond me but I think I understand them a bit better after looking at them again after a month.
– OthmanEmpire
Nov 27 '15 at 15:42










3 Answers
3






active

oldest

votes

















up vote
3
down vote



accepted










What happens
when the roots of the
characteristic polynomial are complex
is that the solutions
have a periodic component.



Your case is
$y_n
= a left(frac-12 - fracisqrt32right)^n
+ b left(frac-12 + fracisqrt32right)^n
=a r^n + bs^n
$.
Note that
$r+s = -1$
and
$r-s = -isqrt3$.



If
$y_0 = u$
and
$y_1 = v$,
then
$a+b = u$
and
$ar+bs = v$.
Since
$b = u-a$,
$v
= ar+(u-a)s
=a(r-s)+us
$,
so
$a
=fracv-usr-s
$
and
$b
=u-a
=u-fracv-usr-s
=fracu(r-s)-v+usr-s
=fracur-vr-s
$.



In your case,
$u=sqrt3,
v = 0,
r=frac-12 - fracisqrt32,
s=frac-12 + fracisqrt32,
r-s=-isqrt3
$,
so
$a
=fracv-usr-s
=frac-sqrt3(frac-12 + fracisqrt32)-isqrt3
=-i(frac-12 + fracisqrt32)
=fraci2 + fracsqrt32
$
and
$b
=u-a
=fracsqrt32-fraci2
$.



(We are getting close.)



We have
$y_n
=ar^n+bs^n
$.



By the magic of
assigned problems,
$|r| = |s| = 1$.
$r = e^-2ipi/3
$,
so
$r^n
=e^-2nipi/3
=cos(-2npi/3)+isin(-2npi/3)
=cos(2npi/3)-isin(2npi/3)
$.
Similarly,
$s = e^2ipi/3
$,
so
$s^n
=e^2inpi/3
=cos(2npi/3)+isin(2npi/3)
$.



Also
$a
=e^ipi/6
$
and
$b
=e^-ipi/6
$.



Therefore
(finally!)



$beginalign*
y_n
&=ar^n+bs^n\
&=e^ipi/6e^-2inpi/3+e^-ipi/6e^2inpi/3\
&=e^pi i(1/6-2n/3)+e^pi i(-1/6+2n/3)\
&=cos(pi (1/6-2n/3))+isin(pi (1/6-2n/3))
+cos(pi (-1/6+2n/3))+isin(pi (-1/6+2n/3))\
&=cos(pi (1/6-2n/3))+cos(pi (-1/6+2n/3))
+i(sin(pi (1/6-2n/3))+sin(pi (-1/6+2n/3)))\
&=2cos(pi (1/6-2n/3))
qquadtextsince
cos(-x)=cos(x) text and sin(x) = -sin(-x)\
endalign*
$



You can get explicit values for
values of $n$ mod 6,
but this shows how the result is periodic.



A check is that
the result is real,
with no imaginary part.
This has to hold,
since the initial values
and the recurrence coefficients
are all real.






share|cite|improve this answer






















  • I can't see why $vert r vert = e^-2ipi /3 $. How do you derive that?
    – Marcus Fermat
    Jan 5 at 20:16











  • $r = -frac12(1+isqrt3)$. It's $r$, not $|r|$.
    – marty cohen
    Jan 5 at 22:13

















up vote
3
down vote













Your $A$ and $B$ have to be complex. Your system is equivalent to $$A+B=sqrt 3\-(A+B)/2-(A-B)fracisqrt 32=0,$$
which gives you $$A-B = i\A+B=sqrt3$$ and now it is to solve.






share|cite|improve this answer



























    up vote
    1
    down vote













    Use generating functions. Define $A(z) = sum_n ge 0 y_n z^n$, multiṕly your recurrence by $z^n$, sum over $n ge 0$ and recognize some sums:



    $beginalign
    fracA(z) - y_0 -y_1 zz^2
    + fracA(z) - y_0z + A(z)
    &= 0 \
    fracA(z) - sqrt3z^2
    + fracA(z) - sqrt3z + A(z)
    &= 0
    endalign$



    Solving for $A(z)$:



    $beginalign
    A(z)
    &= frac(1 + z) sqrt31 + z + z^2 \
    &= frac1 - z^21 - z^3 sqrt3
    endalign$



    We need:



    $beginalign
    [z^n] A(z)
    &= [z^n] frac1 - z^21 - z^3 sqrt3 \
    &= sqrt3 [z^n] (1 - z^2) sum_k ge 0 z^3 k \
    &= sqrt3 left(
    [z^n] sum_k ge 0 z^3 k
    - [z^n - 2] sum_k ge 0 z^3 k
    right) \
    &= begincases
    sqrt3 & textif (n equiv 0 pmod3) \
    - sqrt3 & textif (n equiv 1 pmod3 wedge n ge 2) \
    0 & textotherwise
    endcases
    endalign$






    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%2f1499090%2fsolving-a-linear-recurrence-relation-with-complex-roots%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      3
      down vote



      accepted










      What happens
      when the roots of the
      characteristic polynomial are complex
      is that the solutions
      have a periodic component.



      Your case is
      $y_n
      = a left(frac-12 - fracisqrt32right)^n
      + b left(frac-12 + fracisqrt32right)^n
      =a r^n + bs^n
      $.
      Note that
      $r+s = -1$
      and
      $r-s = -isqrt3$.



      If
      $y_0 = u$
      and
      $y_1 = v$,
      then
      $a+b = u$
      and
      $ar+bs = v$.
      Since
      $b = u-a$,
      $v
      = ar+(u-a)s
      =a(r-s)+us
      $,
      so
      $a
      =fracv-usr-s
      $
      and
      $b
      =u-a
      =u-fracv-usr-s
      =fracu(r-s)-v+usr-s
      =fracur-vr-s
      $.



      In your case,
      $u=sqrt3,
      v = 0,
      r=frac-12 - fracisqrt32,
      s=frac-12 + fracisqrt32,
      r-s=-isqrt3
      $,
      so
      $a
      =fracv-usr-s
      =frac-sqrt3(frac-12 + fracisqrt32)-isqrt3
      =-i(frac-12 + fracisqrt32)
      =fraci2 + fracsqrt32
      $
      and
      $b
      =u-a
      =fracsqrt32-fraci2
      $.



      (We are getting close.)



      We have
      $y_n
      =ar^n+bs^n
      $.



      By the magic of
      assigned problems,
      $|r| = |s| = 1$.
      $r = e^-2ipi/3
      $,
      so
      $r^n
      =e^-2nipi/3
      =cos(-2npi/3)+isin(-2npi/3)
      =cos(2npi/3)-isin(2npi/3)
      $.
      Similarly,
      $s = e^2ipi/3
      $,
      so
      $s^n
      =e^2inpi/3
      =cos(2npi/3)+isin(2npi/3)
      $.



      Also
      $a
      =e^ipi/6
      $
      and
      $b
      =e^-ipi/6
      $.



      Therefore
      (finally!)



      $beginalign*
      y_n
      &=ar^n+bs^n\
      &=e^ipi/6e^-2inpi/3+e^-ipi/6e^2inpi/3\
      &=e^pi i(1/6-2n/3)+e^pi i(-1/6+2n/3)\
      &=cos(pi (1/6-2n/3))+isin(pi (1/6-2n/3))
      +cos(pi (-1/6+2n/3))+isin(pi (-1/6+2n/3))\
      &=cos(pi (1/6-2n/3))+cos(pi (-1/6+2n/3))
      +i(sin(pi (1/6-2n/3))+sin(pi (-1/6+2n/3)))\
      &=2cos(pi (1/6-2n/3))
      qquadtextsince
      cos(-x)=cos(x) text and sin(x) = -sin(-x)\
      endalign*
      $



      You can get explicit values for
      values of $n$ mod 6,
      but this shows how the result is periodic.



      A check is that
      the result is real,
      with no imaginary part.
      This has to hold,
      since the initial values
      and the recurrence coefficients
      are all real.






      share|cite|improve this answer






















      • I can't see why $vert r vert = e^-2ipi /3 $. How do you derive that?
        – Marcus Fermat
        Jan 5 at 20:16











      • $r = -frac12(1+isqrt3)$. It's $r$, not $|r|$.
        – marty cohen
        Jan 5 at 22:13














      up vote
      3
      down vote



      accepted










      What happens
      when the roots of the
      characteristic polynomial are complex
      is that the solutions
      have a periodic component.



      Your case is
      $y_n
      = a left(frac-12 - fracisqrt32right)^n
      + b left(frac-12 + fracisqrt32right)^n
      =a r^n + bs^n
      $.
      Note that
      $r+s = -1$
      and
      $r-s = -isqrt3$.



      If
      $y_0 = u$
      and
      $y_1 = v$,
      then
      $a+b = u$
      and
      $ar+bs = v$.
      Since
      $b = u-a$,
      $v
      = ar+(u-a)s
      =a(r-s)+us
      $,
      so
      $a
      =fracv-usr-s
      $
      and
      $b
      =u-a
      =u-fracv-usr-s
      =fracu(r-s)-v+usr-s
      =fracur-vr-s
      $.



      In your case,
      $u=sqrt3,
      v = 0,
      r=frac-12 - fracisqrt32,
      s=frac-12 + fracisqrt32,
      r-s=-isqrt3
      $,
      so
      $a
      =fracv-usr-s
      =frac-sqrt3(frac-12 + fracisqrt32)-isqrt3
      =-i(frac-12 + fracisqrt32)
      =fraci2 + fracsqrt32
      $
      and
      $b
      =u-a
      =fracsqrt32-fraci2
      $.



      (We are getting close.)



      We have
      $y_n
      =ar^n+bs^n
      $.



      By the magic of
      assigned problems,
      $|r| = |s| = 1$.
      $r = e^-2ipi/3
      $,
      so
      $r^n
      =e^-2nipi/3
      =cos(-2npi/3)+isin(-2npi/3)
      =cos(2npi/3)-isin(2npi/3)
      $.
      Similarly,
      $s = e^2ipi/3
      $,
      so
      $s^n
      =e^2inpi/3
      =cos(2npi/3)+isin(2npi/3)
      $.



      Also
      $a
      =e^ipi/6
      $
      and
      $b
      =e^-ipi/6
      $.



      Therefore
      (finally!)



      $beginalign*
      y_n
      &=ar^n+bs^n\
      &=e^ipi/6e^-2inpi/3+e^-ipi/6e^2inpi/3\
      &=e^pi i(1/6-2n/3)+e^pi i(-1/6+2n/3)\
      &=cos(pi (1/6-2n/3))+isin(pi (1/6-2n/3))
      +cos(pi (-1/6+2n/3))+isin(pi (-1/6+2n/3))\
      &=cos(pi (1/6-2n/3))+cos(pi (-1/6+2n/3))
      +i(sin(pi (1/6-2n/3))+sin(pi (-1/6+2n/3)))\
      &=2cos(pi (1/6-2n/3))
      qquadtextsince
      cos(-x)=cos(x) text and sin(x) = -sin(-x)\
      endalign*
      $



      You can get explicit values for
      values of $n$ mod 6,
      but this shows how the result is periodic.



      A check is that
      the result is real,
      with no imaginary part.
      This has to hold,
      since the initial values
      and the recurrence coefficients
      are all real.






      share|cite|improve this answer






















      • I can't see why $vert r vert = e^-2ipi /3 $. How do you derive that?
        – Marcus Fermat
        Jan 5 at 20:16











      • $r = -frac12(1+isqrt3)$. It's $r$, not $|r|$.
        – marty cohen
        Jan 5 at 22:13












      up vote
      3
      down vote



      accepted







      up vote
      3
      down vote



      accepted






      What happens
      when the roots of the
      characteristic polynomial are complex
      is that the solutions
      have a periodic component.



      Your case is
      $y_n
      = a left(frac-12 - fracisqrt32right)^n
      + b left(frac-12 + fracisqrt32right)^n
      =a r^n + bs^n
      $.
      Note that
      $r+s = -1$
      and
      $r-s = -isqrt3$.



      If
      $y_0 = u$
      and
      $y_1 = v$,
      then
      $a+b = u$
      and
      $ar+bs = v$.
      Since
      $b = u-a$,
      $v
      = ar+(u-a)s
      =a(r-s)+us
      $,
      so
      $a
      =fracv-usr-s
      $
      and
      $b
      =u-a
      =u-fracv-usr-s
      =fracu(r-s)-v+usr-s
      =fracur-vr-s
      $.



      In your case,
      $u=sqrt3,
      v = 0,
      r=frac-12 - fracisqrt32,
      s=frac-12 + fracisqrt32,
      r-s=-isqrt3
      $,
      so
      $a
      =fracv-usr-s
      =frac-sqrt3(frac-12 + fracisqrt32)-isqrt3
      =-i(frac-12 + fracisqrt32)
      =fraci2 + fracsqrt32
      $
      and
      $b
      =u-a
      =fracsqrt32-fraci2
      $.



      (We are getting close.)



      We have
      $y_n
      =ar^n+bs^n
      $.



      By the magic of
      assigned problems,
      $|r| = |s| = 1$.
      $r = e^-2ipi/3
      $,
      so
      $r^n
      =e^-2nipi/3
      =cos(-2npi/3)+isin(-2npi/3)
      =cos(2npi/3)-isin(2npi/3)
      $.
      Similarly,
      $s = e^2ipi/3
      $,
      so
      $s^n
      =e^2inpi/3
      =cos(2npi/3)+isin(2npi/3)
      $.



      Also
      $a
      =e^ipi/6
      $
      and
      $b
      =e^-ipi/6
      $.



      Therefore
      (finally!)



      $beginalign*
      y_n
      &=ar^n+bs^n\
      &=e^ipi/6e^-2inpi/3+e^-ipi/6e^2inpi/3\
      &=e^pi i(1/6-2n/3)+e^pi i(-1/6+2n/3)\
      &=cos(pi (1/6-2n/3))+isin(pi (1/6-2n/3))
      +cos(pi (-1/6+2n/3))+isin(pi (-1/6+2n/3))\
      &=cos(pi (1/6-2n/3))+cos(pi (-1/6+2n/3))
      +i(sin(pi (1/6-2n/3))+sin(pi (-1/6+2n/3)))\
      &=2cos(pi (1/6-2n/3))
      qquadtextsince
      cos(-x)=cos(x) text and sin(x) = -sin(-x)\
      endalign*
      $



      You can get explicit values for
      values of $n$ mod 6,
      but this shows how the result is periodic.



      A check is that
      the result is real,
      with no imaginary part.
      This has to hold,
      since the initial values
      and the recurrence coefficients
      are all real.






      share|cite|improve this answer














      What happens
      when the roots of the
      characteristic polynomial are complex
      is that the solutions
      have a periodic component.



      Your case is
      $y_n
      = a left(frac-12 - fracisqrt32right)^n
      + b left(frac-12 + fracisqrt32right)^n
      =a r^n + bs^n
      $.
      Note that
      $r+s = -1$
      and
      $r-s = -isqrt3$.



      If
      $y_0 = u$
      and
      $y_1 = v$,
      then
      $a+b = u$
      and
      $ar+bs = v$.
      Since
      $b = u-a$,
      $v
      = ar+(u-a)s
      =a(r-s)+us
      $,
      so
      $a
      =fracv-usr-s
      $
      and
      $b
      =u-a
      =u-fracv-usr-s
      =fracu(r-s)-v+usr-s
      =fracur-vr-s
      $.



      In your case,
      $u=sqrt3,
      v = 0,
      r=frac-12 - fracisqrt32,
      s=frac-12 + fracisqrt32,
      r-s=-isqrt3
      $,
      so
      $a
      =fracv-usr-s
      =frac-sqrt3(frac-12 + fracisqrt32)-isqrt3
      =-i(frac-12 + fracisqrt32)
      =fraci2 + fracsqrt32
      $
      and
      $b
      =u-a
      =fracsqrt32-fraci2
      $.



      (We are getting close.)



      We have
      $y_n
      =ar^n+bs^n
      $.



      By the magic of
      assigned problems,
      $|r| = |s| = 1$.
      $r = e^-2ipi/3
      $,
      so
      $r^n
      =e^-2nipi/3
      =cos(-2npi/3)+isin(-2npi/3)
      =cos(2npi/3)-isin(2npi/3)
      $.
      Similarly,
      $s = e^2ipi/3
      $,
      so
      $s^n
      =e^2inpi/3
      =cos(2npi/3)+isin(2npi/3)
      $.



      Also
      $a
      =e^ipi/6
      $
      and
      $b
      =e^-ipi/6
      $.



      Therefore
      (finally!)



      $beginalign*
      y_n
      &=ar^n+bs^n\
      &=e^ipi/6e^-2inpi/3+e^-ipi/6e^2inpi/3\
      &=e^pi i(1/6-2n/3)+e^pi i(-1/6+2n/3)\
      &=cos(pi (1/6-2n/3))+isin(pi (1/6-2n/3))
      +cos(pi (-1/6+2n/3))+isin(pi (-1/6+2n/3))\
      &=cos(pi (1/6-2n/3))+cos(pi (-1/6+2n/3))
      +i(sin(pi (1/6-2n/3))+sin(pi (-1/6+2n/3)))\
      &=2cos(pi (1/6-2n/3))
      qquadtextsince
      cos(-x)=cos(x) text and sin(x) = -sin(-x)\
      endalign*
      $



      You can get explicit values for
      values of $n$ mod 6,
      but this shows how the result is periodic.



      A check is that
      the result is real,
      with no imaginary part.
      This has to hold,
      since the initial values
      and the recurrence coefficients
      are all real.







      share|cite|improve this answer














      share|cite|improve this answer



      share|cite|improve this answer








      edited Aug 26 at 3:58

























      answered Oct 26 '15 at 22:02









      marty cohen

      69.8k446122




      69.8k446122











      • I can't see why $vert r vert = e^-2ipi /3 $. How do you derive that?
        – Marcus Fermat
        Jan 5 at 20:16











      • $r = -frac12(1+isqrt3)$. It's $r$, not $|r|$.
        – marty cohen
        Jan 5 at 22:13
















      • I can't see why $vert r vert = e^-2ipi /3 $. How do you derive that?
        – Marcus Fermat
        Jan 5 at 20:16











      • $r = -frac12(1+isqrt3)$. It's $r$, not $|r|$.
        – marty cohen
        Jan 5 at 22:13















      I can't see why $vert r vert = e^-2ipi /3 $. How do you derive that?
      – Marcus Fermat
      Jan 5 at 20:16





      I can't see why $vert r vert = e^-2ipi /3 $. How do you derive that?
      – Marcus Fermat
      Jan 5 at 20:16













      $r = -frac12(1+isqrt3)$. It's $r$, not $|r|$.
      – marty cohen
      Jan 5 at 22:13




      $r = -frac12(1+isqrt3)$. It's $r$, not $|r|$.
      – marty cohen
      Jan 5 at 22:13










      up vote
      3
      down vote













      Your $A$ and $B$ have to be complex. Your system is equivalent to $$A+B=sqrt 3\-(A+B)/2-(A-B)fracisqrt 32=0,$$
      which gives you $$A-B = i\A+B=sqrt3$$ and now it is to solve.






      share|cite|improve this answer
























        up vote
        3
        down vote













        Your $A$ and $B$ have to be complex. Your system is equivalent to $$A+B=sqrt 3\-(A+B)/2-(A-B)fracisqrt 32=0,$$
        which gives you $$A-B = i\A+B=sqrt3$$ and now it is to solve.






        share|cite|improve this answer






















          up vote
          3
          down vote










          up vote
          3
          down vote









          Your $A$ and $B$ have to be complex. Your system is equivalent to $$A+B=sqrt 3\-(A+B)/2-(A-B)fracisqrt 32=0,$$
          which gives you $$A-B = i\A+B=sqrt3$$ and now it is to solve.






          share|cite|improve this answer












          Your $A$ and $B$ have to be complex. Your system is equivalent to $$A+B=sqrt 3\-(A+B)/2-(A-B)fracisqrt 32=0,$$
          which gives you $$A-B = i\A+B=sqrt3$$ and now it is to solve.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Oct 26 '15 at 21:06









          TZakrevskiy

          19.8k12253




          19.8k12253




















              up vote
              1
              down vote













              Use generating functions. Define $A(z) = sum_n ge 0 y_n z^n$, multiṕly your recurrence by $z^n$, sum over $n ge 0$ and recognize some sums:



              $beginalign
              fracA(z) - y_0 -y_1 zz^2
              + fracA(z) - y_0z + A(z)
              &= 0 \
              fracA(z) - sqrt3z^2
              + fracA(z) - sqrt3z + A(z)
              &= 0
              endalign$



              Solving for $A(z)$:



              $beginalign
              A(z)
              &= frac(1 + z) sqrt31 + z + z^2 \
              &= frac1 - z^21 - z^3 sqrt3
              endalign$



              We need:



              $beginalign
              [z^n] A(z)
              &= [z^n] frac1 - z^21 - z^3 sqrt3 \
              &= sqrt3 [z^n] (1 - z^2) sum_k ge 0 z^3 k \
              &= sqrt3 left(
              [z^n] sum_k ge 0 z^3 k
              - [z^n - 2] sum_k ge 0 z^3 k
              right) \
              &= begincases
              sqrt3 & textif (n equiv 0 pmod3) \
              - sqrt3 & textif (n equiv 1 pmod3 wedge n ge 2) \
              0 & textotherwise
              endcases
              endalign$






              share|cite|improve this answer
























                up vote
                1
                down vote













                Use generating functions. Define $A(z) = sum_n ge 0 y_n z^n$, multiṕly your recurrence by $z^n$, sum over $n ge 0$ and recognize some sums:



                $beginalign
                fracA(z) - y_0 -y_1 zz^2
                + fracA(z) - y_0z + A(z)
                &= 0 \
                fracA(z) - sqrt3z^2
                + fracA(z) - sqrt3z + A(z)
                &= 0
                endalign$



                Solving for $A(z)$:



                $beginalign
                A(z)
                &= frac(1 + z) sqrt31 + z + z^2 \
                &= frac1 - z^21 - z^3 sqrt3
                endalign$



                We need:



                $beginalign
                [z^n] A(z)
                &= [z^n] frac1 - z^21 - z^3 sqrt3 \
                &= sqrt3 [z^n] (1 - z^2) sum_k ge 0 z^3 k \
                &= sqrt3 left(
                [z^n] sum_k ge 0 z^3 k
                - [z^n - 2] sum_k ge 0 z^3 k
                right) \
                &= begincases
                sqrt3 & textif (n equiv 0 pmod3) \
                - sqrt3 & textif (n equiv 1 pmod3 wedge n ge 2) \
                0 & textotherwise
                endcases
                endalign$






                share|cite|improve this answer






















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Use generating functions. Define $A(z) = sum_n ge 0 y_n z^n$, multiṕly your recurrence by $z^n$, sum over $n ge 0$ and recognize some sums:



                  $beginalign
                  fracA(z) - y_0 -y_1 zz^2
                  + fracA(z) - y_0z + A(z)
                  &= 0 \
                  fracA(z) - sqrt3z^2
                  + fracA(z) - sqrt3z + A(z)
                  &= 0
                  endalign$



                  Solving for $A(z)$:



                  $beginalign
                  A(z)
                  &= frac(1 + z) sqrt31 + z + z^2 \
                  &= frac1 - z^21 - z^3 sqrt3
                  endalign$



                  We need:



                  $beginalign
                  [z^n] A(z)
                  &= [z^n] frac1 - z^21 - z^3 sqrt3 \
                  &= sqrt3 [z^n] (1 - z^2) sum_k ge 0 z^3 k \
                  &= sqrt3 left(
                  [z^n] sum_k ge 0 z^3 k
                  - [z^n - 2] sum_k ge 0 z^3 k
                  right) \
                  &= begincases
                  sqrt3 & textif (n equiv 0 pmod3) \
                  - sqrt3 & textif (n equiv 1 pmod3 wedge n ge 2) \
                  0 & textotherwise
                  endcases
                  endalign$






                  share|cite|improve this answer












                  Use generating functions. Define $A(z) = sum_n ge 0 y_n z^n$, multiṕly your recurrence by $z^n$, sum over $n ge 0$ and recognize some sums:



                  $beginalign
                  fracA(z) - y_0 -y_1 zz^2
                  + fracA(z) - y_0z + A(z)
                  &= 0 \
                  fracA(z) - sqrt3z^2
                  + fracA(z) - sqrt3z + A(z)
                  &= 0
                  endalign$



                  Solving for $A(z)$:



                  $beginalign
                  A(z)
                  &= frac(1 + z) sqrt31 + z + z^2 \
                  &= frac1 - z^21 - z^3 sqrt3
                  endalign$



                  We need:



                  $beginalign
                  [z^n] A(z)
                  &= [z^n] frac1 - z^21 - z^3 sqrt3 \
                  &= sqrt3 [z^n] (1 - z^2) sum_k ge 0 z^3 k \
                  &= sqrt3 left(
                  [z^n] sum_k ge 0 z^3 k
                  - [z^n - 2] sum_k ge 0 z^3 k
                  right) \
                  &= begincases
                  sqrt3 & textif (n equiv 0 pmod3) \
                  - sqrt3 & textif (n equiv 1 pmod3 wedge n ge 2) \
                  0 & textotherwise
                  endcases
                  endalign$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Oct 27 '15 at 0:07









                  vonbrand

                  19.7k62957




                  19.7k62957



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1499090%2fsolving-a-linear-recurrence-relation-with-complex-roots%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      這個網誌中的熱門文章

                      tkz-euclide: tkzDrawCircle[R] not working

                      How to combine Bézier curves to a surface?

                      1st Magritte Awards