Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Integrate with unknow function
Replies: 2   Last Post: Mar 24, 2013 4:16 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 891
Registered: 10/29/11
Re: Integrate with unknow function
Posted: Mar 24, 2013 4:16 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

If g is the indefinite integral of a contrinuous function f[x] then

Using a replacement rule

ClearAll[f, g, expr];

expr = Integrate[f[d], {d, 0, 3}] -
Integrate[f[d], {d, 0, 2}];

expr /. Integrate[f[x_], {x_, a_, b_}] ->
g[b] - g[a]

-g[2] + g[3]

Alternatively, defining an upvalue for f (TagSet)

ClearAll[f, g, expr];

expr = Integrate[f[d], {d, 0, 3}] -
Integrate[f[d], {d, 0, 2}];

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

expr

-g[2] + g[3]


Bob Hanlon


On Sat, Mar 23, 2013 at 3:25 AM, Shan <shan.pub@gmail.com> wrote:
> Hi,
>
> I have a very rookie question as follows:
>
> Integrate[f[d], {d, 0,3}] - Integrate[f[d], {d, 0,2}]
>
> How can I get the result as f[d]? Thanks very much for any help!
>
> shan
>





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.