I need to call some function defined in a subsection of some section of mathematica's .nb file. The code of its evaluation and displaying looks like
f[x_,y_,z_,t_] := Integrate[...] f[x,y,z,t] I need to use this function in another subsection of the same section. First, in order to check whether it is called correctly in this subsection, I just need to display it, so I write
f[x,y,z,t] I expect immediate displaying, since the function is already defined and evaluated. But sometimes the time for displaying is comparable with the time of evaluating the integral from the first subsection! What are general reasons for this and how to avoid this?
P.S. I don't attach the precise code since I don't understand what to attach (i.e., what is relevant).
f[x_]:=f[x]=...will store every value offfor every argument that has already been plugged in. Remember that this may crowd your memory if you do callffor a large number of different arguments whithout emptying the memory in the meantime. But for usual cases this is fine $\endgroup$