I want to find root of equation in the exponential, root, denominator case so;

(in C#)

1- solution my mind

x^2 + y/5 + 6 --> sum(power(identity(x), number(6)), product(number(1/5), identity(y)), number(6))

get “x” factor --> power(identity(x), number(6)) //no just identity(x)

get “y” factor --> product(number(1/5), identity(y)) //no just identity(y)

2- solution my mind

get all structure tree (power, product, sum vs.) as single depth list.

get all tree (so including child brackets) -->

- sum(power(identity(x), number(6)), product(number(1/5), identity(y)), number(6))
- power(identity(x), number(6))
- product(number(1/5), identity(y))

after I will processing with LINQ. (no problems here)

How do I make them ?