# Having difficulty checking for time invariance of discrete system

A system is given with the following equation: $$y(n) = 3y^2 (n-1) - nx(n) + 4x(n-1) - 2x(n+1)$$ I need to check for the linearity and time invariance of the system.

By just looking at the equation I can guess the system is both non-linear and time-variant. But I am having hard time proving it.

I know that a system having output $$y(n)$$ for input $$x(n)$$ is linear if the weighted linear combination of the input signals produce weighted linear combination of the output of those individual input signals. On the other hand, a signal is time invariant if a particular delay in input signal causes equal delay in the output signal.

In my example, I did the linearity part using the proof by contradiction technique.

For the time invariance part, I'm having a little trouble. If I delay the input by $$k$$ samples and call the corresponding output as $$y(n,k)$$, then $$y(n,k) = 3y^2(n-1,k) - nx(n-k) + 4x(n-k-1) - 2x(n-k-1) \tag{1}$$

Now if I delay the output by $$k$$ samples and then call the corresponding output as $$y(n-k)$$ then, $$y(n-k) = 3y^2(n-1-k) - (n-k)x(n-k) + 4x(n-k-1) - 2x(n-k-1) \tag{2}$$

My confusion here is that how can we say these two equations are different, since we cannot compare them term by term since the first term in both equations have totally different meaning. I may have not seen something plain and simple here, please point that out to me.

You did everything correctly. I think that part of your confusion comes from the way you chose the notation. Let me use $$v_k[n]$$ to denote the system's response to a delayed input $$x[n-k]$$. $$v_k[n]$$ is described by the following difference equation:
$$v_k[n]=3v_k^2[n-1]-nx[n-k]+4x[n-k-1]-2x[n-k+1]\tag{1}$$
On the other hand, the delayed response $$y[n-k]$$ to the original input $$x[n]$$ is described by
$$y[n-k]=3y^2[n-k-1]-(n-k)x[n-k]+4x[n-k-1]-2x[n-k+1]\tag{2}$$
The system would be time-invariant if $$y[n-k]$$ and $$v_k[n]$$ satisfied the same difference equation. From $$(1)$$ and $$(2)$$ we can see that that is not the case, hence the system is time-varying. You can see that the multiplicative term $$n$$ is responsible for making the system time-varying. In general, if there are time-dependent coefficients in a difference equation then the corresponding system is time-varying.