{"id":350,"date":"2012-09-18T18:09:20","date_gmt":"2012-09-19T00:09:20","guid":{"rendered":"http:\/\/www.ghyzmo.com\/?p=350"},"modified":"2012-11-16T21:22:58","modified_gmt":"2012-11-17T04:22:58","slug":"grokking-calculus-integral-calculus","status":"publish","type":"post","link":"http:\/\/www.ghyzmo.com\/grokking-calculus-integral-calculus\/","title":{"rendered":"Grokking Calculus--Integral Calculus"},"content":{"rendered":"<p><em>\u00a9Fernando Caracena 17 September 2012<\/em><\/p>\n<p>The integral of a single valued function, f(x), is the area between the curve generated in x-y coordinates by the assignment y=f(x) and the x-axis, as shown in GC part I as the green area in Fig. 2. This area can be estimated very well numerically, as is illustrated by the python-based calculation in listing 1.<\/p>\n<div id=\"attachment_352\" style=\"width: 292px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.ghyzmo.com\/grokking-calculus-integral-calculus\/intgrlasrectarea\/\" rel=\"attachment wp-att-352\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-352\" class=\" wp-image-352\" title=\"IntgrlAsRectArea\" src=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectArea.png\" alt=\"Intergal approximated as 10 rectangular areas\" width=\"282\" height=\"213\" srcset=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectArea.png 812w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectArea-150x113.png 150w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectArea-300x226.png 300w\" sizes=\"auto, (max-width: 282px) 100vw, 282px\" \/><\/a><p id=\"caption-attachment-352\" class=\"wp-caption-text\">Fig. 1 Integral approximated as the sum of 10 rectangular areas of width dx=0.1<\/p><\/div>\n<p>The process of approaching the limit dx--&gt;0 is here demonstrated by using successive values of dx that become smaller by powers of 10. The smaller the value of dx, the greater the number of rectangular area elements. Fig. 1 is an example of one approximation of the area under the curve y=sin(x*pi) over the range 0 to 1(red curve) as the sum of 10 rectangular area elements. The height of each rectangle is approximated as 0.5*(y<sub>i<\/sub>+y<sub>i+1<\/sub>), and the corresponding area element is 0.5*(y<sub>i<\/sub>+y<sub>i+1<\/sub>)*dx. Note that the sum runs over i=0, 9.<\/p>\n<div id=\"attachment_353\" style=\"width: 296px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.ghyzmo.com\/grokking-calculus-integral-calculus\/intgrlasrectareafine\/\" rel=\"attachment wp-att-353\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-353\" class=\" wp-image-353\" title=\"IntgrlAsRectAreaFine\" src=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectAreaFine.png\" alt=\"Integral as a sum of 100 rectangular area elements\" width=\"286\" height=\"216\" srcset=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectAreaFine.png 812w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectAreaFine-150x113.png 150w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntgrlAsRectAreaFine-300x226.png 300w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/a><p id=\"caption-attachment-353\" class=\"wp-caption-text\">Fig. 2 The integral approximated as the sum of 100 rectangular area elements, each having a width of dx=0.01.<\/p><\/div>\n<p>Fig. 2 shows the approximation corresponding the that shown in Fig. 1 but with a hundred, rectangular area elements instead of ten. Note that in this case, the areas appear to the eye to be a closer approximation to that under the curve.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_354\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.ghyzmo.com\/grokking-calculus-integral-calculus\/integralassumofrectareas\/\" rel=\"attachment wp-att-354\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-354\" class=\" wp-image-354\" title=\"IntegralAsSumOfRectAreas\" src=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntegralAsSumOfRectAreas.gif\" alt=\"Limit of sum Of rectangular area elements\" width=\"300\" height=\"300\" srcset=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntegralAsSumOfRectAreas.gif 800w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntegralAsSumOfRectAreas-150x150.gif 150w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2012\/09\/IntegralAsSumOfRectAreas-300x300.gif 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-354\" class=\"wp-caption-text\">Fig. 3 The approach to dx=0 by reducing each sum over rectangular areas by an order of magnitude, successively to dx=1.0 x\u00a010-7.<\/p><\/div>\n<p>The integral evaluated by conventional methods of calculus yields the value of 2.\/pi or 0.63661977236<span style=\"color: #800000;\">758138<\/span>.<\/p>\n<p>The value of the integral estimated using dx= 10<sup>-7<\/sup>, is 0.636619772368 which compares favorably with the above computed value rounded off at the appropriate decimal place(red and following decimal places).<\/p>\n<p>&nbsp;<\/p>\n<h2><em>A left brained approach<\/em><\/h2>\n<p>The integral\u00a0 of f(x) between x values of 0 and 1 is estimated here as the sum of a series of rectangular areas each having a width of \u0394x, beginning with the value, \u0394x=0.1, for which there are ten, rectangular area elements. The range of x-values is a discrete series: x<sub>i<\/sub>=i*\u0394x, where i=0,1,2,....10 (11 points). The values of y=f(x) at each of these points are given the symbol y<sub>i<\/sub>, where y<sub>i<\/sub>=f(x<sub>i<\/sub>). The integral is approximated as the sum of rectangular area elements: 0.5*(y<sub>i<\/sub>+y<sub>i+1<\/sub>)*\u0394x , where i=0,2,3,...,9. Note what happens when we add two adjacent area elements:<\/p>\n<p>0.5*(y<sub>0<\/sub>+y<sub>1<\/sub>)*\u0394x+0.5*(y<sub>1<\/sub>+y<sub>2<\/sub>)*\u0394x=0.5*(y<sub>0<\/sub>+2*y<sub>1<\/sub>+y<sub>2<\/sub>)*\u0394x<\/p>\n<p>[0.5*(y<sub>0<\/sub>+y<sub>1<\/sub>)*dx+0.5*(y<sub>1<\/sub>+y<sub>2<\/sub>)]*\u0394x=(0.5*y<sub>0<\/sub> + y<sub>1<\/sub>\u00a0\u00a0+0.5*y<sub>2<\/sub>)*\u0394x.<\/p>\n<p>Following this logic we can write out the sum over all elements as,<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: small;\">\u03a3<\/span><sub><span style=\"font-size: small;\">i=0<\/span><\/sub><sup><span style=\"font-size: small;\">10<\/span><\/sup> 0.5*(y<sub>i<\/sub>+y<sub>i+1<\/sub>)*\u0394x = (0.5*y<sub>0<\/sub>+y<sub>2<\/sub>+y<sub>3<\/sub>+y<sub>4<\/sub>+... 0.5*y<sub>10<\/sub>)*\u0394x\u00a0 .<\/p>\n<p>&nbsp;<\/p>\n<p>When we use \u0394x=0.01, we have 100 area elements to sum over, and the expression becomes,<\/p>\n<p>\u03a3<sub>i=0<\/sub><sup>100<\/sup> \u00a00.5*(y<sub>i<\/sub>+y<sub>i+1<\/sub>)*\u0394x = (0.5*y<sub>0<\/sub>+y<sub>2<\/sub>+y<sub>3<\/sub>+y<sub>4<\/sub>+... 0.5*y<sub>100<\/sub>)*dx . Note that the number of discrete elements increases as 1\/\u0394x, and that the approximation gets better as\u00a0\u0394x gets closer to zero.<\/p>\n<h2><em>Closing the loop on integration<\/em><\/h2>\n<p>Computationally, we can do very well estimating an integral by numerical methods on a computer. Analytically, we can do better by noting what happens in the limit as\u00a0\u0394x approaches zero to the area element (\u0394_area)<\/p>\n<p>\u0394_area = 0.5*(y<sub>i<\/sub>+y<sub>i+1<\/sub>)*\u0394x\u00a0\u00a0\u00a0\u00a0 (1)<\/p>\n<p>\u0394_area =y(x) \u0394x\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (2)<\/p>\n<p>or<\/p>\n<p><span style=\"font-family: Liberation Mono,monospace;\"><span style=\"font-size: small;\">lim <\/span><\/span><sub><span style=\"font-family: Liberation Mono,monospace;\"><span style=\"font-size: small;\">\u0394x-&gt;0<\/span><\/span><\/sub> \u0394_area\/\u0394x = y(x).\u00a0\u00a0\u00a0\u00a0 (3a)<\/p>\n<p>The limiting process on the left hand side (LHS) of (3a) is usually abbreviated in calculus by the symbol d_area\/dx, so that the equation is shown as follows:<\/p>\n<p>d_area\/dx =\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 y(x).\u00a0\u00a0\u00a0\u00a0 (3b)<\/p>\n<p>Note that the function to be integrated, f(x), is the derivative of the integral of the function. It becomes possible for someone experienced in calculus to guess the form of the integral function from the form of y(x). For example, the integral of f(x)=x<sup>n<\/sup> is just x<sup>n+1<\/sup>\/(n+1), the derivative of which is x<sup>n<\/sup>. This form of an integral is called the indefinite integral because the addition of any arbitrary constant added to it does not change its derivatives. Notationally, the function corresponding to the indefinite integral and its relation to the integrand are given by the following formulas, respectively:<\/p>\n<p>I(x)=\u222b f(x) dx\u00a0 + constant, \u00a0 \u00a0 \u00a0\u00a0\u00a0\u00a0 (4a)<\/p>\n<p>f(x)= dI(x)\/dx. \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (4b)<\/p>\n<h3><em>Definite integrals<\/em><\/h3>\n<p>Often we are interested in the value of an integral over a restricted range of x. In that case, we write the integral as follows:<\/p>\n<p>I = \u222b<sub>1<\/sub><sup>2<\/sup> f(x) dx,\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (5)<\/p>\n<p>where 1 and 2 in the integral stand for the starting valurediculouse of x and its final value, respectively, over which the integration is performed. The definite integral is evaluated from the inverse derivative function, I(x) evaluated at the end points, the first subtracted from the second,<\/p>\n<p>I<sub><span style=\"font-family: Liberation Mono,monospace;\"><span style=\"font-size: small;\">12\u00a0= <\/span><\/span><\/sub>I\u00a0(x<sub>2<\/sub>) -I(x<sub><span style=\"font-family: Liberation Mono,monospace;\"><span style=\"font-size: small;\">1<\/span><\/span><\/sub>).\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (6)<\/p>\n<p>Where I(x) is the function that is determined from the indefinite integral, which is of the form (4a).<\/p>\n<p>It is not difficult to show that the integral function I(x) is the inverse-derivative of f(x), or that alternatively, f(x) is the derivative of i(x). First, consider the definite integral performed over a small range,x to x+ \u0394x,<\/p>\n<p>rediculous\u0394I(x)=\u222b<sub>x<\/sub><sup>x+\u0394x<\/sup> f(x') dx' . \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (7)<\/p>\n<p>If the range,\u00a0\u0394x , the integral is approximated by a small rectangular area of height f(x) and width \u0394x:<\/p>\n<p>\u0394I(x)\u2248f(x)\u0394x .\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (8)<\/p>\n<p>The limiting value of the ratio of the integral over this range, as \u0394x approaches zero, is just the derivative of I(x),<\/p>\n<p>Lim<sub> \u0394x-&gt; 0 <\/sub>\u0394I(x)\/\u0394x =dI(x)\/dx ,\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (9)<\/p>\n<p>which in conventional notation appears as<\/p>\n<p>dI(x)\/dx=f(x).\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (10)<\/p>\n<h3><em>Derivative and integral of some trigonometric functions<\/em><\/h3>\n<p>The sine and cosine functions are of particular interest here. We use the following identities in what follows:<\/p>\n<p>sin(A)<sup>2<\/sup>+cos(A)<sup>2<\/sup>=1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (11)<\/p>\n<p>sin(A+B)=sin(A)*cos(B)+cos(A)*sin(B)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (12)<\/p>\n<p>cos(A+B)=cos(A)*cos(B)-sin(A)*sin(B)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (13)<\/p>\n<p>lim <sub>A -&gt; 0<\/sub> sin(A)\/A =1. \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (14)<\/p>\n<p>In addition, we need the following approximation of the square root:<\/p>\n<p>\u221a(1+ \u03b5)\u2248 1+0.5*\u03b5,\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (15)<\/p>\n<p>when \u03b5 &lt;&lt; 1.<\/p>\n<p>Using the above properties, we can construct derivatives and integrals of the sine and cosine functions. Note that he angle measure used in these expressions is in radians (not degrees), which are defined as the arc length subtended by a given angle, having its vertex at the center of a circle, divided by the radial distance to that arc. There are 2*\u03c0 radians in a circle, so that one radian is 180.\/\u03c0 degrees, or\u00a0 57.29577951308232 degrees as computed using python.<\/p>\n<h3><em>Evaluating the derivatives of sine and cosine functions<\/em><\/h3>\n<p>The derivative of the sine function is derived in sufficient detail below that the reader should be able to follow it without much trouble. First of all, consider what this derivative is by definition:<\/p>\n<p>d sin(x)\/dx=Lim<sub> \u0394x-&gt; 0\u00a0 <\/sub>\u0394sin(x)\/\u0394x .\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (16a)<\/p>\n<p>The term to be evaluated on the right hand side of (15) is written out as,<\/p>\n<p>[sin(x+\u0394x)-sin(x)]\/\u0394x=sin(x)(cos(\u0394x)-1)\/\u0394x+cos(x)sin(\u0394x)\/\u0394x . (16b)<\/p>\n<p>Using the trigonometric relation (12) we can evaluate the LHS of (16b)<\/p>\n<p>[sin(x+\u0394x)-sin(x)]\/\u0394x={sin(x)[cos(\u0394x)-1]+cos(x)sin(\u0394x)}\/ \u0394x.\u00a0 \u00a0\u00a0 (16c)<\/p>\n<p>Using the trigonometric identity (11) we can solve for the first term on the RHS of (16c) to evaluate the limit of this term,<\/p>\n<p>cos(\u0394x)=\u221a[1-sin(\u0394x)<sup>2<\/sup>],\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (16d)<\/p>\n<p>which using (15) for small values of \u0394x, approximates to<\/p>\n<p>cos(\u0394x)\u22481-(1\/2)*sin(\u0394x)<sup>2 <\/sup>.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (16e)<\/p>\n<p>Subtracting 1 from both sides of the equation, we get the following:<\/p>\n<p>cos(\u0394x)-1\u2248 -(1\/2)*sin(\u0394x)<sup>2 <\/sup>. \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (16f)<\/p>\n<p>Note that Lim<sub> \u0394x-&gt; 0\u00a0 <\/sub>sin(\u0394x)<sup>2 <\/sup>\/\u0394x = (1)*sin(\u0394x)<\/p>\n<p>or<\/p>\n<p>Lim<sub> \u0394x-&gt; 0\u00a0 <\/sub>sin(\u0394x)<sup>2 <\/sup>\/\u0394x =0.<\/p>\n<p>Therefore,<\/p>\n<p>Lim<sub> \u0394x-&gt; 0\u00a0 <\/sub>[sin(x+\u0394x)-sin(x)]\/\u0394x=cos(x),<\/p>\n<p>where we have inserted the limiting value<\/p>\n<p>Lim<sub> \u0394x-&gt; 0\u00a0 <\/sub>sin(\u0394x)\/\u0394x =1<\/p>\n<p>in the RHS second term of (16b). Using conventional notation, we express the derivative of the sine function as follows:<\/p>\n<p>d sin(x)\/dx= cos(x).\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (17a)<\/p>\n<p>Problem 1. Show that d sin(a*x)\/dx= a*cos(a*x).\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (17b)<\/p>\n<p>Problem 2. Show that d cos(a*x)\/dx= -a*sin(a*x).\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (18)<\/p>\n<h2><em>Closure<\/em><\/h2>\n<p>The function displayed in Fig. 1 was computed using the function,<\/p>\n<p>f(x) = sin(\u03c0*x). We look for a function, the derivative of which is this function. We find it in (18), where a=\u03c0 evaluates it to<\/p>\n<p>d cos(\u03c0*x)\/dx= -\u03c0*sin(\u03c0*x). Now the limits of the integral are x=0 and x=1. The indefinite integral of sin(\u03c0*x) is there fore given by the following:<\/p>\n<p>I(x)=\u222bsin(\u03c0*x) dx\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (19a)<\/p>\n<p>I(x)=-cos(\u03c0*x)\/\u03c0 . \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 (19b)<\/p>\n<p>Now we have sufficient information to evaluate the integral of the function used in generating Figs. 1 and 2:<\/p>\n<p>I<sub><span style=\"font-family: Liberation Mono,monospace;\"><span style=\"font-size: small;\">12<\/span><\/span><\/sub>={-cos(\u03c0)-[-cos(0)]}\/\u03c0\u00a0 , \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (2a)<\/p>\n<p>which evaluates to,<\/p>\n<p>I<sub>12<\/sub>=2\/\u03c0 .\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 (2b)<\/p>\n<p>In python (2b) results in the number, 0.63661977236758138.<\/p>\n<h2><em>End note<\/em><\/h2>\n<p>Python has great precision in evaluating expressions such as sine and cosine functions. Most fellow physicists looking over my shoulder would criticize me for using ridiculously the extreme of precision afforded by Python. This I did to show how well we can estimated the value of an integral numerically on the computer. Measurements in physics actually have a limit of validity that is imposed by the limit of precision of measurements.<\/p>\n<p>In the early days of atomic physics when various necessary data were not known very precisely, say to only three digits, physicists could easily estimate reaction rates and other features of a reactor using the back of an envelope calculation. Enrico Fermi, whose group achieved the first sustained chain reaction on an atomic reactor that they built, kept notebooks that contained numerous estimates of integrals evaluated numerically by hand. Today, the computer may provide much more precision in our calculations than is justified by the precision of measured values. In that, the results should be rounded off to the number of significant figures supported by the quantities that entered into the calculation.<\/p>\n<p>If you want to hone your skills in calculus, you can go <a href=\"http:\/\/www.analyzemath.com\/calculus.html\">here<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Listing 1.<\/p>\n<p>#----------------------------------------------------------------------------------------------------<\/p>\n<p># Generating Fig. 1<\/p>\n<p>ipython --pylab<br \/>\nfrom pylab import *<\/p>\n<p>a=1.0<br \/>\nx=arange(0,1.1, 0.1)<br \/>\ny=a*sin(math.pi*x)<br \/>\nsy=shape(y)<br \/>\nsy=sy[0]<br \/>\nfigure()<br \/>\nline=plot(x,y, color='r')<br \/>\nplot([0,1.0],[1.2,1.2], color='w')<br \/>\nyold=0<br \/>\nfor i in range(0,sy):<br \/>\nyav=0.5*(y[i]+y[i+1])<br \/>\nplot([x[i],x[i]],[0,yav])<br \/>\nplot( [x[i],x[i+1]],\u00a0 [yav,yav]\u00a0 )<br \/>\nplot([x[i+1],x[i+1]],[yav,0])<br \/>\nyold=yavxlabel('x', color='k')<br \/>\nylabel('y', color='k')<br \/>\ntitle(\"Integral as sum or rectangular areas\", color='k')<\/p>\n<p>#--------------------------------------------------------------------------------------------------<\/p>\n<p>#Generating Fig. 2<\/p>\n<p>a=1.0<br \/>\nx=arange(0,1.01, 0.01)<br \/>\ny=a*sin(math.pi*x)<br \/>\nsy=shape(y)<br \/>\nsy=sy[0]<br \/>\nfigure()<br \/>\nline=plot(x,y, color='r')<br \/>\nplot([0,1.0],[1.2,1.2], color='w')<br \/>\nyold=0<br \/>\nfor i in range(0,sy):<br \/>\nyav=0.5*(y[i]+y[i+1])<br \/>\nplot([x[i],x[i]],[0,yav])<br \/>\nplot( [x[i],x[i+1]],\u00a0 [yav,yav]\u00a0 )<br \/>\nplot([x[i+1],x[i+1]],[yav,0])<br \/>\nyold=yav<\/p>\n<p>#-----------------------------------------------------------------------------------------------------<\/p>\n<p>#Progressive estimates of integral by assigning progressively smaller increments in x (dx) to give and approach of dx to zero.<\/p>\n<p>a=1<br \/>\ndx=1.0<br \/>\nfor i in range(0, 7):<br \/>\ndx=0.1*dx<br \/>\nx=arange(0,1.+dx, dx)<br \/>\ny=a*sin(math.pi*x)<br \/>\narea=dx*sum(y)<br \/>\nprint dx, area<br \/>\n# At this point, I manually inserted the output into respective arrays.<br \/>\nArea=[0.631375151468,0.636567411629,0.636619248769,0.63661976713,0.63661977231,0.636619772367,0.636619772368]<\/p>\n<p>dx=[0.1, 0.01, 0.001, 0.0001, 1e-05, 1e-06, 1e-07]<\/p>\n<p>plim=plot(dx, Area, color='k')<br \/>\nlim=str(double(2.\/math.pi))<br \/>\nlines=plot(dx, Area, color='k')<br \/>\nxlabel('dx', color='k')<br \/>\nylabel('Area', color='k')<br \/>\ntitle(\"Area as sum of retangles\", color='k')<br \/>\ntext(0.02,0.6365,r'limit='+lim)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Listing 1.<\/p>\n<p>#----------------------------------------------------------------------------------------------------<\/p>\n<p># Generating Fig. 1<\/p>\n<p>ipython --pylab<br \/>\nfrom pylab import *<\/p>\n<p>a=1.0<br \/>\nx=arange(0,1.1, 0.1)<br \/>\ny=a*sin(math.pi*x)<br \/>\nsy=shape(y)<br \/>\nsy=sy[0]<br \/>\nfigure()<br \/>\nline=plot(x,y, color='r')<br \/>\nplot([0,1.0],[1.2,1.2], color='w')<br \/>\nyold=0<br \/>\nfor i in range(0,sy):<br \/>\nyav=0.5*(y[i]+y[i+1])<br \/>\nplot([x[i],x[i]],[0,yav])<br \/>\nplot( [x[i],x[i+1]],\u00a0 [yav,yav]\u00a0 )<br \/>\nplot([x[i+1],x[i+1]],[yav,0])<br \/>\nyold=yavxlabel('x', color='k')<br \/>\nylabel('y', color='k')<br \/>\ntitle(\"Integral as sum or rectangular areas\", color='k')<\/p>\n<p>#--------------------------------------------------------------------------------------------------<\/p>\n<p>#Generating Fig. 2<\/p>\n<p>a=1.0<br \/>\nx=arange(0,1.01, 0.01)<br \/>\ny=a*sin(math.pi*x)<br \/>\nsy=shape(y)<br \/>\nsy=sy[0]<br \/>\nfigure()<br \/>\nline=plot(x,y, color='r')<br \/>\nplot([0,1.0],[1.2,1.2], color='w')<br \/>\nyold=0<br \/>\nfor i in range(0,sy):<br \/>\nyav=0.5*(y[i]+y[i+1])<br \/>\nplot([x[i],x[i]],[0,yav])<br \/>\nplot( [x[i],x[i+1]],\u00a0 [yav,yav]\u00a0 )<br \/>\nplot([x[i+1],x[i+1]],[yav,0])<br \/>\nyold=yav<\/p>\n<p>#-----------------------------------------------------------------------------------------------------<\/p>\n<p>#Progressive estimates of integral by assigning progressively smaller increments in x (dx) to give and approach of dx to zero.<\/p>\n<p>a=1<br \/>\ndx=1.0<br \/>\nfor i in range(0, 7):<br \/>\ndx=0.1*dx<br \/>\nx=arange(0,1.+dx, dx)<br \/>\ny=a*sin(math.pi*x)<br \/>\narea=dx*sum(y)<br \/>\nprint dx, area<br \/>\n# At this point, I manually inserted the output into respective arrays.<br \/>\nArea=[0.631375151468,0.636567411629,0.636619248769,0.63661976713,0.63661977231,0.636619772367,0.636619772368]<\/p>\n<p>dx=[0.1, 0.01, 0.001, 0.0001, 1e-05, 1e-06, 1e-07]<\/p>\n<p>plim=plot(dx, Area, color='k')<br \/>\nlim=str(double(2.\/math.pi))<br \/>\nlines=plot(dx, Area, color='k')<br \/>\nxlabel('dx', color='k')<br \/>\nylabel('Area', color='k')<br \/>\ntitle(\"Area as sum of retangles\", color='k')<br \/>\ntext(0.02,0.6365,r'limit='+lim)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>0.63661977236758138<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a9Fernando Caracena 17 September 2012 The integral of a single valued function, f(x), is the area between the curve generated in x-y coordinates by the assignment y=f(x) and the x-axis, as shown in GC part I as the green area &hellip; <a href=\"http:\/\/www.ghyzmo.com\/grokking-calculus-integral-calculus\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,25,10],"tags":[81,79,26],"class_list":["post-350","post","type-post","status-publish","format-standard","hentry","category-calculus-2","category-derivatives","category-mathematics","tag-derivatives","tag-mathematics","tag-tangents"],"_links":{"self":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts\/350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/comments?post=350"}],"version-history":[{"count":8,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts\/350\/revisions"}],"predecessor-version":[{"id":560,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts\/350\/revisions\/560"}],"wp:attachment":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/media?parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/categories?post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/tags?post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}