Plot the graph of the square wave function defined as $$f(t)=\sum^{\infty}_{n=0}(-1)^n h_{n}(t)$$ on the interval $t>0$ and find its Laplace transform. The http://mathworld.wolfram.com/FourierSeriesSquareWave.html has FourierSeriesSquareWave but not exactly as the function above. Please, can anyone help out in plotting this graph and solving the problem? Thanks for your time and help!
1 Answer
Why not use SquareWave
instead?
f[t_] := SquareWave[t/2]
Visualization:
Plot[f[t], {t, 0, 10}]
The LaplaceTransform
:
LaplaceTransform[f[t], t, s]
Tanh[s/2]/s
f = Sum[(-1)^n*HeavisideTheta[t - n], {n, 0, 10}] g = LaplaceTransform[f, t, s] Plot[f, {t, 0, 10}] Plot[g, { s, 0, 10}]
close to what you are looking for? Note: make sure each of those four expressions is on a separate line or in a separate cell in your notebook $\endgroup$