Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

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

Search the Archive

Integrate bug and workaround

  • To: mathgroup at
  • Subject: [mg1050] Integrate bug and workaround
  • From: Steven Trainoff <steve at>
  • Date: Wed, 10 May 1995 09:05:38 -0400

Hello all,

I am constantly amazed at how fickle MMA's integrator is.  Perhaps  
this example is well known, but it sure surprised me.  Can anyone  
explain this behaviour, or is it a simple bug?  I am running MMA  
version "NeXT 2.0 (November 14, 1991)"

(* It can't do this... *)

In[1]:= Integrate[x E^(Sqrt[z^2]*x), x ]

                   x Sqrt[z ]
Out[1]= Integrate[E           x, x]		

(* Replace Sqrt with an arbitrary unknown function and it works  
fine... *)

In[2]:= Integrate[x E^(f[z^2]*x), x ]		
         x f[z ]      2 -2     x
Out[2]= E        (-f[z ]   + -----)
                             f[z ]

(* Here is a brute force workaround *)
In[3]:= Unprotect[Integrate]

Out[3]= {Integrate}

In[4]:= Integrate[x_ E^(a_ x_), x] := E^(a*x)*(-a^(-2) + x/a) /;  

In[5]:= Protect[Integrate]

Out[5]= {Integrate}

(* Now it can do the original integral *)
In[6]:= %1

         x Sqrt[z ]    -2      x
Out[6]= E           (-z   + --------)
                            Sqrt[z ]

Insert pithy maxim here...
steve at (NeXT mail)

  • Prev by Date: Re: Re: Summary:Ways to get Odd Columns&Rows of Matrix
  • Next by Date: How to solve system of iinequalities?
  • Previous by thread: Re: Re: Summary:Ways to get Odd Columns&Rows of Matrix
  • Next by thread: Re: Integrate bug and workaround