# NIntegrate and NumericQ [closed]

I need to do numerical integration --> differentiation --> numerical integration.

I tried to apply the technique described in the accepted answer to a similar question:

y = t^2 x^2;
f[t_?NumericQ] := NIntegrate[y, {x, 1, 2}]
g[t_?NumericQ] := D[f[t], t]
NIntegrate[g[t]*t, {t, 1, 2}]


However, it still generates the error:

NIntegrate::inumr: The integrand g[t] has evaluated to non-numerical values for all sampling points in the region with boundaries {{1,2}}. >>


This approach won't work due to the differentiation in between.

What am I missing?

-

## closed as off-topic by ciao, ubpdqn, Yves Klett, m_goldberg, belisariusApr 8 '14 at 11:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – ciao, ubpdqn, Yves Klett, m_goldberg, belisarius
If this question can be reworded to fit the rules in the help center, please edit the question.

The error says it all - you can't use NIntegrate without assigning a value to all variables/constants. See if you can find which var is unassigned –  Sektor Apr 8 '14 at 6:55

y[t_, x_] = t^2 x^2;