Counterexamples to differentiation under integral sign? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-26T08:41:39Z http://mathoverflow.net/feeds/question/105769 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/105769/counterexamples-to-differentiation-under-integral-sign Counterexamples to differentiation under integral sign? bort 2012-08-28T22:54:30Z 2012-08-29T00:19:45Z <p>I'm exploring differentiation under the integral sign (I want to be much faster and more assured in doing this common task). So one thing I'm interested in is good counterexamples, where both expressions </p> <p>$\frac{d}{dx} \int f(x,y)dy$ </p> <p>and </p> <p>$\int \frac{\partial}{\partial x} f(x,y)dy$ </p> <p>exist at some value of x but are not equal. Thanks in advance.</p> <hr> <p>Here is some of my exploration so far.</p> <p>My derivation for switching the derivative and integral is as follows:</p> <p>$\frac{d}{dx} \int f(x,y)dy = \frac{d}{dx}\int f(a,y)+\int_a^x \frac{\partial}{\partial s}f(s,y)dsdy = \frac{d}{dx}\int \int_a^x \frac{\partial}{\partial s}f(s,y)dsdy$, </p> <p>provided f is absolutely continuous in the x-direction (used FTC). Then provided $\frac{\partial}{\partial s}f(s,y)$ is integrable in some rectangle $[x,x'] \times \Omega$, we can apply Fubini and switch the order of integration,</p> <p>$= \frac{d}{dx}\int_a^x \int \frac{\partial}{\partial s}f(s,y)dyds$.</p> <p>Then using FTC again, the first integral and derivative cancel provided that $\int \frac{\partial}{\partial s}f(s,y)dy$ is continuous. </p> <p>Thus altogether the assumptions I need in order to switch integration order are</p> <p>1) f is absolutely continuous in the x-direction</p> <p>2) df/da is integrable in a rectangle where one side is a small interval containing x, and the other is the whole y-direction.</p> <p>3) $\int \frac{\partial}{\partial x} f(x,y)dy$ is continuous.</p> <p>4) and of course, the original expressions are defined.</p> <p>This was the most general I could go. The conditions seem messy and forgettable, so I'd like to find some nicer conditions I could use in general, if possible.</p> <p>Condition 3) seemed like it might be the easiest to toss, but I found a counterexample where all other conditions are satisfied but that one:</p> <p>Let y be the positive integers and dy be the counting measure, so we're just trying to flip a sum and the derivative. Let</p> <p>$f(x,y) = x$ for $\frac{1}{y+1} &lt; x &lt;\frac{1}{y}$ and zero elsewhere.</p> <p>Then we see the integral of the derivative of $f$ is $0$ at $x=0$ and the derivative of the integral is $1$ at $x=0$, thus providing one counterexample. Here conditions 1) and 3) were not satisfied, but the example could be easily modified to make 1) satisfied.</p> http://mathoverflow.net/questions/105769/counterexamples-to-differentiation-under-integral-sign/105773#105773 Answer by Robert Israel for Counterexamples to differentiation under integral sign? Robert Israel 2012-08-29T00:06:48Z 2012-08-29T00:06:48Z <p>Consider $$f(x,y) = \cases{ \text{sgn}(x) \dfrac{x^2-y^2}{x^2} &amp; for 0 &lt; |y| &lt; |x| \cr 0 &amp; otherwise }$$ Then $\displaystyle \int_{-1}^1 f(x,y)\ dy = 4 x/3$ for $-1 \le x \le 1$, so $\displaystyle \frac{\partial}{\partial x} \int_{-1}^1 f(x,y)\ dy = 4/3$, but $\dfrac{\partial}{\partial x} f(0,y) = 0$ so $\displaystyle \int_{-1}^1 \frac{\partial f}{\partial x}(0,y)\ dy = 0$.</p> http://mathoverflow.net/questions/105769/counterexamples-to-differentiation-under-integral-sign/105775#105775 Answer by paul garrett for Counterexamples to differentiation under integral sign? paul garrett 2012-08-29T00:19:45Z 2012-08-29T00:19:45Z <p>This is an interesting question... which appears to be about "calculus", but which asks for a better answer than could be given in "calculus". And, in fact, I would advocate turning the question around so that the answer to "Can we interchange?" is "Yes, with suitable interpretation...", rather than "Sometimes, but sometimes not."</p> <p>Upvoted Bob Israel's literal counter-example! :)</p> <p>An easier analogue is "Clairault's theorem" (I am not at all confident of the correctness of this attribution) about equality of mixed second partials: functions like $xy/(x^2+y^2)$ have unequal mixed second partials at $0$ ... but, from a <em>distributional</em> viewpoint the mixed second partials are absolutely equal. The "discrepancy" is in caring about pointwise values. (Meanwhile, there is also the opposite hazard of thinking that "almost everywhere 0" is operationally $0$ for distributional computations.)</p> <p>My point is that we oughtn't differentiate unless differentiation is a continuous operation on whatever space of functions, and we oughtn't integrate unless the integration is a continuous map on suitable spaces of functions... so that the question of interchange would be foregone... :)</p> <p>(A happy situation is when the integrand is a continuous compactly-supported function-valued function of the parameter, and that diff'n is a continuous map from one function-space to another, and then a Gelfand-Pettis integral discussion gives the interchangeability for general reasons. This kind of thing is why L. Schwartz put a perhaps-surprising emphasis on the point that what we now call "Schwartz functions" are functions which admit a smooth extension to a certain $n$-sphere compactification of Euclidean n-space. So, truly, by now, if a situation resists compactification and application of Gelfand-Pettis ideas, perhaps there is a genuine problem. I do also note that "Bochner" or "strong" (which seems to mean "constructed by analogy with Riemann integrals") integrals do not overcome these problems.)</p> <p>Reprise: there are certainly counter-examples to the literal question, but I'd recommend revising that question exactly in light of the nature of the counter-examples. :)</p>