# NIntegrate giving a linear result for non-linear integrand

I am getting this really weird error when using NIntegrate. I am trying to integrate the composition of these two functions

Temp[t_] := 285. - 15.*Sin[2*Pi*t/365.];
bT[Tmp_] := 5.0*Exp[-(Tmp - 290.)^2/(2*7.^2)];
Plot[bT[Temp[t]], {t, 0, 365.}]


This is a highly non-linear function but when trying to integrate with NIntegrate I get a linear function

tt[t_?NumericQ] := NIntegrate[bT[Temp[s]], {s, 0, t}];
Plot[tt[t], {t, 0, 365.}]


This sounds like it is some stupid mistake, but I can't for the life of me figure out what I am doing wrong. Can anyone help me find out what I am doing wrong?

• I cannot reproduce the problem. Maybe there is a hanging definition. Please try to restart the kernel with Exit[] and try the computations again. – Henrik Schumacher Nov 26 '18 at 21:50
• Consider Plot[tt[t], {t, 50, 120.}]. – user64494 Nov 27 '18 at 4:22
• @HenrikSchumacher using Exit[] worked like a charm! I am just confused as I was already using ClearAll["Global*"]. Doesn't it also clear the hanging definitions? – Guilherme Casas Gonçalves Nov 27 '18 at 23:24
• Hm. ClearAll["Global*"] clears only symbols in the global context. Usually, that should suffice. But sometimes, it is better to "turn it off and on again". ("It" is Mathematica's kernel in this cases.) – Henrik Schumacher Nov 28 '18 at 6:09