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

  • $\begingroup$ Welcome to MSE. Have you tried Maximize? $\endgroup$ – Rohit Namjoshi Dec 2 '19 at 15:14
  • $\begingroup$ Yes but it doesn't works. Maybe I'm wrong. $\endgroup$ – Lorenzo F Dec 2 '19 at 15:21
  • $\begingroup$ 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 $\endgroup$ – Lorenzo F Dec 2 '19 at 15:41
  • $\begingroup$ @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]. $\endgroup$ – MarcoB Dec 2 '19 at 22:42
  • $\begingroup$ 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. $\endgroup$ – Lorenzo F Dec 3 '19 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.