# LaplaceTransfrom with time shifting

Hi I'm wondering if there's some workaround to get Mathematica to use time-shifting identities for Laplace and Inverse Laplace transforms. My examples are below.

\$Assumptions = Element[{t, τ}, PositiveReals];
LaplaceTransform[f[t -τ]HeavisideTheta[t-τ], t, s]

(* Output *)
(* LaplaceTransform[f[t -τ]HeavisideTheta[t-τ], t, s] *)

(* Desired Output *)
(* E^(-s τ) LaplaceTransform[f[t], t, s] *)

(* And for inverse *)
InverseLaplaceTransform[E^(-s τ) LaplaceTransform[f[t], t, s], s,t]

(* Output is again unchanged *)

(* Desired Output *)
(* f[t -τ]HeavisideTheta[t-τ] *)


Thanks for the help

• LaplaceTransform[]'s or InverseLaplaceTransform[]'s support for function transform is still somewhat limited,so don't be surprised if some things don't work yet. Commented Apr 17, 2020 at 18:15

## 2 Answers

I can only tell why it can't do it. But could not find a workaround yet.

The reason is that, when you use a generic function $$f(t)$$, it does not know if the integral needed to do the Laplace transformation converges or not.

Compare

LaplaceTransform[Cos[t - tau]*HeavisideTheta[t - tau], t, s,  Assumptions -> tau > 0]


To

 LaplaceTransform[f[t - tau]*HeavisideTheta[t - tau], t, s, Assumptions -> tau > 0]


which does not evaluate. May be someone know how to tell Mathematica, using assumptions, that

$$\int_0^{\infty } f(t) e^{-s t} \, dt$$

Exists. I tried

ClearAll[f, t, tau, s];
Unprotect@Integrate;
Integrate[f[t_] Exp[-s t_], {t_, 0, Infinity}] :=  LaplaceTransform[f[t], t, s];
Protect@Integrate;
LaplaceTransform[f[t - tau]*HeavisideTheta[t - tau], t, s, Assumptions -> tau > 0]


But it did not work. May be an expert in rules manipulation can figure how.

I think more work is needed to improve these transforms in Mathematica. Another example is Z transform. In Mathematica it only supports one sided Z transform. So for non causal signals, it is not useful to use at all. Half of the HW problems in books use two-sided Z transform. I asked about this more than 10 year ago and it is still not changed.

I wish WRI would concentrate more on actual Math in Mathematica instead of all the other web stuff it does which is not related to core Mathematics.

• I tried with Maple and works fine. Commented Apr 17, 2020 at 18:18

I send e-mail to Wolfram Technical Support and wrote back and give me workaround only for first question.

"Mariusz"

"I have attached a notebook with a few definitions that might be of use to you. I did not attempt to create the inverses, but maybe you can use the examples to figure out how to do that yourself. The difficult part is to get the pattern matching correct so the function evaluates."

"This only works for a limited number of functions f. The pattern matching for this kid of argument can be very tricky and probably plays a role as to why we do not have more functions like this. I know that, at least in the past, LaplaceTransform does not use the Integrate function for most cases. It is much faster and more efficient to define the results directly"

myLT[Times[f_[Plus[t_, Times[-1, τ_]]],
H_[Plus[t_, Times[-1, τ_]]]], t_, s_] /;
H === HeavisideTheta := E^(-s τ) LaplaceTransform[f[t], t, s]

myLT[Times[f_[Plus[t_, Times[-1, τ_]], __],
H_[Plus[t_, Times[-1, τ_]]]], t_, s_] /;
H === HeavisideTheta := E^(-s τ) LaplaceTransform[f[t], t, s]

myLT[Times[Power[a_, Plus[t_, Times[-1, τ_]]],
H_[Plus[t_, Times[-1, τ_]]]], t_, s_] /;
H === HeavisideTheta :=
E^(-s τ) LaplaceTransform[Power[a, t], t, s]


Some tests:

myLT[Sin[t - τ] HeavisideTheta[t - τ], t, s]
myLT[Cos[t - τ] HeavisideTheta[t - τ], t, s]
myLT[Exp[t - τ] HeavisideTheta[t - τ], t, s]
myLT[(t - τ)^2 HeavisideTheta[t - τ], t, s](*Works fine*)


Harry Calkins, Wolfram Technical Support, Wolfram Research, Inc http://support.wolfram.com

• Thanks for this. Although this solution is quite inelegant Commented Apr 23, 2020 at 4:14