TransWikia.com

odd output from DifferenceDelta

Mathematica Asked on July 16, 2021

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.

One Answer

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)) *)

Answered by user64494 on July 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP