Trouble solving recursive function [closed]
$begingroup$
I have trouble solving a (what looks like very easy) recursive function
$a_0 = 0 \ a_n = 2a_{n-1}+3$
Hints/Techniques for how to solve this would be highly appreciated!
Thanks :)
discrete-mathematics recurrence-relations recursion
$endgroup$
closed as off-topic by Holo, José Carlos Santos, Did, amWhy, RRL Dec 31 '18 at 15:35
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Holo, José Carlos Santos, Did, amWhy, RRL
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
$begingroup$
I have trouble solving a (what looks like very easy) recursive function
$a_0 = 0 \ a_n = 2a_{n-1}+3$
Hints/Techniques for how to solve this would be highly appreciated!
Thanks :)
discrete-mathematics recurrence-relations recursion
$endgroup$
closed as off-topic by Holo, José Carlos Santos, Did, amWhy, RRL Dec 31 '18 at 15:35
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Holo, José Carlos Santos, Did, amWhy, RRL
If this question can be reworded to fit the rules in the help center, please edit the question.
$begingroup$
Just try to go backwards. $$a_n=2a_{n-1}+3=2left(2a_{n-2}+3right)+3=dots$$ till the last termin $a_0$
$endgroup$
– CarlIO
Dec 31 '18 at 10:57
$begingroup$
For your work: $$a_n=-3+3cdot 2^n$$
$endgroup$
– Dr. Sonnhard Graubner
Dec 31 '18 at 11:03
add a comment |
$begingroup$
I have trouble solving a (what looks like very easy) recursive function
$a_0 = 0 \ a_n = 2a_{n-1}+3$
Hints/Techniques for how to solve this would be highly appreciated!
Thanks :)
discrete-mathematics recurrence-relations recursion
$endgroup$
I have trouble solving a (what looks like very easy) recursive function
$a_0 = 0 \ a_n = 2a_{n-1}+3$
Hints/Techniques for how to solve this would be highly appreciated!
Thanks :)
discrete-mathematics recurrence-relations recursion
discrete-mathematics recurrence-relations recursion
asked Dec 31 '18 at 10:54
nequalstimnequalstim
51
51
closed as off-topic by Holo, José Carlos Santos, Did, amWhy, RRL Dec 31 '18 at 15:35
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Holo, José Carlos Santos, Did, amWhy, RRL
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by Holo, José Carlos Santos, Did, amWhy, RRL Dec 31 '18 at 15:35
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Holo, José Carlos Santos, Did, amWhy, RRL
If this question can be reworded to fit the rules in the help center, please edit the question.
$begingroup$
Just try to go backwards. $$a_n=2a_{n-1}+3=2left(2a_{n-2}+3right)+3=dots$$ till the last termin $a_0$
$endgroup$
– CarlIO
Dec 31 '18 at 10:57
$begingroup$
For your work: $$a_n=-3+3cdot 2^n$$
$endgroup$
– Dr. Sonnhard Graubner
Dec 31 '18 at 11:03
add a comment |
$begingroup$
Just try to go backwards. $$a_n=2a_{n-1}+3=2left(2a_{n-2}+3right)+3=dots$$ till the last termin $a_0$
$endgroup$
– CarlIO
Dec 31 '18 at 10:57
$begingroup$
For your work: $$a_n=-3+3cdot 2^n$$
$endgroup$
– Dr. Sonnhard Graubner
Dec 31 '18 at 11:03
$begingroup$
Just try to go backwards. $$a_n=2a_{n-1}+3=2left(2a_{n-2}+3right)+3=dots$$ till the last termin $a_0$
$endgroup$
– CarlIO
Dec 31 '18 at 10:57
$begingroup$
Just try to go backwards. $$a_n=2a_{n-1}+3=2left(2a_{n-2}+3right)+3=dots$$ till the last termin $a_0$
$endgroup$
– CarlIO
Dec 31 '18 at 10:57
$begingroup$
For your work: $$a_n=-3+3cdot 2^n$$
$endgroup$
– Dr. Sonnhard Graubner
Dec 31 '18 at 11:03
$begingroup$
For your work: $$a_n=-3+3cdot 2^n$$
$endgroup$
– Dr. Sonnhard Graubner
Dec 31 '18 at 11:03
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
- Write out the first few terms.
- Notice that they're divisible by $3$.
- Divide them by $3$.
- Recognise the resulting sequence.
- Prove your formula by induction.
$endgroup$
add a comment |
$begingroup$
Hint
A small trick for such kind of recurrence relation $$a_n=2a_{n-1}+3$$
Let $a_n=b_n+k$ and replace
$$b_n+k=2b_{n-1}+2k+3implies b_n=2b_{n-1}+k+3$$ If you choose $k+3=0$, what do you find ?
$endgroup$
add a comment |
$begingroup$
One of the ways could be as follows. Write down the formula for $n$-th and $n+1$-th terms. We want to translate the non-homogenous recurrence relation into a homogenous one. This means we want to get rid of the $3$ from the recurrence.
$$
a_n = 2a_{n-1} + 3\
a_{n+1} = 2a_{n} + 3
$$
Subtract both equalities:
$$
a_n - a_{n+1} = 2a_{n-1} + 3 - (2a_{n} + 3) \
-a_{n+1} = 2a_{n-1} - 2a_n - a_n \
a_{n+1} = 3a_n - 2a_{n-1} \
a_{n+1} - 3a_n + 2a_{n-1} = 0
$$
Now writing down a characteristic equation for this you may obtain:
$$
lambda^2 - 3lambda + 2 = 0 iff \
(lambda - 1)(lambda -2) = 0
$$
Thus your recurrence will be in the form:
$$
a_{n} = C_1lambda_1^{n} + C_2lambda_2^{n}
$$
Using initial conditions lets find the coefficients. We're given:
$$
begin{cases}
a_0 = 0 \
a_1 = 3
end{cases}
$$
Now solve a simple linear system:
$$
begin{cases}
C_1(1)^{0} + C_2(2)^{0} = 0\
C_1(1)^{1} + C_2(2)^{1} = 3\
end{cases}
\
begin{cases}
C_1 + C_2 = 0\
C_1 + 2C_2 = 3\
end{cases} \
begin{cases}
C_1 = -3\
C_2 = 3
end{cases}
$$
Thus your recurrence is given by:
$$
a_{n} = -3 + 3cdot2^n
$$
$endgroup$
$begingroup$
This is really taking the long road..
$endgroup$
– Did
Dec 31 '18 at 12:12
$begingroup$
@Did I know, but OP requested for techniques, one of which is solving by characteristic equation
$endgroup$
– roman
Dec 31 '18 at 12:13
$begingroup$
But what they really need (and which might already be in their notes) is the centering $y=x-c$ around the fixed point $c=ac+b$, which reduces each recursion $xto ax+b$ with $ane1$ into the recursion $yto ay$.
$endgroup$
– Did
Dec 31 '18 at 12:16
$begingroup$
@Did Well, I may delete the answer if you think it's not worth it
$endgroup$
– roman
Dec 31 '18 at 12:18
$begingroup$
A more productive option would be to rewrite it carefully along the line I indicated. One could also do nothing and wait for this PSQ to be closed...
$endgroup$
– Did
Dec 31 '18 at 12:21
|
show 1 more comment
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
- Write out the first few terms.
- Notice that they're divisible by $3$.
- Divide them by $3$.
- Recognise the resulting sequence.
- Prove your formula by induction.
$endgroup$
add a comment |
$begingroup$
- Write out the first few terms.
- Notice that they're divisible by $3$.
- Divide them by $3$.
- Recognise the resulting sequence.
- Prove your formula by induction.
$endgroup$
add a comment |
$begingroup$
- Write out the first few terms.
- Notice that they're divisible by $3$.
- Divide them by $3$.
- Recognise the resulting sequence.
- Prove your formula by induction.
$endgroup$
- Write out the first few terms.
- Notice that they're divisible by $3$.
- Divide them by $3$.
- Recognise the resulting sequence.
- Prove your formula by induction.
answered Dec 31 '18 at 10:59
Patrick StevensPatrick Stevens
28.9k52874
28.9k52874
add a comment |
add a comment |
$begingroup$
Hint
A small trick for such kind of recurrence relation $$a_n=2a_{n-1}+3$$
Let $a_n=b_n+k$ and replace
$$b_n+k=2b_{n-1}+2k+3implies b_n=2b_{n-1}+k+3$$ If you choose $k+3=0$, what do you find ?
$endgroup$
add a comment |
$begingroup$
Hint
A small trick for such kind of recurrence relation $$a_n=2a_{n-1}+3$$
Let $a_n=b_n+k$ and replace
$$b_n+k=2b_{n-1}+2k+3implies b_n=2b_{n-1}+k+3$$ If you choose $k+3=0$, what do you find ?
$endgroup$
add a comment |
$begingroup$
Hint
A small trick for such kind of recurrence relation $$a_n=2a_{n-1}+3$$
Let $a_n=b_n+k$ and replace
$$b_n+k=2b_{n-1}+2k+3implies b_n=2b_{n-1}+k+3$$ If you choose $k+3=0$, what do you find ?
$endgroup$
Hint
A small trick for such kind of recurrence relation $$a_n=2a_{n-1}+3$$
Let $a_n=b_n+k$ and replace
$$b_n+k=2b_{n-1}+2k+3implies b_n=2b_{n-1}+k+3$$ If you choose $k+3=0$, what do you find ?
answered Dec 31 '18 at 11:40
Claude LeiboviciClaude Leibovici
123k1157134
123k1157134
add a comment |
add a comment |
$begingroup$
One of the ways could be as follows. Write down the formula for $n$-th and $n+1$-th terms. We want to translate the non-homogenous recurrence relation into a homogenous one. This means we want to get rid of the $3$ from the recurrence.
$$
a_n = 2a_{n-1} + 3\
a_{n+1} = 2a_{n} + 3
$$
Subtract both equalities:
$$
a_n - a_{n+1} = 2a_{n-1} + 3 - (2a_{n} + 3) \
-a_{n+1} = 2a_{n-1} - 2a_n - a_n \
a_{n+1} = 3a_n - 2a_{n-1} \
a_{n+1} - 3a_n + 2a_{n-1} = 0
$$
Now writing down a characteristic equation for this you may obtain:
$$
lambda^2 - 3lambda + 2 = 0 iff \
(lambda - 1)(lambda -2) = 0
$$
Thus your recurrence will be in the form:
$$
a_{n} = C_1lambda_1^{n} + C_2lambda_2^{n}
$$
Using initial conditions lets find the coefficients. We're given:
$$
begin{cases}
a_0 = 0 \
a_1 = 3
end{cases}
$$
Now solve a simple linear system:
$$
begin{cases}
C_1(1)^{0} + C_2(2)^{0} = 0\
C_1(1)^{1} + C_2(2)^{1} = 3\
end{cases}
\
begin{cases}
C_1 + C_2 = 0\
C_1 + 2C_2 = 3\
end{cases} \
begin{cases}
C_1 = -3\
C_2 = 3
end{cases}
$$
Thus your recurrence is given by:
$$
a_{n} = -3 + 3cdot2^n
$$
$endgroup$
$begingroup$
This is really taking the long road..
$endgroup$
– Did
Dec 31 '18 at 12:12
$begingroup$
@Did I know, but OP requested for techniques, one of which is solving by characteristic equation
$endgroup$
– roman
Dec 31 '18 at 12:13
$begingroup$
But what they really need (and which might already be in their notes) is the centering $y=x-c$ around the fixed point $c=ac+b$, which reduces each recursion $xto ax+b$ with $ane1$ into the recursion $yto ay$.
$endgroup$
– Did
Dec 31 '18 at 12:16
$begingroup$
@Did Well, I may delete the answer if you think it's not worth it
$endgroup$
– roman
Dec 31 '18 at 12:18
$begingroup$
A more productive option would be to rewrite it carefully along the line I indicated. One could also do nothing and wait for this PSQ to be closed...
$endgroup$
– Did
Dec 31 '18 at 12:21
|
show 1 more comment
$begingroup$
One of the ways could be as follows. Write down the formula for $n$-th and $n+1$-th terms. We want to translate the non-homogenous recurrence relation into a homogenous one. This means we want to get rid of the $3$ from the recurrence.
$$
a_n = 2a_{n-1} + 3\
a_{n+1} = 2a_{n} + 3
$$
Subtract both equalities:
$$
a_n - a_{n+1} = 2a_{n-1} + 3 - (2a_{n} + 3) \
-a_{n+1} = 2a_{n-1} - 2a_n - a_n \
a_{n+1} = 3a_n - 2a_{n-1} \
a_{n+1} - 3a_n + 2a_{n-1} = 0
$$
Now writing down a characteristic equation for this you may obtain:
$$
lambda^2 - 3lambda + 2 = 0 iff \
(lambda - 1)(lambda -2) = 0
$$
Thus your recurrence will be in the form:
$$
a_{n} = C_1lambda_1^{n} + C_2lambda_2^{n}
$$
Using initial conditions lets find the coefficients. We're given:
$$
begin{cases}
a_0 = 0 \
a_1 = 3
end{cases}
$$
Now solve a simple linear system:
$$
begin{cases}
C_1(1)^{0} + C_2(2)^{0} = 0\
C_1(1)^{1} + C_2(2)^{1} = 3\
end{cases}
\
begin{cases}
C_1 + C_2 = 0\
C_1 + 2C_2 = 3\
end{cases} \
begin{cases}
C_1 = -3\
C_2 = 3
end{cases}
$$
Thus your recurrence is given by:
$$
a_{n} = -3 + 3cdot2^n
$$
$endgroup$
$begingroup$
This is really taking the long road..
$endgroup$
– Did
Dec 31 '18 at 12:12
$begingroup$
@Did I know, but OP requested for techniques, one of which is solving by characteristic equation
$endgroup$
– roman
Dec 31 '18 at 12:13
$begingroup$
But what they really need (and which might already be in their notes) is the centering $y=x-c$ around the fixed point $c=ac+b$, which reduces each recursion $xto ax+b$ with $ane1$ into the recursion $yto ay$.
$endgroup$
– Did
Dec 31 '18 at 12:16
$begingroup$
@Did Well, I may delete the answer if you think it's not worth it
$endgroup$
– roman
Dec 31 '18 at 12:18
$begingroup$
A more productive option would be to rewrite it carefully along the line I indicated. One could also do nothing and wait for this PSQ to be closed...
$endgroup$
– Did
Dec 31 '18 at 12:21
|
show 1 more comment
$begingroup$
One of the ways could be as follows. Write down the formula for $n$-th and $n+1$-th terms. We want to translate the non-homogenous recurrence relation into a homogenous one. This means we want to get rid of the $3$ from the recurrence.
$$
a_n = 2a_{n-1} + 3\
a_{n+1} = 2a_{n} + 3
$$
Subtract both equalities:
$$
a_n - a_{n+1} = 2a_{n-1} + 3 - (2a_{n} + 3) \
-a_{n+1} = 2a_{n-1} - 2a_n - a_n \
a_{n+1} = 3a_n - 2a_{n-1} \
a_{n+1} - 3a_n + 2a_{n-1} = 0
$$
Now writing down a characteristic equation for this you may obtain:
$$
lambda^2 - 3lambda + 2 = 0 iff \
(lambda - 1)(lambda -2) = 0
$$
Thus your recurrence will be in the form:
$$
a_{n} = C_1lambda_1^{n} + C_2lambda_2^{n}
$$
Using initial conditions lets find the coefficients. We're given:
$$
begin{cases}
a_0 = 0 \
a_1 = 3
end{cases}
$$
Now solve a simple linear system:
$$
begin{cases}
C_1(1)^{0} + C_2(2)^{0} = 0\
C_1(1)^{1} + C_2(2)^{1} = 3\
end{cases}
\
begin{cases}
C_1 + C_2 = 0\
C_1 + 2C_2 = 3\
end{cases} \
begin{cases}
C_1 = -3\
C_2 = 3
end{cases}
$$
Thus your recurrence is given by:
$$
a_{n} = -3 + 3cdot2^n
$$
$endgroup$
One of the ways could be as follows. Write down the formula for $n$-th and $n+1$-th terms. We want to translate the non-homogenous recurrence relation into a homogenous one. This means we want to get rid of the $3$ from the recurrence.
$$
a_n = 2a_{n-1} + 3\
a_{n+1} = 2a_{n} + 3
$$
Subtract both equalities:
$$
a_n - a_{n+1} = 2a_{n-1} + 3 - (2a_{n} + 3) \
-a_{n+1} = 2a_{n-1} - 2a_n - a_n \
a_{n+1} = 3a_n - 2a_{n-1} \
a_{n+1} - 3a_n + 2a_{n-1} = 0
$$
Now writing down a characteristic equation for this you may obtain:
$$
lambda^2 - 3lambda + 2 = 0 iff \
(lambda - 1)(lambda -2) = 0
$$
Thus your recurrence will be in the form:
$$
a_{n} = C_1lambda_1^{n} + C_2lambda_2^{n}
$$
Using initial conditions lets find the coefficients. We're given:
$$
begin{cases}
a_0 = 0 \
a_1 = 3
end{cases}
$$
Now solve a simple linear system:
$$
begin{cases}
C_1(1)^{0} + C_2(2)^{0} = 0\
C_1(1)^{1} + C_2(2)^{1} = 3\
end{cases}
\
begin{cases}
C_1 + C_2 = 0\
C_1 + 2C_2 = 3\
end{cases} \
begin{cases}
C_1 = -3\
C_2 = 3
end{cases}
$$
Thus your recurrence is given by:
$$
a_{n} = -3 + 3cdot2^n
$$
edited Dec 31 '18 at 11:44
answered Dec 31 '18 at 11:38
romanroman
2,31121224
2,31121224
$begingroup$
This is really taking the long road..
$endgroup$
– Did
Dec 31 '18 at 12:12
$begingroup$
@Did I know, but OP requested for techniques, one of which is solving by characteristic equation
$endgroup$
– roman
Dec 31 '18 at 12:13
$begingroup$
But what they really need (and which might already be in their notes) is the centering $y=x-c$ around the fixed point $c=ac+b$, which reduces each recursion $xto ax+b$ with $ane1$ into the recursion $yto ay$.
$endgroup$
– Did
Dec 31 '18 at 12:16
$begingroup$
@Did Well, I may delete the answer if you think it's not worth it
$endgroup$
– roman
Dec 31 '18 at 12:18
$begingroup$
A more productive option would be to rewrite it carefully along the line I indicated. One could also do nothing and wait for this PSQ to be closed...
$endgroup$
– Did
Dec 31 '18 at 12:21
|
show 1 more comment
$begingroup$
This is really taking the long road..
$endgroup$
– Did
Dec 31 '18 at 12:12
$begingroup$
@Did I know, but OP requested for techniques, one of which is solving by characteristic equation
$endgroup$
– roman
Dec 31 '18 at 12:13
$begingroup$
But what they really need (and which might already be in their notes) is the centering $y=x-c$ around the fixed point $c=ac+b$, which reduces each recursion $xto ax+b$ with $ane1$ into the recursion $yto ay$.
$endgroup$
– Did
Dec 31 '18 at 12:16
$begingroup$
@Did Well, I may delete the answer if you think it's not worth it
$endgroup$
– roman
Dec 31 '18 at 12:18
$begingroup$
A more productive option would be to rewrite it carefully along the line I indicated. One could also do nothing and wait for this PSQ to be closed...
$endgroup$
– Did
Dec 31 '18 at 12:21
$begingroup$
This is really taking the long road..
$endgroup$
– Did
Dec 31 '18 at 12:12
$begingroup$
This is really taking the long road..
$endgroup$
– Did
Dec 31 '18 at 12:12
$begingroup$
@Did I know, but OP requested for techniques, one of which is solving by characteristic equation
$endgroup$
– roman
Dec 31 '18 at 12:13
$begingroup$
@Did I know, but OP requested for techniques, one of which is solving by characteristic equation
$endgroup$
– roman
Dec 31 '18 at 12:13
$begingroup$
But what they really need (and which might already be in their notes) is the centering $y=x-c$ around the fixed point $c=ac+b$, which reduces each recursion $xto ax+b$ with $ane1$ into the recursion $yto ay$.
$endgroup$
– Did
Dec 31 '18 at 12:16
$begingroup$
But what they really need (and which might already be in their notes) is the centering $y=x-c$ around the fixed point $c=ac+b$, which reduces each recursion $xto ax+b$ with $ane1$ into the recursion $yto ay$.
$endgroup$
– Did
Dec 31 '18 at 12:16
$begingroup$
@Did Well, I may delete the answer if you think it's not worth it
$endgroup$
– roman
Dec 31 '18 at 12:18
$begingroup$
@Did Well, I may delete the answer if you think it's not worth it
$endgroup$
– roman
Dec 31 '18 at 12:18
$begingroup$
A more productive option would be to rewrite it carefully along the line I indicated. One could also do nothing and wait for this PSQ to be closed...
$endgroup$
– Did
Dec 31 '18 at 12:21
$begingroup$
A more productive option would be to rewrite it carefully along the line I indicated. One could also do nothing and wait for this PSQ to be closed...
$endgroup$
– Did
Dec 31 '18 at 12:21
|
show 1 more comment
$begingroup$
Just try to go backwards. $$a_n=2a_{n-1}+3=2left(2a_{n-2}+3right)+3=dots$$ till the last termin $a_0$
$endgroup$
– CarlIO
Dec 31 '18 at 10:57
$begingroup$
For your work: $$a_n=-3+3cdot 2^n$$
$endgroup$
– Dr. Sonnhard Graubner
Dec 31 '18 at 11:03