I am trying to calculate the Laplace Transformation of the following function: $$f(x) = \theta(t+1)-\theta(t-1)$$
where $\theta(t)$ is the Heaviside step function defined as: $${\displaystyle \theta(x):={\begin{cases}1,&x>0\\0,&x\leq 0\end{cases}}}$$
My code to calculate this is:
f2[t_] := Piecewise[{{1, t < 1 && t > -1}},0]
Plot[f2[x],{x, -2, 2},Evaluated -> True]
lapl[s_] := LaplaceTransform[f2[t], t, s]
lapl[s]
But the output I get from Mathematica is $$\frac{1-cosh(s)+sinh(s)}{s}$$ When running the following transformation integral in wolfram alpha $$\int_{-\infty}^{\infty}(\theta(t+1)-\theta(t-1))*e^{-st}dt$$ the result I get is: $\frac{2sinh(s)}{s}$ for $\Re(s)>0$ which seems to be correct.
My question is: Why are the results different? I am using Wolfram Engine Version 13.1 in Wolfram Cloud Version 1.64.