How to solve the initial value problem with
x(n + 1) + x(n) = n^2;
x(0) = 1
I do know how to solve for initial value theorem in differential equation, but not in difference equation.
Please help.Thanks.
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityHow to solve the initial value problem with
x(n + 1) + x(n) = n^2;
x(0) = 1
I do know how to solve for initial value theorem in differential equation, but not in difference equation.
Please help.Thanks.
Like a linear constant coefficient ODE the general solution can be written as the sum of a particular solution and the general solution of the homogeneous equation $x(n+1)+x(n)=0$.
Because the right hand side is a polynomial we look for a polynomial particular solution, and a bit of experimenting will show this to be a quadratic:$$x_p(n)=n^2/2-n/2$$
Also the general solution to the homogeneous equation is obviously: $x_h(n)=k(-1)^n$, and the solution to your problem is the sum $x_p(n)+x_h(n)$ with $k$ chosen to satisfy the initial condition.