time invariance concept? First of all ,please let me know?Is cosine time invariant or time variant?
If latter is the case then if a time varying input like cos is given to a time invariant system,how will it behave?

I have a system $y(t) = x^2(t)$ 
Apparently from equation it seems to be time invariant
But when i give it input $x(t) = \cos(2 \pi t)$
I do not get time invariant response as shown through following matlab code
Although people are commenting that my system is still time invariant but as shown highlighted in attached photo y(t-3) span is between 3 to 13 while S[x(t-3)] span is between 0 to 10 but as by book both of them should have same time span?I am confused in this difference in time span

clc
clear all
close all
t=0:.001:10;
x=cos(2*pi*t);
y=x.^2;
subplot(3,1,1)
plot(t,y)

legend('y(t)') 

subplot(3,1,2)
plot(t+3,y)

legend('y(t-3)')

xn=cos(2*pi*(t-3));
y2=xn.^2;
subplot(3,1,3)
plot(t,y2)

legend('S[x(t-3)]')
You do get a time-invariant response. Your code produces the same output for all three signals. In particular, it produces the same output for $y(\sigma^T\{x(t)\}))$ as for $\sigma^T\{y(x(t))\}$ (plots 2 and 3 in your code). It is hard to see in your case because you have shifted the signal $3\cdot 2\pi$ in time. Whats a cosine shifted by $6\pi$? The same cosine. Everything will be clearer if you plot the signals on top of each other and shift by a more informative value.

Try this code:

clc
clear all
close all
t=0:.001:10;
x=cos(2*pi*t);
y=x.^2;
plot(t,y)
hold on;

plot(t+0.25,y)

xn=cos(2*pi*(t-0.25));
y2=xn.^2;
plot(t,y2)

legend('y(t)','y(t-3)','y[x(t-0.25)]')

hold off


You can see in the attached image, the orange and red lines, corresponding to shifted output and output on shifted input respectively, align with each other. That is why you can not see the red line up until the orange line ends. The unshifted output of the unshifted signal in blue does not align with the two other.