title: Integral 0 to pi/2 using montecarlo in R
body: <p>Trying to  find integral (o to pi/2) of    x^2 cosx using montecarlo method. This is  my first time so need some direction. To generate random number should I transform the limit of the integral to (0,1) or can I generate random numbers with the given limit (0 to pi/2) ? </p>
  
  <p>something like this ?</p>
  
  <p>transform the integral from (o to pi/2) to (0to 1) which tranforms the function to 1/x^2 sinx generate random number rnorm(10000,0,1)</p>
  
  <p>or Is there a way to generate random number like this rnorm(10000,0,1)*pi/2 with out having to transform the limit of the integral</p>