# Possible bug with FourierTransform linearity

Each component is easily transformed but the sum is not:

FourierTransform[f''[x], x, k]
FourierTransform[f'[x], x, k]

-k^2 FourierTransform[f[x], x, k]
-I k FourierTransform[f[x], x, k]

FourierTransform[f''[x] + f'[x], x, k]

FourierTransform[f'[x] + f''[x], x, k] (*!!*)


LaplaceTransform behaves correctly:

LaplaceTransform[f''[x] + f'[x], x, k]

-f[0]-k f[0]+k LaplaceTransform[f[x],x,k] + k^2 LaplaceTransform[f[x],x,k] - f'[0]


Just in case. Win7 V9.0.1.0

As acl has noticed on chat, Distribute would be quick fix but not sure how stable for more complicated cases:

Distribute[ FourierTransform[f''[x] + f'[x], x, k]]

-I k FourierTransform[f[x],x,k]-k^2 FourierTransform[f[x],x,k]

• – Jens Jan 14 '14 at 18:38
• Just wrote a "shell" for FourierTransform here, which (I think) is a little more stable than the Distribute approach. – xzczd Jan 9 '15 at 12:34

We can find examples where linearity does not apply - it is conditional upon the relevant transforms existing (e.g. for reasons of convergence). For example

expr1 = FourierTransform[f'[x] - f[x], x, k]
(* FourierTransform[-f[x] + Derivative[1][f][x], x, k] *)

expr2 = Distribute@expr1
(* FourierTransform[-f[x], x, k] - I k FourierTransform[f[x], x, k] *)

Block[{f = Exp}, {expr1, expr2}]
(* {0, FourierTransform[-E^x, x, k] - I k FourierTransform[E^x, x, k]} *)


Distribution is not valid as the transform of $e^x$ does not exist. I can therefore understand why this simplification is not enabled by default, though I'm sure that in other areas Mathematica makes assumptions that are far more questionable.

It is arguable that analogy with LaplaceTransform would suggest that distribution should take place, though analogy with Integrate would lead to the opposite conclusion. Automatic distribution of Integrate would cause problems for many sensible integrands.

In this case, I see the following differences between Fourier and Laplace transforms:

1. Fourier transforms are undefined for a much larger range of interesting functions than Laplace transforms, increasing the risk that distribution leads to an unexpected result.
2. Applications I'm aware of for Laplace transforms (e.g. solving differential equations) almost invariably require distribution over Plus. Fourier transforms have a much wider range of uses.
3. Laplace transforms are more "Applied Maths" than Fourier transforms. Applied mathematicians have different expectations of correctness.
• But LaplaceTransform is also conditional (of course looser than FourierTransform), while linearity is implemented in it. – xzczd Sep 8 '16 at 13:06
• @xzczd Consistency would obviously be nice, though analogies with other functions (e.g. Integrate) might lead you the opposite conclusion. In this case, I see the following differences: 1) FourierTransform is undefined for a much larger range of interesting functions than LaplaceTransform increasing the risk that it leads to an unexpected result. 2) Applications I'm aware of for Laplace transforms (e.g. solving differential equations) almost invariably require distribution over Plus. Fourier transforms have a much wider range of uses. – mikado Sep 8 '16 at 19:39