MathGroup Archive 2011

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

Search the Archive

Problem with Patterns and Integrate

  • To: mathgroup at
  • Subject: [mg123234] Problem with Patterns and Integrate
  • From: Jack McInerney <ejmcinerney at>
  • Date: Mon, 28 Nov 2011 05:53:30 -0500 (EST)
  • Delivered-to:

There is something about using patterns that I don't understand, and
am hoping someone can shed some light.  Here is an example of my
problem.  Say I have a function f[x] and I take the derivative of it.
I can then integrate it and get f[x] back:

In[167]:= expr = D[ f[x], x ]
Out[167]= f=E2=80=B2[x]

In[168]:= Integrate[expr, x]
Out[168]= f[x]

If I use a ReplaceAll and a pattern to do the integration, the
Integrate function treats f'[x] as a constant and returns the wrong

In[169]:= expr /. func_ ->  Integrate[func,x]
Out[169]= x f=E2=80=B2[x]

Any thoughts as to what I am doing wrong?


  • Prev by Date: Re: Domain of a function
  • Next by Date: import data problem
  • Previous by thread: Posting to blogger from a Mathematica notebook
  • Next by thread: Re: Problem with Patterns and Integrate