Difference Equation - Non Homogeneous need help
Hi
Can someone help me with this and provide a step by step response?
Suppose I have the following difference equation:
$\displaystyle u_{n}= -u_{n-1}+6u_{n-2} +7$ with
$\displaystyle u_{0} =1, u_{1} =2$
I have solved the characteristic eqn to be $\displaystyle \lambda = 2,-3$
But how do I go about solving the particular solution?
Many thanks in advance!
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
zzizi
Hi
Can someone help me with this and provide a step by step response?
Suppose I have the following difference equation:
$\displaystyle u_{n}= -u_{n-1}+6u_{n-2} +7$ with
$\displaystyle u_{0} =1, u_{1} =2$
I have solved the characteristic eqn to be $\displaystyle \lambda = 2,-3$
But how do I go about solving the particular solution?
Many thanks in advance!
Hi zzizi! :)
Wiki explains it better than I can:
Recurrence relation - Wikipedia, the free encyclopedia
The equation in the above example was [[homogeneous differential equation|homogeneous]], in that there was no constant term. If one starts with the non-homogeneous recurrence
$\displaystyle b_{n}=Ab_{n-1}+Bb_{n-2}+K$
with constant term ''K'', this can be converted into homogeneous form as follows: The [[steady state]] is found by setting $\displaystyle b_n = b_{n-1} =b_{n-2} = b^*$ to obtain
$\displaystyle b^{*} = \frac{K}{1-A-B}$
Then the non-homogeneous recurrence can be rewritten in homogeneous form as
$\displaystyle [b_n - b^{*}]=A[b_{n-1}-b^{*}]+B[b_{n-2}-b^{*}]$
which can be solved as above.
Re: Difference Equation - Non Homogeneous need help
I would use the technique of symbolic differencing to obtain a homogeneous linear recurrence:
$\displaystyle u_{n}=-u_{n-1}+6u_{n-2}+7$
$\displaystyle u_{n+1}=-u_{n}+6u_{n-1}+7$
Subtracting the former from the latter, we obtain:
$\displaystyle u_{n+1}=7u_{n-1}-6u_{n-2}$
The characteristic roots are $\displaystyle r=-3,\,1,\,2$ hence the closed form is:
$\displaystyle u_n=k_1(-3)^n+k_2+k_32^n$
We may use initial conditions to determine the parameters $\displaystyle k_i$:
$\displaystyle u_0=k_1+k_2+k_3=1$
$\displaystyle u_1=-3k_1+k_2+2k_3=2$
$\displaystyle 3_2=9k_1+k_2+4k_3=11$
Solving this system, we find:
$\displaystyle k_1=\frac{7}{20},\,k_2=-\frac{7}{4},\,k_3=\frac{12}{5}$ and so we have:
$\displaystyle u_n=\frac{7(-3)^n+3\cdot2^{n+4}-35}{20}$
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
ILikeSerena
Hi zzizi! :)
Wiki explains it better than I can:
Recurrence relation - Wikipedia, the free encyclopedia
The equation in the above example was [[homogeneous differential equation|homogeneous]], in that there was no constant term. If one starts with the non-homogeneous recurrence
$\displaystyle b_{n}=Ab_{n-1}+Bb_{n-2}+K$
Thank you very much, for your reply.
So I was incorrect to think it was non-homogeneous?
I wasn't aware that it could be solved this way, so I will have to perhaps look into it further.
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
MarkFL2
I would use the technique of symbolic differencing to obtain a homogeneous linear recurrence:
$\displaystyle u_{n}=-u_{n-1}+6u_{n-2}+7$
$\displaystyle u_{n+1}=-u_{n}+6u_{n-1}+7$
Subtracting the former from the latter, we obtain:
$\displaystyle u_{n+1}=7u_{n-1}-6u_{n-2}$
The characteristic roots are $\displaystyle r=-3,\,1,\,2$ hence the closed form is:
$\displaystyle u_n=k_1(-3)^n+k_2+k_32^n$
We may use initial conditions to determine the parameters $\displaystyle k_i$:
$\displaystyle u_0=k_1+k_2+k_3=1$
$\displaystyle u_1=-3k_1+k_2+2k_3=2$
$\displaystyle 3_2=9k_1+k_2+4k_3=11$
Solving this system, we find:
$\displaystyle k_1=\frac{7}{20},\,k_2=-\frac{7}{4},\,k_3=\frac{12}{5}$ and so we have:
$\displaystyle u_n=\frac{7(-3)^n+3\cdot2^{n+4}-35}{20}$
Thank you very much for this solution.
How would I go about checking it? I tried to find u(3) from the original recursion and the closed form but they didn't correlate.
Re: Difference Equation - Non Homogeneous need help
From the inhomogeneous recurrence you gave:
$\displaystyle u_2=-2+6+7=11$
$\displaystyle u_3=-11+12+7=8$
Using the closed form I gave:
$\displaystyle u_3=\frac{7(-3)^3+3(2)^7-35}{20}=\frac{160}{20}=8$
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
zzizi
Thank you very much, for your reply.
So I was incorrect to think it was non-homogeneous?
I wasn't aware that it could be solved this way, so I will have to perhaps look into it further.
You were right. It is non-homogeneous.
In your case you have
Quote:
Originally Posted by
zzizi
$\displaystyle u_{n}= -u_{n-1}+6u_{n-2} +7$ with
$\displaystyle u_{0} =1, u_{1} =2$
I have solved the characteristic eqn to be $\displaystyle \lambda = 2,-3$
If you compare that to$\displaystyle b_{n}=Ab_{n-1}+Bb_{n-2}+K$
you'll see that you have:$\displaystyle b_n = u_n$
$\displaystyle A = -1$
$\displaystyle B = 6$
$\displaystyle K = 7$
$\displaystyle b^{*} = \frac{K}{1-A-B} = \frac{7}{1-(-1)-6} = - \frac 7 4$
As a result, your solution takes the form:$\displaystyle u_n = C (-3)^n + D 2^n + b^{*}$
If you fill in your boundary conditions, you get 2 equations with 2 unknowns (C and D), which can be solved with substitution.
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
MarkFL2
From the inhomogeneous recurrence you gave:
$\displaystyle u_2=-2+6+7=11$
$\displaystyle u_3=-11+12+7=8$
Using the closed form I gave:
$\displaystyle u_3=\frac{7(-3)^3+3(2)^7-35}{20}=\frac{160}{20}=8$
Umm ... I guess I miscounted (Giggle)
Thanks MarkFL2 :D I just saw your response on yahoo answers!!
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
ILikeSerena
You were right. It is non-homogeneous.
In your case you have
If you compare that to
$\displaystyle b_{n}=Ab_{n-1}+Bb_{n-2}+K$
you'll see that you have:
$\displaystyle b_n = u_n$
$\displaystyle A = -1$
$\displaystyle B = 6$
$\displaystyle K = 7$
$\displaystyle b^{*} = \frac{K}{1-A-B} = \frac{7}{1-(-1)-6} = - \frac 7 4$
As a result, your solution takes the form:
$\displaystyle u_n = C (-3)^n + D 2^n + b^{*}$
If you fill in your boundary conditions, you get 2 equations with 2 unknowns (C and D), which can be solved with substitution.
Thank you very much for your explanation! Much appreciated.
Re: Difference Equation - Non Homogeneous need help
I have a query;
Is there another way, by substituting values to find the particular solution?
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
ILikeSerena
You were right. It is non-homogeneous.
In your case you have
If you compare that to
$\displaystyle b_{n}=Ab_{n-1}+Bb_{n-2}+K$
you'll see that you have:
$\displaystyle b_n = u_n$
$\displaystyle A = -1$
$\displaystyle B = 6$
$\displaystyle K = 7$
$\displaystyle b^{*} = \frac{K}{1-A-B} = \frac{7}{1-(-1)-6} = - \frac 7 4$
As a result, your solution takes the form:
$\displaystyle u_n = C (-3)^n + D 2^n + b^{*}$
If you fill in your boundary conditions, you get 2 equations with 2 unknowns (C and D), which can be solved with substitution.
What if I end up with zero for the b* value? I used this method to solve my difference equation but I got zero for the constant. If this happens would the whole solution be complete or do I try another method?
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
zzizi
What if I end up with zero for the b* value? I used this method to solve my difference equation but I got zero for the constant. If this happens would the whole solution be complete or do I try another method?
The only way that b* can be zero is if the constant K is zero.
In that case the difference equation is a homogeneous difference equation instead of an in-homogeneous one.
But this is not applicable to your current problem statement.....
Am I misunderstanding you?
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
ILikeSerena
The only way that b* can be zero is if the constant K is zero.
In that case the difference equation is a homogeneous difference equation instead of an in-homogeneous one.
But this is not applicable to your current problem statement.....
Am I misunderstanding you?
You are quite right. I wanted to understand the concept because I have another problem for my homework that I am working which is like this:
$\displaystyle u_{n}= -3u_{n-1}+4u_{n-2}+9 $
When I applied the formula I got this:
$\displaystyle b^{*} = \frac{K}{1-A-B} = \frac{9}{1-(-3)-4} = 0$
SO would this be considered a homogeneous D.Eqn?
Re: Difference Equation - Non Homogeneous need help
Quote:
Originally Posted by
zzizi
You are quite right. I wanted to understand the concept because I have another problem for my homework that I am working which is like this:
$\displaystyle u_{n}= -3u_{n-1}+4u_{n-2}+9 $
When I applied the formula I got this:
$\displaystyle b^{*} = \frac{K}{1-A-B} = \frac{9}{1-(-3)-4} = 0$
I just wondered what I should do in this situation
I'm afraid you miscalculated b*.
$\displaystyle b^* = \frac 9 0 = \infty$
Either way, it means this method does not work.
Next method in line is the symbolic differentiation method MarkFL2 described.
That one works for this problem.
Re: Difference Equation - Non Homogeneous need help