Did I correctly derive this recurrence equation formula
Clash 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?
recurrence-relations
add a comment |Â
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?
recurrence-relations
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
add a comment |Â
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?
recurrence-relations
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?
recurrence-relations
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
add a comment |Â
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
add a comment |Â
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$.
add a comment |Â
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.$$
add a comment |Â
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$.
add a comment |Â
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$.
add a comment |Â
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$.
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$.
answered Aug 16 at 6:32
Claude Leibovici
112k1055127
112k1055127
add a comment |Â
add a comment |Â
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.$$
add a comment |Â
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.$$
add a comment |Â
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.$$
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.$$
edited Aug 16 at 6:51
answered Aug 16 at 6:36
Yves Daoust
112k665207
112k665207
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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