Re: How to simplify "Integrate[2 f[x], {x, 0, 1}]/2" to "Integrate[f[x],
- To: mathgroup at smc.vnet.net
- Subject: [mg109216] Re: How to simplify "Integrate[2 f[x], {x, 0, 1}]/2" to "Integrate[f[x],
- From: "David Park" <djmpark at comcast.net>
- Date: Sat, 17 Apr 2010 06:05:08 -0400 (EDT)
I don't think you are overlooking anything. You could write specific transformation rules. But the Presentations package ($50) at my web site has a section called Student's Integral that allows the manipulation of single variable integrals before evaluation. It is mainly meant for teaching integration techniques, but could also be used for derivations in notebooks. You can do breakout of integrals, and also apply integration techniques such as performing operations on the integrand, change of variable, integration by parts and trigonometric substitution. After manipulation, integral can be evaluated either from a BasicIntegralTable such as students might use, or by using the built-in Mathematica commands. Or you could create your own integral table. You might have some complicated integral that takes Mathematica a long time to evaluate and needs manipulation to a specific form for your use. If you put this in your own table it will subsequently evaluate very quickly in the form you desire. Another nice feature is that the Assumptions are only put in at the time you evaluate so you can have a nice standard integral display during any derivation. In any case, for your example we use only a minimal feature. (Unevaluated integrals are entered with integrate instead of Integrate. I can't paste the box form of the results into an email, but just copy and paste into your notebook.) Needs["Presentations`Master`"] 1/2 integrate[2 f[x], {x, 0, 1}] % // BreakoutIntegral 1/2 \!\( \*SubsuperscriptBox[\(\[Integral]\), \(0\), \(1\)]\(\(2\ f[x]\) \[DifferentialD]x\)\) \!\( \*SubsuperscriptBox[\(\[Integral]\), \(0\), \(1\)]\(f[x] \[DifferentialD]x\)\) David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: Klaus Engel [mailto:klaus.engel at tiscali.it] Dear group, 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 (same result for "Simplify" instead of "FullSimplify"), i.e., Mathematica seems not to be aware that the factor "2" can be canceled out. Even worse, the expressions TrueQ[Integrate[2 f[x], {x, 0, 1}]/2 == Integrate[f[x], {x, 0, 1}]] 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}] return the (wrong) result "False". So my question: Is there something I am overlooking, or what is the right "Mathematica" way to treat expressions like the one above. Thanks a lot in advance, Klaus ------------ Klaus Engel <klaus.engel at tiscali.it>