Can Anyone Solve This Difference Equation Using Generating Functions?

In summary, the conversation discusses a problem with solving a difference equation and finding the homogeneous solution, particular solution, and general solution using the method of undetermined coefficients. The solution is found to be a combination of constants and functions of the form $k_1+k_23^n-\frac{1}{2}\left(2^{n+3}+3n\right)$, with values for the parameters $k_i$ determined using given initial values. The possibility of using a generating function is also mentioned.
  • #1
Puzzles
21
0
Can anyone help me solve this? Text goes: solve the difference equation first directly, then with generating functions
View attachment 6545

I've been stuck with it for hours. I have no idea what to do with "2n+3". We don't have anything about this special case in my textbook, and I can't seem to find anything online... any help would be much appreciated.
 

Attachments

  • dm1.png
    dm1.png
    1.7 KB · Views: 79
Physics news on Phys.org
  • #2
First, we want to find the homogeneous solution $h_n$...have you done that? If so, what do you have?
 
  • #3
From what I've understood, the homogeneous solution should look like:

r2 - 4r + 3 = 0

with roots: r1 = 1 and r2 = 3

Because of r1 = 1, we get: an = n(A0 + nA1)

I'm sorry if this is incorrect.
 
  • #4
You've correctly identified the characteristic roots, and so the homogeneous solution is:

\(\displaystyle h_n=k_1(1)^n+k_23^n=k_1+k_23^n\)

We will be able to determine the values of the parameters $k_i$ once we have the particular solution. To do that we can use the method of undetermined coefficients. Let's write the difference equation in the form:

\(\displaystyle a_{n}-4a_{n-1}+3a_{n-2}=2^n+3\)

Now, looking at the form of the RHS, and observing that we already have a constant in our homogeneous solution, we conclude that our particular solution $p_n$, will have the form:

\(\displaystyle p_n=A2^n+Bn\)

So, what you want to do now, is write:

\(\displaystyle p_{n}-4p_{n-1}+3p_{n-2}=2^n+3\)

Substitute in the form we found for $p_n$, and then simplify and equate like coefficients on either side of the equation to determine $A$ and $B$. What do you get?
 
  • #5
I'm sorry, but I really have no idea.
 
  • #6
Okay, if we make the substitution, we get:

\(\displaystyle \left(A2^n+Bn\right)-4\left(A2^{n-1}+B(n-1)\right)+3\left(A2^{n-2}+B(n-2)\right)=2^n+3\)

Distributing, we get:

\(\displaystyle A2^n+Bn-4A2^{n-1}-4B(n-1)+3A2^{n-2}+3B(n-2)=2^n+3\)

\(\displaystyle A2^n+Bn-4A2^{n-1}-4Bn+4B+3A2^{n-2}+3Bn-6B=2^n+3\)

Combine like terms:

\(\displaystyle A2^n-4A2^{n-1}+3A2^{n-2}-2B=2^n+3\)

Now, let's multiply through by $2^{2-n}\ne0$ to get:

\(\displaystyle A2^2-4A2^{1}+3A2^{0}-2B2^{2-n}=2^{2}+3\cdot2^{2-n}\)

Simplify:

\(\displaystyle -A-2B2^{2-n}=4+3\cdot2^{2-n}\)

From this, we conclude:

\(\displaystyle A=-4,\,B=-\frac{3}{2}\)

And so our particular solution is:

\(\displaystyle p_n=-4\cdot2^n-\frac{3}{2}n=-\frac{1}{2}\left(2^{n+3}+3n\right)\)

And so, by the principle of superposition, then general solution to the given difference equation is:

\(\displaystyle a_n=h_n+p_n=k_1+k_23^n-\frac{1}{2}\left(2^{n+3}+3n\right)\)

Now we can use the given initial values to determine the values of the parameters $k_i$...

\(\displaystyle a_0=k_1+k_2-\frac{1}{2}\left(2^{3}+3(0)\right)=1\)

\(\displaystyle a_1=k_1+3k_2-\frac{1}{2}\left(2^{4}+3(1)\right)=4\)

Solving this system, what do you find?
 
  • #7
k1 = 3/4
k2​ = 17/4

Do I just replace these in the homogeneous solution and get the final solution?
 
  • #8
Puzzles said:
k1 = 3/4
k2​ = 17/4

Do I just replace these in the homogeneous solution and get the final solution?

You would use those values in the general solution:

\(\displaystyle a_n=\frac{3}{4}+\frac{17}{4}3^n-\frac{1}{2}\left(2^{n+3}+3n\right)=\frac{1}{4}\left(17\cdot3^n-2^{n+4}-6n+3\right)\)
 
  • #9
MarkFL said:
You would use those values in the general solution:

\(\displaystyle a_n=\frac{3}{4}+\frac{17}{4}3^n-\frac{1}{2}\left(2^{n+3}+3n\right)=\frac{1}{4}\left(17\cdot3^n-2^{n+4}-6n+3\right)\)

Thank you very, very much, and I'm sorry for being useless throughout this.
 
  • #10
Puzzles said:
Thank you very, very much, and I'm sorry for being useless throughout this.

I wouldn't say you were "useless"...you did correctly identify several quantities. :D

As far as using a generating function to get the solution, I would have to wait until someone more knowledgeable can chime in. That's something I never learned. :D
 

FAQ: Can Anyone Solve This Difference Equation Using Generating Functions?

What is a difference equation?

A difference equation is a mathematical equation that describes a relationship between the current value of a variable and its previous value. It is often used to model the behavior of dynamic systems or processes over discrete time intervals.

How is a difference equation different from a differential equation?

A difference equation involves discrete time intervals, while a differential equation involves continuous time intervals. Difference equations are often used in discrete systems, such as computer simulations, while differential equations are used in continuous systems, such as physical systems.

Can difference equations be solved analytically?

Yes, some difference equations can be solved analytically using methods such as substitution, elimination, or iteration. However, many complex difference equations require numerical methods for solutions.

How are difference equations used in science?

Difference equations are used in many scientific fields, including physics, biology, economics, and computer science. They are often used to model the behavior of systems that change over time, such as population growth, chemical reactions, and electrical circuits.

What are some common techniques for solving difference equations?

Some common techniques for solving difference equations include forward and backward substitution, the method of undetermined coefficients, and the method of iteration. Advanced numerical methods, such as Euler's method or Runge-Kutta methods, can also be used for more complex difference equations.

Back
Top