Laplace transform of square wave.

1.5k Views Asked by At

I want to solve

$$y''+\omega^2y=f(t)\,,\,y(0)=y'(0)=0$$

where $f(t)=\sum_{k=0}^{\infty} (-1)^ku_k(t)$ is the square wave, $u_k(t)$ the unit step function jumping at $t=k$. I am not sure how to find the Laplace transform of the infinite sum. Taking Laplace transforms of both sides I get $$Y(s)=\frac{1}{s(s^2+\omega^2)}(\sum_{k=0}^{\infty} (-1)^ke^{-ks}).$$ The inverse of $\frac{1}{s(s^2+\omega^2)}$ I worked out ut to be $\frac{1}{\omega^2}u_0(t)-\frac{1}{\omega^2}\cos(\omega t)$. According to Wolfram Alpha $\sum_{k=0}^{\infty} (-1)^ke^{-ks}=\frac{e^s}{1+e^s}$ (?), but I cannot see what the inverse of that could be.

2

There are 2 best solutions below

0
On

If $f(t)$ be a periodic function with period $T>0$ and in $[0,T]$ has Laplace transform, then for $s>0$ $${\cal L}(f)=\frac{\int_0^T e^{-st}f(t)dt}{1-e^{-sT}}$$ since the variable take from $[nT,(n+1)T]$ and with substitution $x=t-nT$ we have: \begin{eqnarray*} {\cal L}(f) &=& \int_{0}^{\infty}e^{-st}f(t)dt \\ &=& \int_{0}^{T}e^{-st}f(t)dt+\int_{T}^{2T}e^{-st}f(t)dt+\int_{2T}^{3T}e^{-st}f(t)dt+\cdots \\ &=& (1+e^{-sT}+e^{-2sT}+e^{-3sT}+\cdots)\int_{0}^{T}e^{-st}f(t)dt \\ &=& \frac{1}{1-e^{-sT}}\int_{0}^{T}e^{-st}f(t)dt \end{eqnarray*}

1
On

Well, usually we write for the unit step function:

$$\theta\left(t-\text{k}\right)\tag1$$

So, we want to find:

  • $$\mathscr{L}_t\left[\text{y}\space''\left(t\right)\right]_{\left(\text{s}\right)}=\text{s}^2\cdot\text{Y}\left(\text{s}\right)-\text{s}\cdot\text{y}\left(0\right)-\text{y}\space'\left(0\right)\tag2$$
  • $$\mathscr{L}_t\left[\omega^2\cdot\text{y}\left(t\right)\right]_{\left(\text{s}\right)}=\omega^2\cdot\mathscr{L}_t\left[\text{y}\left(t\right)\right]_{\left(\text{s}\right)}=\omega^2\cdot\text{Y}\left(\text{s}\right)\tag3$$
  • $$\mathscr{L}_t\left[\text{f}\left(t\right)\right]_{\left(\text{s}\right)}=\mathscr{L}_t\left[\sum_{\text{k}=0}^\infty\left(-1\right)^\text{k}\cdot\theta\left(t-\text{k}\right)\right]_{\left(\text{s}\right)}=\sum_{\text{k}=0}^\infty\left(-1\right)^\text{k}\cdot\mathscr{L}_t\left[\theta\left(t-\text{k}\right)\right]_{\left(\text{s}\right)}=$$ $$\sum_{\text{k}=0}^\infty\left(-1\right)^\text{k}\cdot\frac{\theta\left(-\text{k}\right)+\frac{\theta\left(\text{k}\right)}{\exp\left(\text{k}\cdot\text{s}\right)}}{\text{s}}=\frac{1}{\text{s}}\cdot\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}\tag4$$

So, we get:

$$\text{s}^2\cdot\text{Y}\left(\text{s}\right)-\text{s}\cdot\text{y}\left(0\right)-\text{y}\space'\left(0\right)+\omega^2\cdot\text{Y}\left(\text{s}\right)=\frac{1}{\text{s}}\cdot\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}\space\Longleftrightarrow\space$$ $$\text{Y}\left(\text{s}\right)=\frac{\frac{1}{\text{s}}\cdot\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}+\text{s}\cdot\text{y}\left(0\right)+\text{y}\space'\left(0\right)}{\text{s}^2+\omega^2}\tag5$$

Now, for the inverse Laplace transform:

$$\text{y}\left(t\right)=\mathscr{L}_\text{s}^{-1}\left[\frac{\frac{1}{\text{s}}\cdot\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}+\text{s}\cdot\text{y}\left(0\right)+\text{y}\space'\left(0\right)}{\text{s}^2+\omega^2}\right]_{\left(t\right)}=$$ $$\mathscr{L}_\text{s}^{-1}\left[\frac{1}{\text{s}}\cdot\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}\cdot\frac{1}{\text{s}^2+\omega^2}\right]_{\left(t\right)}+\mathscr{L}_\text{s}^{-1}\left[\frac{\text{s}\cdot\text{y}\left(0\right)+\text{y}\space'\left(0\right)}{\text{s}^2+\omega^2}\right]_{\left(t\right)}=$$ $$\int_0^t\mathscr{L}_\text{s}^{-1}\left[\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}\cdot\frac{1}{\text{s}^2+\omega^2}\right]_{\left(\tau\right)}\space\text{d}\tau+\text{y}\left(0\right)\cdot\cos\left(\omega t\right)+\frac{\text{y}\space'\left(0\right)\cdot\sin\left(\omega t\right)}{\omega}\tag6$$

Use:

$$\mathscr{L}_\text{s}^{-1}\left[\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}\cdot\frac{1}{\text{s}^2+\omega^2}\right]_{\left(\tau\right)}=\int_0^\tau\mathscr{L}_\text{s}^{-1}\left[\frac{1+2\cdot e^\text{s}}{1+e^\text{s}}\right]_{\left(\sigma\right)}\cdot\mathscr{L}_\text{s}^{-1}\left[\frac{1}{\text{s}^2+\omega^2}\right]_{\left(t-\sigma\right)}\space\text{d}\sigma=$$ $$\int_0^\tau\left\{\sum_{\text{k}=0}^\infty\left(-1\right)^\text{k}\cdot\theta\left(\sigma-\text{k}\right)\right\}\cdot\frac{\sin\left(\omega\cdot\left(\tau-\sigma\right)\right)}{\omega}\space\text{d}\sigma=$$ $$\sum_{\text{k}=0}^\infty\frac{\left(-1\right)^\text{k}}{\omega}\cdot\left\{\int_0^\tau\theta\left(\sigma-\text{k}\right)\cdot\sin\left(\omega\cdot\left(\tau-\sigma\right)\right)\space\text{d}\sigma\right\}\tag7$$