RC filter with an square wave input

I've this RC filter circuit (r is connect to earth on the bottom):

My Vin is a square wave:

With Laplace transform I derived that:

$$Vout(s)=\frac{r}{r+\frac{1}{cs}}\cdot Vin(s)$$

and this square wave has a laplace transform of $$Vin(s)=\frac{\text{A}\tanh\left(\frac{\text{T}s}{4}\right)}{s}$$

So, when we substitute that in,in the equation for Vout(s) and calculate the inverse laplace transform, and plot that function I got this:

Q: Why do I get (from the theory) this strange output voltage?

• If I rember my old classes well - and I probably don't - doesn't 's' in the laplace have something to do with an impulse? That looks like a series of impulses to me, so I don't think that it is totally valid in this context... – slightlynybbled May 13 '16 at 23:18
• How did you calculate the inverse laplace transform? – Magic Smoke May 13 '16 at 23:29
• How did you choose T? You're missing the positive part of the graph - the shapes you can see are exponentials – Chu May 13 '16 at 23:55