Inspired by wxMaxima where each input and output is labeled as %input#, %output#, it is very important to do something similar in Xcas,
wxMaxima
Code : Tout sélectionner
(%i1) g(x):=3*x+x^2;
(%o1) g(x):=3*x+x^2
(%i2) f(x):=x^3+10+8*x+3*x^2;
(%o2) f(x):=x^3+10+8*x+3*x^2
(%i3) f(g(x));
(%o4) (x^2+3*x)^3+3*(x^2+3*x)^2+8*(x^2+3*x)+10
#1> means first entry as commentary
#1< means first output as commentary
for example
Xcas
Code : Tout sélectionner
#1>
g(x):=3*x+x^2
#1<
(x)->3*x+x^2
#2>
f(x):=x^3+10+8*x+3*x^2
#2<
(x)->x^3+10+8*x+3*x^2
#3>
h:=unapply(f(g(x)),x)
#3<
(x)->(3*x+x^2)^3+10+8*(3*x+x^2)+3*(3*x+x^2)^2
#4>
h1:=simplify(h)
#4<
(x)->x^6+9*x^5+30*x^4+45*x^3+35*x^2+24*x+10
thank you very much