Given a polynomial in one variable with rational coefficients, output an equivalent expression that only 1
, variables, and definite integrals. For example, -x2 can be expressed as ∫x∫111dtxdu.
E := 1 | var | ∫EEEdvar
Any reasonable input/output method is allowed.
Examples:
Your score will be the your code length multiplied by the number of ∫
symbols used on the test cases. You should be able to score your program. Lowest score wins.
Test cases:
4/381*x^2+49/8*x^3-17/6
311/59*x^2-92/9*x^3-7/15*x
333/29*x^3+475/96*x^8