I have this
{{qy1[x] -> -2.72392*10^9 x^3 + 1. x C[1] + C[2]}}
They I want to make a function to be able to operate on it
f[x_]:=f/. f->qy1[x]
It does not work , I get
In[960]:= f[x_]:=f/. f->qy1[x]
f[.1]
Out[961]= qy1[0.1]
Why not getting a function?
nma
(Nasser M. Abbasi)
2
One way might be to not use delayed assignment (:=) but use =. With delayed assignment, “x” was being replaced by “.1” among other issue.
ClearAll[gy1, x, f]
p = First@{{qy1[x] -> -2.72392*10^9 x^3 + 1. x C[1] + C[2]}}
f[x_] = qy1[x] /. p
f[.1]
(*-2.72392*10^6 + 0.1 C[1] + C[2]*)
f[.2]
(*2.179136*10^7 + 0.2 C[1] + C[2]*)