Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

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
  • References: <fu4lnj$si9$1@smc.vnet.net> <4805EADE.1010908@metrohm.ch> <fu6mgu$nne$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

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,
>
> Thanks for the reply!
>
> The problem with this approach is that it will prevent Integrate from
> working correctly in certain cases.  Here's an example:
>
> In[1]:= expr = D[x*f[x], x]
> Out[1]= f[x] + x*f'[x]
>
> In[2]:= Integrate[expr, x]
> Out[2]= x*f[x]
>
> In[3]:= Unprotect[Integrate]
> Out[3]= {"Integrate"}
>
> In[4]:= Integrate[a_ + b_, x_] := Integrate[a, x] + Integrate[b, x]
>
> In[5]:= Integrate[expr, x]
> Out[5]= 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