<div id="comment:0"></div> Minimal case: ``` sage: (I*x).subs(I==0) I*x ``` Originally: the `substitute` command does not work with `I`: ``` sage: f = sin(x*I)+I*x^2+cos(exp(I)) sage: f.subs(I=0) I*x^2 + cos(e^I) + sin(I*x) ``` Depends on #24838 Component: **calculus** _Issue created by migration from https://trac.sagemath.org/ticket/23964_