# How to find, for a temp. equation, Maxmum valus of position and time?

I have to find the position x and the time t for which the temperature is a maximum. I have a function T245[x_, y_, t_, b_, l_, d_, tau_] and I want to know the maximum value with given y_(=0), b, l,d, tau. Sorry for any error but I'm a newbie. Thanks

• Welcome to MSE. Have you tried Maximize? – Rohit Namjoshi Dec 2 '19 at 15:14
• Yes but it doesn't works. Maybe I'm wrong. – Lorenzo F Dec 2 '19 at 15:21
• Ok, sorry. In general he replies with NIntegrate::inumr: The integrand -(Erfc[ecc.] has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,0.0005},{0.,0.000707107}}. My function is a subtraction of integrals containing complementary error functions – Lorenzo F Dec 2 '19 at 15:41
• @LorenzoF It would be helpful if you could include the expression for T245 in your question. Clearly it seems to include some integrals, since the NIntegrate error, but it would be hard to say more without seeing the code. Perhaps you could try re-defining the T245 function to accept only numerical input, i.e. T245[x_?NumericQ, y_?NumericQ, .... <and all the others similarly]. – MarcoB Dec 2 '19 at 22:42
• T245[x_,y_,t_,b_,l_,d_,tau_]:=a * Sqrt(1+m^2) * NIntegrate[Erfc[Sqrt((x-alfa)^2+(y-beta)^2+(z-(m * alfa-d))^2)/Sqrt(4* t)]/Sqrt((x-alfa)^2+(y-beta)^2+(z-(m * alfa-d))^2)-Erfc[Sqrt((x-alfa)^2+(y-beta)^2+(z-(m * alfa-d))^2)/Sqrt(4 * (t-tau))]/Sqrt((x-alfa)^2+(y-beta)^2+(z-(m * alfa-d))^2), {beta,-b/2,b/2},{alfa,0,l}] This is the expression for T245. – Lorenzo F Dec 3 '19 at 8:23