MHB Can Anyone Solve This Difference Equation Using Generating Functions?

Puzzles
Messages
21
Reaction score
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: 103
Physics news on Phys.org
First, we want to find the homogeneous solution $h_n$...have you done that? If so, what do you have?
 
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.
 
You've correctly identified the characteristic roots, and so the homogeneous solution is:

$$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:

$$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:

$$p_n=A2^n+Bn$$

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

$$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?
 
I'm sorry, but I really have no idea.
 
Okay, if we make the substitution, we get:

$$\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:

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

$$A2^n+Bn-4A2^{n-1}-4Bn+4B+3A2^{n-2}+3Bn-6B=2^n+3$$

Combine like terms:

$$A2^n-4A2^{n-1}+3A2^{n-2}-2B=2^n+3$$

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

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

Simplify:

$$-A-2B2^{2-n}=4+3\cdot2^{2-n}$$

From this, we conclude:

$$A=-4,\,B=-\frac{3}{2}$$

And so our particular solution is:

$$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:

$$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$...

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

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

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

Do I just replace these in the homogeneous solution and get the final solution?
 
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:

$$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)$$
 
MarkFL said:
You would use those values in the general solution:

$$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
 
Back
Top