       Re: Extending Integrate[]

• To: mathgroup at smc.vnet.net
• Subject: [mg87840] Re: Extending Integrate[]
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Fri, 18 Apr 2008 02:41:39 -0400 (EDT)
• Organization: Uni Leipzig

```Hi,

Integrate[] is, AFAIK a kernel function, written in C++,
you can't access it.

Regards
Jens

Szabolcs Horv=E1t wrote:
> On Wed, Apr 16, 2008 at 2:02 PM, dh <dh at metrohm.ch> wrote:
>> Hi Szabolcs,
>>  it looks like mathematica does not automatically distribute your rule=
over
>> Plus. This comes a bit as a surprise. But you can teach it. If you
>> additionally give the following rule:
>>  Integrate[a_+b_,x_]:=Integrate[a,x]+Integrate[b,x]
>>  then your example works. Of course you also need linearity.
>
> Hi Daniel,
>
>
> The problem with this approach is that it will prevent Integrate from
> working correctly in certain cases.  Here's an example:
>
> In:= expr = D[x*f[x], x]
> Out= f[x] + x*f'[x]
>
> In:= Integrate[expr, x]
> Out= x*f[x]
>
> In:= Unprotect[Integrate]
> Out= {"Integrate"}
>
> In:= Integrate[a_ + b_, x_] := Integrate[a, x] + Integrate[b, x]
>
> In:= Integrate[expr, x]
> Out= Integrate[f[x], x] + Integrate[x*f'[x], x]
>
> Jens's suggestion, i.e.
>
> Integrate[d_. + c_.*Sin[Sin[a_. + b_. x_]], x_] :=
>   c*Jones[a, x]/b + Integrate[d, x] /; FreeQ[c, x]
>
> appears to be reliable, but everything it does is still fully
> implemented with plain old pattern matching.  So my original
> suspicion, that the internal algorithms of Integrate[] cannot use
> these new definitions in any way, seems to be true.
>
> Szabolcs
>

```

• Prev by Date: Re: Possible bug in WAV export
• Next by Date: Re: A Problem with Simplify
• Previous by thread: Re: Extending Integrate[]
• Next by thread: If Integrate returns no result, can we conclude that no closed-form