ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 29 Feb 2020 04:21:11 +0100How to compose two functionshttps://ask.sagemath.org/question/50113/how-to-compose-two-functions/Suppose I have a function f(x)=x^2+1
What is the command to compose it with itself twice or thrice?
I was using:
f= (x^2+1)
g= lambda t: (t^2+1)
f(*g)
or
sage: g = lambda t: (t^2+1)
sage: f = lambda x: (x^+1)
sage: f(*g(t))
or
sage: x = var('x')
sage: f=x^2+1
sage: compose(f, 3, x)
Nothing works! Also, I don't know how to use the Dynamical system code in this case here.
Also, it would be of great help if you can give me one example command for the composition of two different functions
e.g f(x)=x^2+1 and g(x)=x^3+2 if it is not obvious from the answer of the composition of the same function twice.ArnabSat, 29 Feb 2020 04:21:11 +0100https://ask.sagemath.org/question/50113/