How Do You Solve Linear Difference Equations with Initial Conditions?

In summary, the conversation discusses a linear difference equation and finding its solution by using a homogeneous and particular solution. The process involves substituting the particular solution into the original equation and solving for the coefficients. The final solution is found by combining the homogeneous and particular solutions.
  • #1
cshum00
215
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
  • #2
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.
 
  • #3
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.
 
  • #4
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,

[tex]a x + b = 2x + 5[/tex]

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:
  • #5
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:
  • #6
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:

What are difference equations?

Difference equations are mathematical equations that describe the evolution of a quantity over discrete time intervals. They are often used in fields such as economics, biology, and engineering to model systems that change over time.

Why are difference equations important?

Difference equations allow scientists to model and predict the behavior of systems that involve discrete changes or events. They can also help identify patterns and trends in data and provide insights into the underlying mechanisms of a system.

How are difference equations different from differential equations?

Difference equations involve changes in a quantity over discrete time intervals, while differential equations involve changes in a quantity over continuous time intervals. Difference equations are typically used for discrete systems, while differential equations are used for continuous systems.

What are some common applications of difference equations?

Difference equations are commonly used in fields such as economics, finance, biology, physics, and engineering. They can be used to model population growth, financial markets, chemical reactions, and many other systems that involve discrete changes over time.

How can difference equations be solved?

Difference equations can be solved analytically using mathematical techniques such as recursion, iteration, and linear algebra. They can also be solved numerically using computer software or programming languages such as MATLAB or Python.

Similar threads

Replies
2
Views
250
Replies
4
Views
777
  • General Math
Replies
1
Views
267
  • General Math
Replies
3
Views
758
Replies
4
Views
416
Replies
7
Views
1K
Replies
2
Views
1K
Replies
36
Views
6K
  • Precalculus Mathematics Homework Help
Replies
14
Views
274
  • General Math
Replies
4
Views
1K
Back
Top