Support do symbolic integration of: * Constants * Polynomials (univariate) * Transcendental function * A linear combination of constants, transcendental function and univariate polynomials I think you should start from basic expressions like single polynomials and single transcendental functions should be simple (a constant term is the most trivial one) Then when that is done you can explore how to do linear combinations of thoses. For this I suggest create some helper class like ProvideIntegral, you can let the user to get the result with the constant (in case the integral is indefinite) The API should integrate expressions like: 2 x*x sin(x) cos(x) + a cos(x)^2 exp(x) and linear combinations like: 3*2 + 3*x*x + 4*sin(x) - (cos(x)+a) - 5*cos(x)^2 + 77*exp(x) Note: a is a parameter (variable in Variables module) Suggested API Expression Expression::integral(const Expression &exp, Variables *var = 0) I'm sure this is challenging but I think is doable under the previous constraints, also this feature it would be a killer one and it will give to the users of *algebra a lot of happiness ;) Reproducible: Always
You talk about some constraints but I can't see them.
Hi Alex, Constrains like: Only for simple functions (basic rules): f(x)=ax+b f(x)=sin(ax+b),cos(ax+b),tan,... trigonometric functions f(x)=ln(ax+b) f(x)=exp(ax+b) f(x)=power(g(x), n), where g(x) is one of previous functions. f(x)=linear combination of previous functions; I mean just multiply each function by a constant and sum all the functions For those cases we can have the antiderivatives and even the definite integrals, so the command can be like: integral(f(x),x) give us the antiderivative integral(f(x),x,0,5) give use a number So the integral command would take this args: f: function var: equivalent to dx, is the variable with respect the integral can be performed and 2 optional args to computed numeric (or symbolic too) result: from: a number or a symbol to: a number or a symbol For example if we write: integral(f(x),x,0,t) then this give us an expression like F(t) where t is a symbolic var (var from varsmodule ;)) If you need more ideas, please tell me what can I help, I'm sure that if this feature will be implemented then it needs to do step by step. Percy :)
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.