How Do You Solve Linear Difference Equations with Initial Conditions?

  • Thread starter Thread starter cshum00
  • Start date Start date
  • Tags Tags
    Difference Stuck
cshum00
Messages
215
Reaction score
0
Hello. I am stuck with linear difference equations and i would like some help.

I was given that y(k) = y(k)homogeneous + y(k)particular and i am asked to solve the linear equation:

y(k+1) + y(k) = k
with initial condition y(0) = 0

the homogeneous solution is
y(k+1) + y(k) = 0
n + 1 = 0
n = 1
y(k)homogeneous = C(-1)^k
y(0) = 0 = C(-1)^0
C = 0
y(k)homogeneous = 0

then the particular solution
y(k)particular = Bv0*(K) + Bv1
then they tell to substitute this particular equation to the original y(k+1) + y(k) = k
and after i do so, i should get
Bv0=1/2 and B1=-1/4

However, no matter how i substitute i can't get the answer.
Maybe i am substituting the wrong thing. Can anyone show me the substitution process which leads to the mentioned result of Bv0 and Bv1?

Thanks.
 
Mathematics news on Phys.org
y(k+1) + y(k) = k
Bv0*(k+1) + Bv1 + Bv0*(k) + Bv1 = k
2Bv0*k + (Bv0 + 2*Bv1) = k
2Bv0 = 1, Bv0 + 2*Bv1 = 0

Solving gives what you're told it should.
 
I am able to get to this point
2Bv0*k + (Bv0 + 2*Bv1) = k

Then you let k =1
2Bv0 = 1, Bv0 + 2*Bv1 = 0
but why 1? why not another number? how do i know what number should it be?

Also the second part is grouped in parenthesis but is not a root, how come you are allowed to do that?

Sorry if the questions are silly but i am really confused.

Thanks.
 
Then you let k =1

No you are totally mis-understanding what's going on.

k is the variable in the equation (like perhaps you may be familar with using say x or t in a continuous system).

So imagine you had to solve the following equation (assummed true for all x) for the unknowns a and b,

a x + b = 2x + 5

You see how I solve that equation to get a = 2 and b = 5 right. There was no setting x=1 or anything of the sort involved. Your situation involves exactly the same type of thing, can you follow?
 
Last edited:
cshum00 said:
Hello. I am stuck with linear difference equations and i would like some help.

I was given that y(k) = y(k)homogeneous + y(k)particular and i am asked to solve the linear equation:

y(k+1) + y(k) = k
with initial condition y(0) = 0

the homogeneous solution is
y(k+1) + y(k) = 0
n + 1 = 0
n = 1
Typo. You mean n= -1.

y(k)homogeneous = C(-1)^k
y(0) = 0 = C(-1)^0
C = 0
y(k)homogeneous = 0
No. It is not the solution to the associated homogenous equation that is 0 when k= 0, it is the entire solution. Don't solve for C until you have the entire equation.

then the particular solution
y(k)particular = Bv0*(K) + Bv1
then they tell to substitute this particular equation to the original y(k+1) + y(k) = k
and after i do so, i should get
Bv0=1/2 and B1=-1/4
Yes, assuming a solution of the form yk= Ak+ B (I find "Bv0" and "Bv1" confusing and much too much work to type!) then yk+1= A(k+1)+ B= Ak+ A+ b so the equation yk+1+ yk= k becomes (Ak+ A+ B)+ (Ak+ B)= k. Doing the algebra, 2Ak+ A+2B= k. For that to be true for all k, we must have 2A= 1 and A+ 2B= 0. From the first, A= 1/2 and then 1/2+ 2B= 0 so B= -1/4.

However, no matter how i substitute i can't get the answer.
Maybe i am substituting the wrong thing. Can anyone show me the substitution process which leads to the mentioned result of Bv0 and Bv1?

Thanks.
As I said before, don't solve for C until you have the entire solution. The general solution to the equation is yk= C(-1)k+ (1/2)k- 1/4. Now, y0= C(-1)0+ (1/2)(0)- 1/4= C- 1/4= 0 so C= 1/4. The solution to your problem is yk= (1/4)(-1)k+ (1/2)k- 1/4.
 
Last edited by a moderator:
I see it is solving coefficients. I don't remember being taught that but thanks to clear things out.

Yes, it was (n = -1). My fault.

Sorry about the notations but i was just following the book; and i didn't know you could write superscripts and subscripts in this forum neither.

Anyway, thanks everyone for your help.
 
Last edited:
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.
Back
Top