2
$\begingroup$

Suppose i have an integral which has a closed form,

$\quad \quad \int_{a}^{b} f(x) dx=F(a,b)$

I want to use output function $F$ as a pure function, like F[a,#]& so i try the following:

Integrate[f[x], {x, a, #}]&;

but this does not evaluate the integral before setting it as a pure function. So I tried the following:

Integrate[f[x], {x, a,b}];
(% /. {b -> #})&;

but this doesnot evaluate the last result variable %. So I also tried the following to no success:

Integrate[f[x], {x, a, #}]
Function[%];

In the maple programming language there is a command "unapply" which evaluates the definition of the function before assigning the arrow operator to it. Is there any equivalent to this in Mathematica? (I am new to Mathematica)

$\endgroup$
2
$\begingroup$

Not sure how general solution you want but you can do something like:

Evaluate[Integrate[f[x], {x, a, b}] /. b -> (#)] &
$\endgroup$
  • $\begingroup$ Thank you that's general enough for me. $\endgroup$ – user13892 Apr 18 '15 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.