FWIW :

sage: var("x, t")
(x, t)
sage: maxima_calculus.ratsubst(t,5^x, ex).sage()
t^2 - 7*t + 4
sage: maxima_calculus.lratsubst([5^x==t], ex).sage()
t^2 - 7*t + 4

See also this ask.sagemath.org question 
<https://ask.sagemath.org/question/59881/substitute-multiplication-of-sine-and-cosine-for-a-symbolic-function/>
.

I think that wrapping Maximas [l]ratsubst might be interesting…
​
Le mardi 23 novembre 2021 à 20:42:12 UTC+1, juanlui...@gmail.com a écrit :

> In the expression (5^x)^2-7*5^x+4, I want to substitute x^5 by t.
>
> With sagemath 7.2 (or another old versions), I can do
> ((5^x)^2-7*5^x+4).subs(5^x==t)
> and I get t^2 - 5*t + 4
>
> But sagemath 9.4 does not change the first 5^x and he gives
> 5^(2*x) - 7*t + 4
>
> Why?
>
> (In both cases, var("t") has been previously used)
>
> Yours,
>
> Juan Luis Varona
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/fd360243-56e1-4586-bd50-1e912019f3a8n%40googlegroups.com.

Reply via email to