Ask your own question, for FREE!
Mathematics 14 Online
OpenStudy (dls):

Solve this recurrence using generating functions.

OpenStudy (dls):

\[\Large a_n = a_{n-1} + 2(n-1) , a_0 = 1\]

OpenStudy (dls):

I'll post my attempt, just let me know where did I go wrong.

OpenStudy (dls):

I'd prefer to write out the recurrence like this : \[\Large a_{m+1} = a_{m} + 2m\] \[\Large G(x) = a_0 + a_1 x + a_2 x^2 + ..\] \[\Large x G(x) = a_0 x + a_1 x^2 + a_2 x^3 ..\] Subtract them to get : \[\Large G(x)(1-x) = a_0 + 0x + 2x^2 + 3x^3+..\] Now I am looking for a pattern on RHS so i'd write it like \[\Large G(x)(1-x) = 1 - x + x(1 + 2x^2 + 3x^3...)\] \[\Large G(x)(1-x ) =1 -x + \frac{x}{(1-x)^2}\]

OpenStudy (dls):

My G(x) isn't matching with my textbook so I guess I messed up somewhere, dunno where.

Parth (parthkohli):

so you need to specifically use generating functions here? a saner way is to assume\[a_n = An^2 + Bn + 1\]

OpenStudy (dls):

Yes I need to use generating functions, I don't want to break it up into homogenous and particular solution part thing.

OpenStudy (dls):

\[\Large G(x) = \frac{1-2x+3x^2}{(1-x)^3}\]

Parth (parthkohli):

lol ok, I only know the IITJEE part of generating functions. I'll try though.

OpenStudy (dls):

lol

OpenStudy (dls):

nope..I was geting cubic stuff in numerator while the textbook has max order of 2..so didn't bother

OpenStudy (dls):

Let me try though

OpenStudy (dls):

\[\Large G(x) = \frac{1-2x+3x^2}{(1-x)^3} = \frac{1}{(1-x)^3} +\frac{x(3x-1)}{(1-x)^3}\]

OpenStudy (dls):

I am attaching the screenshot from my textbook. I can't get better than this quality, sorry D: I am not following the textbook method.

ganeshie8 (ganeshie8):

\[ G(x) = \frac{1-2x+3x^2}{(1-x)^3} \\~\\~\\= \frac{1}{(1-x)^3} -2x*\frac{1}{(1-x)^3}+3x^2*\dfrac{1}{(1-x)^3}\]

ganeshie8 (ganeshie8):

still remember the extended binomial theorem for negative exponents ?

OpenStudy (dls):

ofcourse :P

ganeshie8 (ganeshie8):

take a good look at the right hand side expression

ganeshie8 (ganeshie8):

\[ G(x)= \frac{1}{(1-x)^3} -2x*\frac{1}{(1-x)^3}+3x^2*\dfrac{1}{(1-x)^3}\]

ganeshie8 (ganeshie8):

you have 3 fractions. each fraction can be written as a power series using extended binomial theorem, yes ?

OpenStudy (dls):

yes

OpenStudy (dls):

\[\large (1-x)^{-3} = C(-3,0) + C(-3,1)(-x) + C(-3,2)(-x)^2+..\]

OpenStudy (dls):

\[\Large C(-n,r) = (-1)^r C(n+r-1,r)\]

ganeshie8 (ganeshie8):

right, just read below part : |dw:1449999482848:dw|

OpenStudy (dls):

yes that's right

ganeshie8 (ganeshie8):

\[a_n = C(-3, n) - 2*C(-3, n-1) + 3*C(-3, n-2)\]

ganeshie8 (ganeshie8):

just use ur usual formula for converting negative bonomial coefficients to positive

OpenStudy (dls):

\[ a_n = C(n+3-1,n) - 2*C(3+n-1-1,n-1)+3*C(3+n-2-1,n-2)\]

ganeshie8 (ganeshie8):

what happened to (-1)^n things ?

Parth (parthkohli):

you don't need (-1)^n

ganeshie8 (ganeshie8):

why ?

OpenStudy (dls):

\[\ a_n = (-1)^nC(n+2,n) - (-1)^{n-1}2*C(n+1,n-1) + (-1)^{n-2}3*(n,n-2)\]

Parth (parthkohli):

the coefficient of \(x^r\) in the expansion of \((1-x)^{-n}\) is simply\[\binom{n+r-1}{n-1}\]unless the (-1)^n comes from some other place

ganeshie8 (ganeshie8):

Oh right, (-1)^n is not needed

ganeshie8 (ganeshie8):

\[ a_n = C(n+3-1,n) - 2*C(3+n-1-1,n-1)+3*C(3+n-2-1,n-2)\] looks good then

OpenStudy (dls):

but the question was something else :|

ganeshie8 (ganeshie8):

that solution also has the same expression right ?

OpenStudy (dls):

\[\Large G(x) =1 + \frac{x}{(1-x)^3}\] I had got this.

OpenStudy (dls):

\[\Large \Large G(x) =1 + \frac{x}{(1-x)^3} => 1 + x (1-x)^{-3}\] Coefficient of x^n in that => \[\Large C(-3,n)\] or \[\Large C(n+2,n)\]

ganeshie8 (ganeshie8):

that doesn't look good

OpenStudy (dls):

sorry, forgot that x was there

OpenStudy (dls):

so we need coeff of x^n-1 in the 2nd term

ganeshie8 (ganeshie8):

your textbook has a nice solution, why not simply use it ?

OpenStudy (dls):

I was doing the way that pdf taught me :/

OpenStudy (dls):

diagonally subtract elements and make use of given relation etc.

ganeshie8 (ganeshie8):

which pdf ?

OpenStudy (dls):

yesterday one!

ganeshie8 (ganeshie8):

you need to be very lucky for that to work

OpenStudy (dls):

why so? :O

ganeshie8 (ganeshie8):

that is not a standard method, that works based on guessing right ?

ganeshie8 (ganeshie8):

how on earth do you know you need to multiply by x ? why not x^2 or x^3 ?

OpenStudy (dls):

oh :/ I ignored this method in my textbook because of that :|

ganeshie8 (ganeshie8):

the standard method is very easy for you because you're familiar with summation notation and power series

ganeshie8 (ganeshie8):

let me walk u through first few steps

ganeshie8 (ganeshie8):

\[ a_n = a_{n-1} + 2(n-1) \]

ganeshie8 (ganeshie8):

step1 : multiply \(x^n\) through out, what do you get ?

OpenStudy (dls):

\[x^na_n = x^n a_{n-1}+x^n 2(n-1)\]

ganeshie8 (ganeshie8):

Yes, it doesn't matter much but below looks better : \[a_nx^n = a_{n-1}x^n+ 2(n-1)x^n\]

ganeshie8 (ganeshie8):

step2 : sum both left side and right side from n = 1 to infinity

OpenStudy (dls):

\[\Large \sum_1^\infty a_nx^n = \sum_1^\infty a_{n-1}x^n+\sum_1^\infty 2(n-1)x^n\]

ganeshie8 (ganeshie8):

Let \(G(x) = \sum\limits_{0}^{\infty}a_nx^n\) be the required generating function

OpenStudy (dls):

most of the times or always ?

ganeshie8 (ganeshie8):

always

ganeshie8 (ganeshie8):

our goal now is to write those infinite series in terms of G(x)

OpenStudy (dls):

its already the standard G(x) :P nvm

OpenStudy (dls):

so we can take a0 out

ganeshie8 (ganeshie8):

\[ \sum_1^\infty a_nx^n = \sum_1^\infty a_{n-1}x^n+\sum_1^\infty 2(n-1)x^n\] is same as \[ \sum_0^\infty a_nx^n-a_0 = \sum_1^\infty a_{n-1}x^n+\sum_1^\infty 2(n-1)x^n\]

OpenStudy (dls):

yes

ganeshie8 (ganeshie8):

we're done with left hand side, lets look at right hand side

OpenStudy (dls):

take the summation from 2 to infinity and take a0 out

ganeshie8 (ganeshie8):

Nope, you want to make the exponent match with the index : \[ \sum_0^\infty a_nx^n-a_0 = \sum_1^\infty a_{\color{red}{n-1}}x^{\color{red}{n}}+\sum_1^\infty 2(n-1)x^n\]

OpenStudy (bubblegum.):

i was doing something similar to this but then i got stuck \(a_n=a_{n-1} +2(n-1)\) \(a_n -a_{n-1}=2(n-1)\) lets say the generating function as \(Z\) which will be equal to the generating series so lets make the series \(A=1+1x+3x^2+7x^3+13x^4+...\) ----eq 1 now we gotta subtract the \(a_{n-1}\) terms so we subtract this-> \(xA\) and \(xA=1x+1x^2+3x^3+7x^4+...\) --eq 2 subtracting eq 2 from eq 1 we get-> \(A-xA=1+2x^2+4x^3+6x^4+8x^5..\) now we need to find and write the generating function for 2x^2+4x^3.. and then i got stuck thinking what to do with the RHS

OpenStudy (bubblegum.):

sorry take the generating function to be *\(A\)

ganeshie8 (ganeshie8):

@bubblegum. that works nicely, but that is not general... lot of guessing is required with that method..

OpenStudy (bubblegum.):

oh okay :) i'll go with your method

ganeshie8 (ganeshie8):

we can try both methods, let me finish mine first just so we don't mix up things :)

OpenStudy (dls):

yeah :P

OpenStudy (bubblegum.):

okay

ganeshie8 (ganeshie8):

Nope, you want to make the exponent match with the index : \[ \sum_0^\infty a_nx^n-a_0 = \sum_1^\infty a_{\color{red}{n-1}}x^{\color{red}{n}}+\sum_1^\infty 2(n-1)x^n\]

ganeshie8 (ganeshie8):

Notice that pulling out \(x\) does the job : \[ \sum_0^\infty a_nx^n-a_0 = x\sum_1^\infty a_{\color{red}{n-1}}x^{\color{red}{n-1}}+\sum_1^\infty 2(n-1)x^n\]

ganeshie8 (ganeshie8):

would you agree that \(\sum\limits_{n=0}^{\infty}a_nx^n\) is same as \(\sum\limits_{n=1}^{\infty}a_{n-1}x^{n-1}\) ?

ganeshie8 (ganeshie8):

\[ \sum_0^\infty a_nx^n-a_0 = x\sum_1^\infty a_{\color{red}{n-1}}x^{\color{red}{n-1}}+\sum_1^\infty 2(n-1)x^n\] is same as \[ \sum_0^\infty a_nx^n-a_0 = x\sum_0^\infty a_{\color{red}{n}}x^{\color{red}{n}}+\sum_1^\infty 2(n-1)x^n\]

OpenStudy (dls):

yes :D

ganeshie8 (ganeshie8):

you can convince they are same by substituting \(n-1=u\)

ganeshie8 (ganeshie8):

the index variable is just dummy

ganeshie8 (ganeshie8):

\(n\) or \(u\) it doesnt matter

OpenStudy (dls):

alright :)

ganeshie8 (ganeshie8):

so far we have \[ \sum_0^\infty a_nx^n-a_0 = x\sum_0^\infty a_{n}x^{n}+\sum_1^\infty 2(n-1)x^n\]

ganeshie8 (ganeshie8):

Look at third term, may be split it

OpenStudy (dls):

\[\sum_0^\infty a_nx^n-a_0 = x\sum_0^\infty a_{n}x^{n}+\sum_1^\infty 2nx^n-\sum_1^\infty 2x^n\]

ganeshie8 (ganeshie8):

\[ \sum_0^\infty a_nx^n-a_0 = x\sum_0^\infty a_{n}x^{n}+\color{red}{\sum_1^\infty 2(n-1)x^n}\] \[ \sum_0^\infty a_nx^n-a_0 = x\sum_0^\infty a_{n}x^{n}+2 \color{red}{\sum_1^\infty nx^n-2\sum_1^\infty x^n}\]

ganeshie8 (ganeshie8):

Maybe lets plugin \(G(x) = \sum\limits_{0}^{\infty}a_nx^n\) before simplifying those two red terms

OpenStudy (dls):

you can take that from 0 or 1..it doesn't matter right ?

OpenStudy (dls):

for the first red term that is

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!