Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6786

Problem with Patterns and Integrate

From Jack McInerney <ejmcinerney@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Problem with Patterns and Integrate
Date 2011-11-28 10:55 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <javpbs$jbk$1@smc.vnet.net> (permalink)

Show all headers | View raw


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
answer:

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

Any thoughts as to what I am doing wrong?

Jack

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Problem with Patterns and Integrate Jack McInerney <ejmcinerney@gmail.com> - 2011-11-28 10:55 +0000
  Re: Problem with Patterns and Integrate A Retey <awnl@gmx-topmail.de> - 2011-11-29 12:04 +0000
  Re: Problem with Patterns and Integrate Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-11-29 12:06 +0000

csiph-web