Hello, I have a question concerning the following little example:
h = @(x) x.^2 + x.^4;h2 = @(x) sum( [x.^2, x.^4]);f = @(x) h(x) .* exp(-abs(x));f2 = @(x) h2(x) .* exp(-abs(x));f(3) % same values here
f2(3) %
m = quadgk( f , -inf, inf) % different values here
m2 = quadgk( f2 , -inf, inf) %
The pointwise evaluation of f and f2 yields the same values. Integrating the (pointwise equal) functions f and f2 with quadgk over the real line gives vastly different results. Isn't this strage?! Can some one give me a little hint how this can be? Thanks !
With best regards, Oscar
Best Answer