How to recompute symbolic expression
I have a symbolic expression with symbolic evaluation.
After I whand to eval the function to it's expression but it doent work :
var("x, omega, t")
u = function('u')(x)
eq = u(x=1) == cos(omega*t)
eq.show()
u(x) = e^(2*t*x)
eq.show
๐ข(1)=cos(๐๐ก)
๐ข(1)=cos(๐๐ก)
But now if I create again eq equation, this time it works.
eq2 = u(x=1) == cos(omega*t)
eq2.show()
๐(2๐ก)=cos(๐๐ก)
Is-it a function recompute to replace easily function by it value ?
The working solution I found isn't practical :
var("x, omega, t")
uf = function('u')(x)
eq = uf(x=1) == cos(omega*t)
eq.show()
u2(x) = e^(2*t*x)
eq.substitute_function(u, u2).show()
I look on subs() and substitute_function() but their behaviour isn't convenient for this case.