Evaluate integral limits using the antiderivatives expression, with a calculator

332 views Asked by At

THE QUESTION IS

Is there a compact way to evaluate an antidevivative expression: x**3 / 2 | x = a; x = b

When we have an indefinite integral of the form:

# Pseudocode as I cannot write it in math mode
expr = x**2; a = 1; b = 5;
F = integral(expr, x); # integral of expr
Definite_integral = F.subs(x, b) - F.subs(x, a);

We can also do this by just using the built-in integrate function

# Pseudocode
expr = x**2;
a = 1; b = 5;
Definite_integra = integrate(expr, x, a, b) # integrate expr from a to b

However, the problem is that I start with an expression for the antiderivative

x**3 / 3

Ideally, I'd just want to express it with itegration brackets, example: integration brackets I don't want to repeat myself and write the expression twice and I don't really want to declare the expression as a (unnecessary; only used unce) function just to express it as: f(b) - f(a) or more in line with Ti Nspire notation: f(x)|x=b - f(x)|x=a

1

There are 1 answers

0
soegaard On BEST ANSWER

You can define bracket using a little helper function. The screenshot below is from the Notes area.

enter image description here