In[2]:= f[x_] := NIntegrate[ Exp[y], {y,0,x} ] In[3]:= f[1] Out[3]= 1.718281828459045 In[4]:= f[2] Out[4]= 6.389056098930651 In[5]:= Exp[2] Out[5]= E^2 In[6]:= N[%] Out[6]= 7.38905609893065 In[7]:= y=2 Out[7]= 2 In[8]:= f[y] Out[8]= 6.389056098930651 In[10]:= f[x_] = Integrate [ Exp[y], {y,0,x} ] Integrate::ilim: Integration limit {2, 0, x} is not of the form {x,xmin,xmax}. Out[10]= Integrate[E^2, {2, 0, x}] In[11]:= f[x_] = Module[{y}, Integrate[ Exp[y], {y,0,x}] ] Out[11]= -1 + E^x In[12]:= f[2] Out[12]= -1 + E^2 In[13]:= N[f[2]] Out[13]= 6.38905609893065 In[14]:= g[x_] = Integrate[ x E^x , x ] Out[14]= E^x*(-1 + x)