Hello,
I was a heavy user of Mathematica during my Ph.D… Which is a bit far, now (12 years ago). I’m trying to use it again, but I’m getting mad with some subtle features. Here is the issue.
I define something like
OrderDev = 1;
i = 0;
[Eta][x_, t_] :=
Sum [Subscript[K, n][t] x^(2 n)/(2 n)!, {n, 0, OrderDev}];
[CapitalDelta][x_, z_, t_] := z - Subscript[K, 0][t];
Subscript[[CapitalPhi], i_][x_, z_,
t_] := -Sum [
Subscript[[Phi], i , n][t] Cos[
n x - i Pi] Exp[-n [CapitalDelta][x, z, t]], {n, 1, OrderDev}];
When I define, for example, Subscript[dxphi, i_][x_, z_, t_] :=
D[Subscript[[CapitalPhi], i][x, z, t], x];
It gives what I expect : E^(-z + Subscript[K, 0][t]) Sin[x] Subscript[[Phi], 0, 1][t]
But when I try to take the value of dxphi when z=eta[x,t], it seems to perform the derivation again. For example, if I ask what is Subscript[dxphi, i][x, [Eta][x, t], t] , instead of getting E^([K, 1][t] x^2 /2) Sin[x] Subscript[[Phi], 0, 1][t] , I get
E^(-(1/2) x^2 Subscript[K, 1][t]) Sin[x] Subscript[[Phi], 0, 1][t] +
E^(-(1/2) x^2 Subscript[K, 1][t])
x Cos[x] Subscript[K, 1][t] Subscript[[Phi], 0, 1][t]
Meaning that it re-runs the initial definition, and so uses the chain rule.
How can I prevent this behavior, “freeze” the definition of the function and just getting its formal value at a point (for example, when z=eta[x,t]) ?
Thanks a lot