# Little confused about taking transformation

I have a function f, the value of the function at x=0 is zero and at x=2 it is one. I am trying to interchange this, meaning at x=0, f should take the value of one and at x=2 f should be zero. Essentially I am trying to reflect my function. I am trying this. y=f(-x) to reflect about y-axis. What is the appropriate sign change I have to do to achieve this?

f = Sin[(((2*0 + 1)*π*(-x))/(2*2))];
Plot[f, {x, 0, 2}]

• So, Cos[Pi*x/4]? – march Feb 11 at 16:43
• humm. May be I am missing something. Why would at x=2 f should be zero when f(-x)? Do you want to reflect across y-axis ? f(-x) reflect around y-axis. Not x-axis. So I deleted my answer, because I am confused what you are asking now. – Nasser Feb 11 at 16:49
• I wanted to reflect about y -axis – acoustics Feb 11 at 16:53
• @Nasser Actually the answer that you suggest works for me . – acoustics Feb 11 at 16:54
• Ok. I undeleted my answer. I just wanted to make sure. – Nasser Feb 11 at 16:54

It would be better to make your f a function, something like

f[x_] := Sin[(((2*0 + 1)* Pi *(-x))/(2*2))];
Plot[{f[x], f[-x]}, {x, -2, 2}]


ps. why do you have 2*0 in there?

ClearAll[f, x];

• f[x_] := Table[Sin[(((2*i + 1)*Pi*(-x))/(2*2))], {i, 0, 2}]; Actually I wanted to generate multiple like this, How to do this, using table function – acoustics Feb 11 at 16:59