Simple problem regarding rectangular pulse shifting So i have the following rectangular pulse:

$$h(t)=\begin{cases} 
      1 &amp;  0&lt;t&lt; T \\
       0 &amp; \text{otherwise} 
   \end{cases}$$

Now, i am supposed to create $h(T-t)$, and the problem is that i do it two different ways, and get two different results, and it is obvious that this is not possible. Anyway, here is what i have.

My first attempt is step by step building of the $h(T-t)$ from the $h(t)$, firstly, i "flipped" variable $t$.
so i got 
$$h(-t)=\begin{cases} 
      1 &amp;  0&lt;-t&lt; T \\
       0 &amp; \text{otherwise} 
   \end{cases}=\begin{cases} 
      1 &amp;  -T&lt;t&lt; 0 \\
       0 &amp; \text{otherwise} 
   \end{cases}$$

Now, i add T to this, and i have 
$$h(T-t)=\begin{cases} 
      1 &amp;  -T&lt;T+t&lt; 0 \\
       0 &amp; \text{otherwise }
   \end{cases}=\begin{cases} 
      1 &amp;  -2T&lt;t&lt; -T \\
       0 &amp; \text{otherwise} 
   \end{cases}$$

However, i've done this directly:

$$h(T-t)=\begin{cases} 
      1 &amp;  0&lt;T-t&lt; T \\
       0 &amp; \text{otherwise} 
   \end{cases}=\begin{cases} 
      1 &amp;  -T&lt;-t&lt; 0\\
       0 &amp; \text{otherwise }
   \end{cases}=\begin{cases} 
      1 &amp;  0&lt;t&lt; T \\
       0 &amp; \text{otherwise} 
   \end{cases}$$

Now, there is something wrong here, but i don't see any mistakes in any of the two cases. Any help appreciated!
Clearly, in this example you have $h(t)=h(T-t)$. The easiest way to see this is to check for which value of $t$ the argument becomes zero. So the point $t=0$ of the original function is mapped to the point $t=T$, and because you have $-t$ in the argument, the function is inverted on the time axis.

The mistake in your first approach is the way you added the value of $T$. What you should have done is replace $-t$ by $T-t$ (which is what's happening on the left-hand side of the equation), to obtain $h(T-t)=1$ for $0&lt;T-t&lt;T$, which is equivalent to $0&lt;t&lt;T$, corresponding to the correct solution.