title: How do you input piecewise functions into wolfram alpha?
body: <p>I've tried several approaches, such as defining a function f(t) at certain values, and then using f(t) in my equation, but nothing has worked for me thus far. I love using wolfram alpha, it is an invaluable resource for helping me to better understand my advanced differential equations homework. I am trying to graph a piecewise square wave from 0 to 5pi<br>
  The equation is  <code>x'' + 2x' + x = f(t)</code> where</p>
  
  <pre><code>__{0, (2n+1)*pi &lt; t &lt; (2n+2)*pi}
  
  f(t) =
  
   __{5, 2n*pi &lt; t &lt; (2n+1)*pi} n = 0,1,2,3,4...etc  
  </code></pre>
  
  <p><code>f(t)</code> is a square wave with a value of 5 between 0 and pi, then 0 between pi and <code>2*pi</code>, then 5 between 2*pi and 3*pi... etc. <code>f(t)</code> is the driving function of the ODE. What does the graph look like between <code>0 &lt; t &lt; 5*pi</code>
  Any help inputting this into a plotter, such as wolfram alpha would be greatly appreciated, ty!</p>