Skip to content

How to expand nested function? #2069

@MAGNETO903

Description

@MAGNETO903

I have 2 simple functions, for example:
f1(x) = 2*x
f2(x) = x^2

And one complex function:
f3(x) = f1(f2(x))

Can I using mathjs expand function f3?
I need to get something like this:

math.expand("f3(x)") // return 2*x^2

or

math.simplify(math.parse("f3(x)")) // should return 2*x^2

Can I do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions