# The inverse Laplace Transform of a real proper rational function must be real

How does one get Mathematica to return a real answer when using InverseLaplaceTransform? Tried using Re and ComplexExpand to no avail. The inverse of a real rational function must be real (it is a real system). For example:

InverseLaplaceTransform[(s^2 + 3.0)/(s^5 + 3 s^4 + 6 s^3 + 6 s^2 + 3 s^2 + 2 s + 10), s, t]

returns a complex mess.

• ComplexExpand worked fine for me. Oct 12 '17 at 21:28

## 1 Answer

First, it is best to use exact numbers with symbolic methods. The approximate number 3.0 is disguising the situation.

With 3.0 changed to 3:

InverseLaplaceTransform[(s^2 + 3)/(s^5 + 3 s^4 + 6 s^3 + 6 s^2 + 3 s^2 + 2 s + 10), s, t]

(* Long result in terms of algebraic numbers *)

% // N // Chop

(* -0.000165958 (-1019.4 2.71828^(-2.29182 t) + (185.397 -
339.966 I) 2.71828^((-0.651002 - 1.91236 I) t) + (185.397 +
339.966 I) 2.71828^((-0.651002 + 1.91236 I) t) + (324.304 -
498.343 I) 2.71828^((0.29691 - 0.990481 I) t) + (324.304 +
498.343 I) 2.71828^((0.29691 + 0.990481 I) t)) *)

In this form, you can see that the imaginary parts of the complex coefficients cancel.

Added 10/19:

You can have an explicitly real formula in the approximate numerical domain:

InverseLaplaceTransform[(s^2 + 3)/(s^5 + 3 s^4 + 6 s^3 + 6 s^2 +
3 s^2 + 2 s + 10), s, t] //
N // ComplexExpand // Simplify // Chop
(* 0.169178 E^(-2.29182 t) - 0.107642 E^(0.29691 t) Cos[0.990481 t] -
0.0615362 E^(-0.651002 t) Cos[1.91236 t] +
0.165408 E^(0.29691 t) Sin[0.990481 t] +
0.11284 E^(-0.651002 t) Sin[1.91236 t] *)

But I think most of us who actually use this math are used to working with complex natural frequencies.

The shortest path between two truths in the real domain passes through the complex domain.

-- Jacques Hadamard

• Seems that Mathematica is having trouble getting back to the real domain here.
– Jim
Oct 16 '17 at 15:49
• @Jim Mathematica yields a real result expressed in terms of complex constants. This is common in algebra, and a fine example of Hadamard's maxim. Oct 16 '17 at 21:22
• Yeah, but I still think it should make it real with no complex constants.
– Jim
Oct 18 '17 at 18:12