Ask Your Question

ThomasLc's profile - activity

2022-05-19 17:10:22 +0200 answered a question How to recompute symbolic expression

Yes thank you, this is a convenient solution.

2022-05-19 17:09:41 +0200 marked best answer 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.

2022-05-19 17:09:41 +0200 received badge  Scholar (source)
2022-05-18 18:03:54 +0200 asked a question How to recompute symbolic expression

How to recompute symbolic expression I have a symbolic expression with symbolic evaluation. After I whand to eval the f