Inhomogeneous recursion relations $a_n-3a_{n-1}=2n-7$ with $a_1=4$

154 Views Asked by At

I'm trying to freshen up my knowledge about inhomogeneous recurrence relations.

Im currently trying to solve $$a_n-3a_{n-1}=2n-7$$ $$\forall n>1, a_1=4$$

I have a question regarding a specific step in my solution, and that is the second term in the inhomogeneous part: $-7$, and how to solve it.

From what I learned, when dealing with constant term, I simply set $$a_n=D$$ where $$D \in \mathbb R$$ as long as $1$ is not a root in our homogenous part, where it is not in my case.

This gives me following $$a_n-3a_{n-1}=-7 \Rightarrow D-3D=-7$$

However, this ends up in the wrong answer, which is 2.

Would anyone mind helping me out, what part of the solution I'm not getting?

The part that seems strange to me is that when dealing with constant, and solving it how I learned, it does not take into consideration if we have $a_n$ or $a_{n-1}$ and so on, since the constant does not depend on $n$?

$\textbf{EDIT: My solution below}$

$\bullet$ Homogenous part

$$a_n-3a_{n-1}=0$$ $$r-3=0$$ $$r=3$$

$$\Rightarrow a_{n,h}=A \cdot (3)^n$$

$\bullet$ Inhomogeneous part: $2n$

$2n$ polynomial of degree 1 so we set $a_n=Bn+C$ to solve for this part.

$$a_{n}=Bn+C$$

$$\Rightarrow a_n-3a_{n-1}-2n=Bn+C-3[B(n-1)+C]-2n$$

$$\Rightarrow B=-1, C=0$$

$$\Rightarrow a_{n,p1}=-n$$

$\bullet$ Inhomogeneous part: $-7$

$-7$ polynomial of degree 0 so we set $a_n=D$

$$a_n=D$$

$$\Rightarrow D-3D=-7$$ $$\Rightarrow D=\frac{7}{2}$$

$$\Rightarrow a_{n,p2}=\frac{7}{2}$$

So $a_n = A \cdot (3)^n - n + \frac{7}{2}$

Which is wrong.

Is it wrong handle these inhomogeneous part by themself? Is that where it fails? Please, explain to me what I'm doing wrong...

Thanks!

4

There are 4 best solutions below

5
On

$a_n = Cn + D + A\cdot 3^n$

$a_{n-1} = C(n-1) + D + A\cdot 3^{n-1}$

The constant term of $a_n - 3a_{n-1}$ is $D - 3D + 3C$, not $D - 3D$

For another example with constant term, $a_n -3 a_{n-1}=-2$ with $a_1 =4$.

Since the inhomogeneous part is a constant term, you can substitute $a_{n,p} =D$ to get the particular solution $a_{n,p}=1$ and $a_n=1+3^n$.


Edited for your last update

To find the general solution of $a_n-3a_{n-1}=2n-7$, decompose $a_n$ into the sum of homogenous and particular solution. $$a_n = a_{n,h} + a_{n,p}$$

  • $a_{n,h} - 3a_{n-1,h} = 0$ $\qquad$ (1)
  • $a_{n,p} - 3a_{n-1,p} = 2n-7$ $\qquad$ (2)

The particular solution is required to satisfy the relation (2).


Using your "Inhomogeneous part: 2n", $\Rightarrow a_n-3a_{n-1}-2n=Bn+C-3[B(n-1)+C]-2n = (-2B-2)n + (3B-2C)$

From (2), we get \begin{cases} -2B-2 &= 0\\ 3B-2C &= -7 \end{cases} $$B=-1, C=2$$

So $a_{n,p}= - n +2$.

Then continuing using $a_1=4$ and $a_{n,h}= A\cdot 3^n$, you get $a_{1,p}= - 1 +2=1$, $a_{1,h}= 3A$.

Since $a_1=a_1^h+a_1^p$, $$4=3A+1 \implies A=1$$

the general solution is $a_n= 3^n - n +2$.


Your approach

Now to split up the particular solution into two part $$a_n = a_{n,h} + a_{n,p1} + a_{n,p2}$$

  • $a_{n,h} - 3a_{n-1,h} = 0$ $\qquad$ (1)
  • $a_{n,p1} - 3a_{n-1,p1} = 2n$ $\qquad$ (2)
  • $a_{n,p2} - 3a_{n-1,p2} = -7$ $\qquad$ (3)

In your "Inhomogeneous part: 2n", you make a minor mistake. $\Rightarrow a_n-3a_{n-1}-2n=Bn+C-3[B(n-1)+C]-2n= (-2B-2)n +(3B-2C)$

From (2), \begin{cases} -2B-2 &= 0\\ 3B-2C &= 0 \end{cases} $$B=-1, C=\frac{-3}{2}$$

So $a_{n,p}=a_{n,p1}+a_{n,p2}=(-n+\frac{-3}{2})+\frac{7}{2} =-n+2$.

0
On

The characteristic equation of the recurrence:

$$ a_n - 3 a_{n - 1} = 2n - 7 $$

is:

$$ \lambda - 3 = 0 $$

And so $\lambda = 3$ which means the homogenous part of the recurrence $a_{nh}$ is:

$$ a_{nh} = \alpha 3^n $$

for some constant $\alpha$. The particular part $a_{np}$ of the recurrence relation is usually guessed. Here we assume it to be of the form $\beta n + \gamma $ for constants $\beta, \gamma$ which means the general solution is of the form:

$$ a_n = a_{nh} + a_{np} = \alpha 3^n + \beta n + \gamma $$

We compute the coefficients based on the first few values of the recurrence at $n = 1, 2, 3$:

$$ a_1 = 4 = 3 \alpha + \beta + \gamma $$ $$ a_2 = 9 = 9 \alpha + 2\beta + \gamma $$ $$ a_3 = 26 = 27 \alpha + 3\beta + \gamma $$

Solving the above three equations we find the values of the coefficients, $\alpha = 1$, $\beta = -1$, $\gamma = 2$, which means the general form of the recurrence is:

$$ a_n = 3^n - n + 2 $$

Which we can verify using induction.

0
On

$$a_n-3a_{n-1}=2n-7$$ $$a_n=b_n-n \qquad \implies \qquad b_n-3b_{n-1}=4$$ $$b_n=c_n+2\qquad \implies \qquad c_n-3c_{n-1}=0$$

0
On

I would approach the problem as follows: First, let's generalize this to

$$T_n=AT_{n-1}+Bn+C$$

Assume that $T_n=f_n+pn+q$ so that

$$f_n=Af_{n-1}+n(Ap+B-p)+(-Ap+Aq-q+C)$$

Now eliminate the homogeneous terms by choosing

$$p=\frac{-B}{A-1},\quad q=\frac{pA-C}{A-1}$$

so that $f_n=Af_{n-1}$, and (by induction, or otherwise)

$$f_n=f_1A^{n-1}$$

where $f_1=T_1-p-q$

We can now specialize to your problem. With $A=3,\ B=2,\ C=-7,\ a_1=4$ we find that $p=-1,\ q=2,\ f_1=3$ and finally we have

$$a_n=3^{n}-n+2$$

I have verified this result numerically.