# Providing Mathematica with a “known” antiderivative

Suppose, I wanted to calculate some definite (or indefinite) integral in Mathematica: $$\int_a^bf(x)\mathrm{d}x$$ Normally, this can be done using

Integrate[f[x], {x, a, b}]


which will give the result.

However, there are cases where no antiderivative exists for $$f$$. What I want to do is to "trick" Mathematica into thinking, that there exists some antiderivative $$F(x)$$ of $$f$$, even if this function would normally not be expressible in terms of "elementary functions".
That is, I want the above code to return

F[b] - F[a]


instead of returning the integral unevaluated. This may then be further simplified when I provide some expression for $$F$$, for example some approximation for the antiderivative.

## 1 Answer

Clear["Global*"]

f /: Integrate[f[x_], {x_, a_, b_}] := F[b] - F[a]

Integrate[f[y], {y, lb, ub}]

(* -F[lb] + F[ub] *)
`