Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

composite function simplify expressions and strings

I am using code like

x=simplify(f(g(g(h(f(g(f(g(f(k))))))))))

to explore some composite functions f, g and h in the example line above

I think the line f(x) = x^2-2x+3 (for example) returns f(x) as an 'expression'

I think my lack of understanding of the nature of my expressions may be causing me issues.

I would like to be able to generate a loop so that I can tabulate things like

f(x) then gf(x)

then ggf(x), gggf(x) ... etc upto a large number of g's

without having to run the code with x=simplify(f(k))

and then

x=simplify(g(f(k))) etc etc all separately

How can I do this? Any help much appreciated (obvs).

BTW, feel free to correct my tags

composite function simplify expressions and strings

I am using code like

x=simplify(f(g(g(h(f(g(f(g(f(k))))))))))

to explore some composite functions f, g and h in the example line above

I think the line f(x) = x^2-2x+3 (for example) returns f(x) as an 'expression'

I think my lack of understanding of the nature of my expressions may be causing me issues.

I would like to be able to generate a loop so that I can tabulate things like

f(x)

then gf(x)

then ggf(x), gggf(x) ... etc upto a large number of g's

without having to run the code with x=simplify(f(k))

and then

x=simplify(g(f(k))) etc etc all separately

How can I do this? Any help much appreciated (obvs).

BTW, feel free to correct my tags