Reputation: 238
Clear["Global`*"]
Integrate[t f[x, y], {y, 0, 1}] -
t Integrate[f[x, y], {y, 0, 1}] // FullSimplify
Why doesn't M@ know the result is zero?
Upvotes: 3
Views: 129
Reputation: 13191
It is not a bug. Since your f[x,y]
has no definition, Mathematica can't assume anything about the integrand t f[x, y]
You can make a rule to help Mathematica as mentioned below. But without a rule, Mathematica is doing the right thing here.
This has been discussed many places before. Here are some links
https://groups.google.com/forum/#!msg/comp.soft-sys.math.mathematica/jsiYo9tRj04/rQYCy-X3SXQJ
https://mathematica.stackexchange.com/questions/5610/how-to-simplify-symbolic-integration
For example, you can add this rule:
Clear["Global`*"]
Unprotect[Integrate];
Integrate[t_Symbol*f_,dom_]:=t*Integrate[f,dom];
Protect[Integrate];
Now it will give zero
Simplify@Integrate[t f[x,y],{y,0,1}]-t Integrate[f[x,y],{y,0,1}]
(*---> 0 *)
Upvotes: 3