[Date Index]
[Thread Index]
[Author Index]
Re: How to simplify "Integrate[2 f[x], {x, 0, 1}]/2" to "Integrate[f[x],
*To*: mathgroup at smc.vnet.net
*Subject*: [mg109218] Re: How to simplify "Integrate[2 f[x], {x, 0, 1}]/2" to "Integrate[f[x],
*From*: Bill Rowe <readnews at sbcglobal.net>
*Date*: Sat, 17 Apr 2010 06:05:30 -0400 (EDT)
On 4/16/10 at 5:53 AM, klaus.engel at tiscali.it (Klaus Engel) wrote:
>I tried to simplify an awkward looking integral with "Mathematica 7"
>using its "(Full)Simplify[...]" function. Unfortunately it failed to
>do so, even though I know that this would be possible. I boiled down
>the problem to the following very simple example ("f" is just a
>generic, undefined function): The input
>Integrate[2 f[x], {x, 0, 1}]/2 // FullSimplify
>returns just the input
>Integrate[2 f[x], {x, 0, 1}]/2
The problem is f is undefined. Consequently, Integrate[2 f...]
is returned unevaluated and neither FullSimplify nor Simplify
can do anything further with the unevaluated result.
>TrueQ[Integrate[2 f[x], {x, 0, 1}]/2 == Integrate[f[x], {x, 0, 1}]]
This will return False for the same reason FullSimplify and
Simplify fail to work
>SameQ[Integrate[2 f[x], {x, 0, 1}]/2 , Integrate[f[x], {x, 0, 1}]]
>Integrate[2 f[x], {x, 0, 1}]/2 === Integrate[f[x], {x, 0, 1}]
Both of these should return False since the left hand side and
right hand side are not identical. SameQ tests whether things
are identical which is not the same as being mathematically equal.
>So my question: Is there something I am overlooking, or what is the
>right "Mathematica" way to treat expressions like the one above.
As far as I know, there isn't anyway to do exactly what you are
asking. What you are asking is for Mathematica to partially
evaluate something it cannot fully evaluate. And it seems
currently something can either be evaluated or not, i.e., no
allowance for partial evaluation.
You could do something like:
In[5]:= Integrate[2 f[x], {x, 0, 1}]/2 /.
Integrate[a_?NumericQ b_, c_] :> a Integrate[b, c]
Out[5]= Integrate[f[x], {x, 0, 1}]
But this type of transform really isn't doing mathematics and
could break in some future version. It relies on the way Times
orders its arguments. And note restricting the pattern matching
to numeric arguments is essential since
In[6]:= Integrate[ x f[x], {x, 0, 1}]/x /.
Integrate[a_ b_, c_] :> a Integrate[b, c]
Out[6]= Integrate[f[x], {x, 0, 1}]
produces a result that is not generally mathematically valid.
Prev by Date:
**Re: Pade Approximation (further generalizations?---feature request)**
Next by Date:
**Re: piecewise function**
Previous by thread:
**Re: How to simplify "Integrate[2 f[x], {x, 0, 1}]/2" to "Integrate[f[x],**
Next by thread:
**Re: How to simplify "Integrate[2 f[x], {x, 0, 1}]/2" to "Integrate[f[x],**
| |