Skip to main content
2 of 2
typo
kotozna
  • 329
  • 1
  • 6

Integration of NDSolve interpolating function contains overflow, indeterminate or infinity

I am solving the following PDE:

T = 1 + 2/2 (1 + Tanh[(x - 0.5) 8])
Q = -D[T, x]
eqn1 := G[x, v] - D[(1/3)*D[G[x, v], x], x] == (-v^4)*Exp[-v]*D[Q, x]

sol = NDSolve[eqn1, G, {x, 0, 1}, {v, 0, 15}]

and plot the solution

DensityPlot[G[x, v] /. sol, {x, 0, 1}, {v, 0, 15}]

which looks well-behaved. However, when I try to integrate the solution over one of the variables (v), Mathematica says "The integrand has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries":

intGdv = FunctionInterpolation[NIntegrate[G[x, v] /. sol, {v, 0, 15}], {x, 0, 1}]

Eventually, I want to differentiate this integral wrt x, i.e. to find $\partial_x(intGdv)$. What function can I use to perform this differentiation and why does Mathematica complain about the quality of the integrand above?

kotozna
  • 329
  • 1
  • 6