Back to functions

integrate


integrate

Attempts to compute integral of the expression. The depth of integration can be set using the "integration_depth" flag but be careful as this can seriously degrade performance. See example below. The hasIntegral method can be used to check if the symbol was completely integrated. This method will return true if the method was not completely integrated. The default depth is 4.

Usage: nerdamer("integrate(expression_or_vector, dx)")


Parameters

expression expression_or_vector Returns the appropriate value if possible otherwise it returns the function with the simplified expression
expression dx The variable with respect to which integrate. Optional for univariate expressions.

Returns

Expression

EXAMPLES:
var x = nerdamer('integrate(10*q/(4*x^2+24*x+20), x)');
console.log(x.toString());
var y = nerdamer('integrate(sec(x)^2, x)'); 
console.log(y.toString());
var y = nerdamer('integrate([sec(x)^2, x^2, 2], x)');
console.log(y.toString());
var x  = nerdamer('integrate(cos(x)*x^6, x)');
console.log(x.toString());
//we can use the hasIntegral method to check if it was fully integrated
console.log(x.hasIntegral());
x = nerdamer.integrate('sinh(x)*e^x');
console.log(x.toString());
OUTPUT:
Back to functions