# odd output from DifferenceDelta

I would appreciate an explanation of why DifferenceDelta produces a complicated expression for a simple quadratic. I see that this is caused by the Real value 0.1, but I do not understand the rationale. Note that even FullSimplify does not help much here.

f = Function[x, 15 + 2 x - 0.1 x^2]
DifferenceDelta[f[i], i]
(* -((0.2 (-9.5 + 1. i) (-150. - 20. i + 1. i^2))/((-25.8114 + 1. i) (5.81139 + 1. i))) *)


Note: Mma 12.0 on up to date Win 10.

• Good question. It is correct up to a some rounding error, though: DifferenceDelta[f[i], i] // Apart returns 1.9 - 0.2 i - 1.79755*10^-15/(-25.8114 + 1. i) + 1.79755*10^-15/( 5.81139 + 1. i). – Henrik Schumacher Mar 26 at 14:32
• "Note that even FullSimplify does not help much here." - indeed. But, the situation is salvageable: With[{expr = DifferenceDelta[f[i], i]}, PolynomialQuotient[Numerator[expr], Denominator[expr], i]]. Alternatively: DiscreteShift[f[i], i] - f[i]. – J. M.'s technical difficulties Mar 26 at 14:33
• Do you mean "Odd output from DifferenceDelta"? – user64494 Mar 26 at 15:38

The following works correctly.

f = Function[x, 15 + 2 x - 0.100000000000000000000* x^2];
DifferenceDelta[f[i], i] // FullSimplify
(*1.900000000000 - 0.2000000000000 i *)


The same phenomenon appears for other commands, e.g. Residue.

PS. To be clear,

g = Function[x, 15 + 2 x - 0.123456789101121314* x^2];
DifferenceDelta[g[i], i] // FullSimplify
(*1.8765432109 - 0.2469135782022 i*)


, but

g = Function[x, 15 + 2 x - 0.12345678910112131* x^2];
DifferenceDelta[g[i], i] // FullSimplify
(*(-228. + i (-0.4 + i (5.87654 + (-0.246914 + 1.37065*10^-17 i) i)))/(-121.5 +
i (-16.2 + 1. i)) *)

• Exact numbers work. – Alan Mar 26 at 15:37
• @Alan: You open an opened door. Decimals with many digits work too as I demonstrate. – user64494 Mar 26 at 15:39