Calculus Tutorial 4 -advanced Topics

  • Uploaded by: Dr Srinivasan Nenmeli -K
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Calculus Tutorial 4 -advanced Topics as PDF for free.

More details

  • Words: 5,773
  • Pages: 26
Calculus Tutorial -4 Advanced topics Introduction My earlier two tutorials form the basic content of differential and integral calculus. I present in this tutorial some advanced material ---topics usually taught in a first course in Calculus.I presume you have mastered the contents of the first two tutorials before you take up this one.This is based on many results given in the earlier tutorial. In this tutorial, we would learn: • • • • •

Higher derivatives Maxima ,minima of functions through derivatives Simple optimisation problems Partial derivatives Numerical integration

1 Second derivatives A second derivative is the derivative of the derivative. To illustrate:

The derivative of y: We call this "first derivative". Let us differentiate again:

This we call the second derivative.Note the notation we are using: f'(y) is first derivative f''(y) is second derivative ; f'''(Y) is third derivative and so on. The physical meaning should be grasped at this point: The given function is a parabola. The first derivative is the equation for a tangent line to this curve. f'(y) = 6x+2 gives the equation of the tangent line which gives the slope of the curve at any given point. Take a point P(2,24) on this parabola.The slope of the curve at that point is f'(2)= 6 x2 +2 = 14.

The second derivative f''(y) gives the slope of the tangent line: which is 6 ,of course: y'=mx+c where m=6,c=2 Therefore the second derivative gives the slope of the tangent to the given curve.

Example1

Find the first and second derivatives for the function:

Differentiating again:

Example 2 S(t):

Find the velocity and acceleration as a function of time for a bicycle if the distance traveled

s(t)= 12t^2 +120 t + 20 where s is in meters and t is in minutes. Find the velocity and acceleration at time t= 2minutes.

Velocity v(t) = d S/dt= 24t+120 Acceleration a(t) = dv/dt = d^2s/dt^2= 24 The acceleration is constant , at 24 meters/minute.minute , while the velocity v(2)= 24 x 2+120 =168 meters per minute. or 168 x60 = 6880 meters /hour = 6.8 kilometers per hour Example 3

Find the first and second derivative for the function :

Example 4 Marginal Costing The cost function for a product: C(Q)= 200 -12Q+ 2 Q^2 [in $]where Q is the production quantity. Find the first and second derivatives. The first derivative gives the marginal cost for increasing the production by one unit. Find the marginal cost at the production level of 100 units.At what rate the marginal cost will increase?

marginal cost C'(100)= 400 - 12= 388 $ [ The Marginal Cost means the additional increase in cost when the production is increased by one unit at that level,that is from 100 units to 101 unit. ] The marginal cost increases constantly at 4$ .

Example5

Find the first and seecond derivative of : y= 2x^2 + sin 2x

Practice Problems: 1 Find the second derivative for y= cot x 2 for y= t/(1-t^2) 3 4

for y= xtanx for y= 2sinx + 3 cos x

5

for y= sec x

6 A car is speeding at the speed of 45 miles per hour or 66 feet per second when the driver applies the brake.The car comes to a stop after some distance .The distance with time during braking is as follows: s(t) = -8.5t^2 +66 t where s is in feet and t in seconds.Find the velocity and acceleration as a function of time and find when the car will come to a stop. Ans: after 3.9 seconds 6 An astronaut throws a rock standing on the moon. The height of the rock follows the equation:

Find the velocity and accceleration as a function of time. Find the time when it reaches maximum height by setting velocity = 0 and find the maximum height. Compare the acceleration with that of acceleration on the earth's surface.

h'(t) = 0; then t= 27/5.4= 5 seconds h(5)=-2.7 x 25 + 27 x 5 + 6 = 73.5 feet. The acceleration due to gravity on the moon is approximately 1/6th of g on earth which is 32 feet/sec^2. ---------------------------------------------------------------------

2 Finding the maximum and minimum points of a function We shall use calculus to find the maximum and minimum points of a function. To illustrate the method, let us take a simple example first. Consider the function : y = 4 x(1-x) Can you guess the value of x for which y is a maximum in the interval: x:[0,1] You can find by inspection that the value of y is a maximum at x=0.5 ; y = 1 Let us make a small table for this function:

X 1-x y -----------------0 1.0 0 0.1 0.9 0.36 0.2 0.8 0.64 0.4 0.6 0.96 0.5 0.5 1 <-------- max value 0.6 0.4 0.96 0.8 0.2 0.64 0.1 0.9 0.36 1 0 0 ---------------------What do you see here? The given function is symmetric about x=0.5 and reaches maximum at x= 0.5 What is this function anyway?

This is a parabolic or quadratic equation. Let us find the slope of this curve at various points in the inerval x=0 to x=1. We can draw the tangent at various points and get their slopes. Using differential calculus, we find the slope by getting the first derivative.

You note that this tangent equation for the slope of the given function is a straight line. At the maximium point ,x=0.5,

This is not surprising ,because the tangent at the maximum point is flat, a horizontal line ,parallel to the x axis.In a X_Y graph, any horizontal line has zero slope.At x=0.5, y' =4-8x0.5 =0 Therefore ,by using the first derivative and finding the zero of this first derivative or its roots, we can find out the maximum point. The same method works for a minimum point too. [The slope of the tangent is not constant. Take the equation y'= 4 - 8x.....Let us find the y' value for various x values: y' is a straight line with negative slope.The slope varies from 4 (at x=0) to -4 at x=1.0, is equal to 0 at x=0.5 To find a maximum or minimum of a function, follow these steps: Step1 : Find the first derivative of the given function Step2 : Set the first derivative y'=0; solve for x.That gives the maximum or min of the function. {The roots of y'=0 are called the 'critical points'.} Step3: Plug back the value of x into the function: y=f(x); get the value of y ,the max or min of the

function. You may find several max or min points for a given function.Each will be called a 'local' max or min.

Example6 : Find the max or min point of the given function: y= -x^2 + 12x +3 Find the first derivative: y'= -2x+12 Set y'=0 and solve: -2x+12 =0 x'=6 Find the value of Y(x'): y(6)= -36+12x6+3=39 The maximum point is P(6,39) Plot the graph and check the result. We can decide that this point is a maximum by taking two points on either side of the critical point x=6 y(5)= -25+60+3= 38 and y(7)= -49+84+3=38 Therefore x=6,y=39 is a maximum. [We will give another method to decide whether the point is max or min later.]

Example7 :

Find all the critical points [max or min] for the function: y=f(x)= (x^2+9)/x Step1: Find the first derivative:

Step2: set y'=0

If x= +3, y= 6 and if x=-3 , y= -6 There are two critical points: P1(3,6 ) and P2(-3,-6) Let us check the neighbouring function values to determine whether they are max or min points. f(2)= 6.5 ; f(4)= 6.25 f(-2)= -6.5 ;

Therefore P1 is a relative minimum.

f(-4)= -6.25 Therefore P2 is a relative maximum.

This method of finding max or min for a critical point always works and can be used.

Example 8 Find the critical points for the function: y= 2x^3-21x^2+60x+10 and determine whether they are max or min points. Find the first derivative,set it to zero and solve:

The critical points are: P1 (2,62) and P2(5,35) BY taking some values of x close to 2 : P1 is a relative maximum; P2 is a realtive minimum

To decide maximum or minimum: The Second Derivative Test We use calculus again to do this.Take a function which has a maximum: y= 4x-4x^2 , as given earlier. y'= 4-8x The slope equation or the equation for a tangent for this curve is a decreasing function. Let us find the second derivative: y''= -8x The second derivative is negative . At x=0.5, the critcal point, y''=-4 This means that the curve is concave downward,likea dome and the crtical point is a maximum. Take another eaxmple: y= (x-2)^2+2= x^2-4x+6 This is again a parabola with minimum at x=2 [the vertex] and is concave upward. The first derivative: y'= 2x -4 Setting this equal to zero: y'=0, x=2 and y= 2 is the critcal point. We know this is a minimum.Further , this line y' has positive value at x=2. y' increases, passes through zero at x=2 and continues to increase. The second derivative y'' = 2 which is positive Therefore: if the second derivative is positive at the given point we have a relative minimum,the function is concave upwards. [There is the third case when the second derivative y''=0 Then the critical point will be called an 'inflection point'. The the slope of the tangent changes from positive to negative or negative to positive.We shall not discuss this case further.] Example9 : For the function y= (x^2+9)/x, decide the critical points using the second derivative test. The critical points are at x= +3 and x=-2 as given earlier.

At x=3, y" = 18/27 and is positive. Therefore the point (3,6) is a minimum At x=-3 , y" = -18/27 and is negative. Therefore th epoint (-3,-6) is a maximum. Example10 Find the critical points for y=(x^2+1)/x and decide whether they are max or min points

using the second derivative test.

The second derivative test:

Therefore the point (1,2) is a relative minimum and the point (-1,-2)is a relative maximum.

Practice Problems

Find the critical points and find whether they are relative max or min by second derivative test:

1 f(x)= -x^2 + 3x

in the interval [0,3]

2 f(x)= x^3-3x^2

in the interval [-1,3]

3 f(x)= 3x^(2/3) - 2x

4 f(x)= x^3 - 3x^2 +3

[-1,1]

ans: min; (0,0) and (3,0); max: (3/2,9/4)

ans: min:(-1,-4) and (2,-4); max(0,0) and (3,0)

ans : min:(0,0); max(-1,5)

ans: max:[0,3] min:[2,-1]

Applied Problems

1 The power output of a circuit with a battery is given by:

Find the maximum value of P and the current value for V=12 volts,R=0.5 ohm in the interval I: [0,15]

Ans: I=12 P=72

2 The result of coughing is to contract the trachea or windpipe to increase the velocity of air passing through the trachea. If v=k(R-r)r^2 where k is a constant,R normal radius and r is the radius during coughing in the interval r:[0,R]. Find the radius for maximum velocity . Ans: r=2R/3

3 For a harvester, a farmer spends a capital cost which keeps decreasing at the rate of 4/x where x is the number of years.The maintenance cost is increasing at the rate of kx where k is a constant. Taking k=1, find the minumum value for the total cost: C= maint cost +capital cost= x+4/x dc/dx= 1- 4/x^2 Let

x^2-4=0

x=2 or x= -2.......The total cost reaches a minimum at x= 2 [X=-2 has no meaning since years here cannot be negative.] C''= 8/x^3 which is positive for x=2. Therefore x=2 ,c= 3 is a minimum. This means that a wise farmer will replace the harvester after two years of usage,since the total cost will increase after two years. [Note: This kind of analysis becomes useful in replacement theory.] ------------------------------------------------------------------------------------------------------------

Example 1 A cell phone maker finds that the total cost of running the factory is given by the cost equation: C= 0.5x^2+ 15x+1250 where x is the number of units or production quantity . The average cost is C/x. At what level of production quantity ,will the average cost be minimized.

The second derivative : C=1250+750+1250=3250$

which is positive.Therefore x=50 is a minimum with

Example 2 The profit of producing x donuts is given by the equation:

P= 2.44 x - x^2/20000 -5000 Find the value of x for which the profit is a maximum.

Ans: x= 24400 donuts.

3 The cost of fuel plus the driver's wages are related to the average speed of the vehicle (in mph)by truck-driver's federation. Fuel cost = C1=v^2/600

driver's cost c2= 5

Find the min value of total cost = C= C1 +c2 .

Ans: v=55 miles per hour Min Cost = 10.04$

Revenue and Profit equations--optimisations Here is a category of problems often used in business [with more complex models] and taught in business schools. These are simple,based on the methods given earlier and also in tutorials1 &2. I present these methods in a simple and condensed manner.Please review the last section on finding maxima and minima [called 'extrema']

A Revenue equation:

A general equation for sales quantity or demand is that the sales quantity Q decreases with increasing price.So we can write a linear [straight-line] equation: Sales quantity

Q= a - b P where P is the price

[This equation is also called

-------------- [1]

The revenue received from sales: -----------------[2]

R= Price x Quantity sold =P x Q

Combining the two equations, we have an equation for revenue as a function of price:

R(P)= P (a - bP) R(P) = aP - b P^2 ---------------------------------[3]

We can find the value of price P for maximum revenue:

P' is the price for getting max revenue. Max Revenue R' is given by:

Example 2

:

The demand equation for making donuts is as follows: P = 60000 - 30Q where Q is the number of 1000 boxes.

Find the price for getting max revenue and the value of max revenue. Comparing with equation 1, we find

a=60000

b=30

The quantity for max revenue=

million$

B Cost equation

The cost of making q units of a product,C follows ,in simple models,a quadratic equation.This can be used to find the value of Q ,optimal production quantity , .

C(Q)= a +b Q -c Q^2

-------------------[4]

where a ,b and c are constants.

This equation is generally applicable to making cars or making cookies in a small bakery.This is also called an "equation for scaling production".As quantity is increased, the cost keeps decreasing.

See the problem 2 in this section.

Example 3:

The cost of making cookies is written as a function: C= 20 + 2x -0.01x^2

where x is the quantity made in units of 12 boxes. Find the production quantity for minimum cost and then the minimum cost.

The production quantity for minimising cost= x'=100 The min cost = c(x') = c(100)= 20 +200 -0.01(100)(100)= 220-100=120 $ C Profit equation

What is profit?

Profit = Revenue - cost

----------

--[5]

We have given separate equations for revenue and cost: equations 3 and 4 given earlier. We can combine these two equations ,make one equation for profit and find the maximum point.

Note that earlier ,we found the maximum revenue separately and minimized the cost as a separate task.Now we are doing the overall profit maximisation.

Example 4: The demand function for bicycles is given as follows: q = 150000 - 5p where p is the price.----------(1)

The cost equation is given as follows: C(q) = 200 + 30 q

------------------(2)

Find the production quantity Q for maximum profit and find the maximum profit for that quantity.

We rewrite the first equation:

p= -q/5 + 30000

------------(3)

Revenue R = p.q = q (-q/5 +30000) R= -q^2/5+ 30000 q

------------(4)

Note that both R and C are now functions of q. We can combine them to find profit equation.

Profit equation:

------------>

P = revenue - cost

--------(5) Now we find the maximum value of profit using the first derivative:

dP/dq= - 2q/5 +29970 = 0

q = 74925 Maximum profit : P(74925) = - (74925)^2/5 + 29970 x 74925 - 200

Example 6 : The demand for a book publishing is given by the relation: p= 200 - q where p is the price and q the quantity sold. The cost function has a fixed cost of $5000 and the variable cost per book as $0.5 Find the optimum production quantity and the maximum profit.

p= 200 - q

Revenue R = p .q = 200q - q^2 Cost = C = 5000 + 0.5 q Profit equation--->

P = R - C = (200q - q^2) - (5000 + 0.5q)

P = - q^2 +195.5 q -5000

dP/dq = -2q + 195.5 =0 Q for optimum production = q' = 195.5/2 = 196/2 = 98 books

Max profit = P(98) = -98^2 + 195.5(98) -5000 = 4555$

Practice Problems

1 The revenue function for a product is: R = 5000x - 0.1x^2

where x is the quantity sold.

The cost function is: C = 80000 + 200x Find the quantity for max profit and also the amount of max profit .

Ans: 24000 units

2 The cost of producing greetings cards C (x) = 40 + 2x + 0.001x^2 The revenue from sales at $3 per card is : R (x) = 3 x Find the production quantity for max profit and the value of max profit Ans: x=500, P(x)=210$ ---------------------------------------------------------------------------------------------------------

3 Optimisation Problems

In optimisation, we use the process of finding the maxima or minima of functions as given in the earlier sections. There is a function,called 'Objective Function" which we try to optimise.For instance, we found the optimum value ---- maximise the profit function in the previous section.Often we try to reduce cost or find the minimum of the cost function.Likewise we may optimise productivity ,time and so on. Optimisation has one another feature: There are constraints or limitations to be considered.We put these in another function--either as equations or as inequalities.

Let us see some simple examples.

Example 11 John wishes to design an open box with square base ,such that the surface area is 108 sq in.The height (h)and side(a) of the box are now design variables.Using calculus,find the optimal values of these quantities.

The volume of the box = V= a^2h

The constraint equation: ---> Surface area S = 108 = a^2 + 4ah h= (108-a^2)/4a Substituting this in V, we eliminate h:

Now we have V (a) which can be 'maximised":

Since a cannot be negative, take a =6 in, h = (108-36)/24 =3 in. Check: V = 27 x6 -(6)^3/4 = 108

Example 12 The sum of the perimeters of an equilateral triangle and a square is 10. Find the dimensions of the triangle and the square so that the total area is a minimum. Let a be the side of the triangle and b the side of the square. Perimeter P= 3a+4b =10 b = (10-3a)/4 Area of the square = b^2 Area of the triangle =

Practice Problems

1 A printer finds that in a sheet leaving a margin of 1 inches all around, the rectangular area must be 24 sqin.What should be the dimensions of the page. Let the central area = xy=24 The area of the page A= (x+2)(y+2) Minimise the objective function: A Eliminate y:

y= 24/x A = (x+2)(24/x+2)

Find da/dx, set to 0, solve for x.

Ans x=y =

2 The deflection of a beam D with length L is given by : where x is the distance from one end of the beam. Find the value of x that will give the maximum deflection. Ans: 0.578L

4 Partial Derivatives

Consider a variable which is a function of two variables.For instance, the volume of a cylinder

V is a function of r ,radius and height, h. We can write : V = V(r,h)

In general, z = f(x,y)

Let us find the rate of change of z with x, keeping the y constant.We call this "partial derivative of z with respect to x" and denote it as follows:

Similarly, we can write the partial derivative with respect to y as follows: values constant.

Example 13 cylinder:

, keeping the x

Find the partial derivatives of V w.r.t [with respect to] r and h for the volume of a

Likewise find the partial derivaitve w.r.t height:

Practice Problems

Find the partial derivatives of the following functions:

1

z=f(xy) = 8xy

2

3

The equation of a curved surface is given by: z=f(x,y) = -x^2/2 -y^2 +8

Find the slope of the surface using the partial derivative at x=1/2 and y= 1. Ans:

4

z= ln(x^2+y^2)

5

6

z = exp(x)sin(xy)

Application Problems

1 The temperature distribution in a heat shield of a space capsule follows the equation: T(x,y) = 300 - 0.6x^2 -1.5Y^2 Find the rate of change of temperature in the x and y directions at the point P (2,3) Ans: -2.4deg/m and -9deg/m

2 The Cobb-Douglas model relates the production value in terms of labour cost and capital cost as follows: z= f(x,y) = 100 (x^0.6)(y^0.4)

Find the partial derivatives for change of production value wrt labor cost and capital cost.

3 John operates a large auto-components factory with skilled workers (x) and unskilled workers(y).The producitivity ,measured in terms of total value of products divided by total number of workers follows this equation:

P(x,y) = 20x^2 + 15 xy + 3y^2 Find the marginal productiivty of a skilled worker and that of an unskilled worker. Evaluate these figures at the present level of x=500 workers and result of adding more unskilled workers by 100 persons?

y= 200 workers.What would be the

4 "Get Well Clinic" employs 20 doctors and 35 paramedics for all the medical services..The earning of the clinic is given by the equation: E = 6x^2 + 24xy + 2Y^2 +2000 where x -number of doctors, y number of paramedics . Find the marginal effect of doctors and paramedics towards the earnings.What is the ratio of marginal revenue at the current level of these employees.How does that compare with their salaries if doctors are paid $20000 per month and paramedics $5000 per month. [Note: Observe that the equations in Problems 3 and 4 involve 'xy' term which denotes the combined

effect of two category of workers.This is called an ' interaction term'.]

-----------------------------------------------------------------------------------------------------The process of finding the partial derivatives can be extended to a function with three variables : F = f(x,y,z) For instance : F = x^2 +y^2 +z^2 This topic is not discussed here.

Higher partial derivatives

We can find second partial derivatives by doing partial derivatives again.Here we can find four kinds of partial derivtives for z=f(x,y) They are: , , The last two need not be the same.

and

Example 14: Find the four second partial derivatives for the given function:

Practice Problems 1 Find the four derivatives for the given function: 2 Find the four derivatives for the given function: 3

Consider the function: z = sin (x-ct).Show that :

This is one form of wave equation in physics.

5 Numerical Integration

This is a large subject of great importance since many functions cannot be integrated using the functions known to us.Many times, empirical or experimental data will have complex pattern and we want to integrate.Here we study only three simple methods : -------

Take the integral : The basic concept of finding the integral numerically is to find the area under a curve and above the x axis and two vertical lines x=a and x=b, the limits of integration. To find this area, let us approximate the area to a simple figure, like a rectangle or trapezium or an umbrella like,parabola figure.! Midpoint method Example 15 Suppose you want to integrate: I =

This curve can be approximated by a rectangle of width w= b -a = 2 -1 =1 and height as the value of the function at the middle of the width: f(x) =exp(x) at x= 1.5 ,that is : f(1.5) = exp(1.5) Therefore I = area of rectangle = width x height = 1 x exp(1.5) = 4.48168 Let us evaluate this function exactly: I = exp(2) - exp(1) = 7.38905 - 2.7183 = 4.67075 The error in this method: 4.67-4.48= 0.19 % error = 0.19/4.67 x 100 = 4% Not bad at all for the simple procedure we used,evaluating function at only one place: f(1.5). Multiple strips We can get more accurate value for the integral by taking several strips of areas below the curve and using the midvalue of each width for evaluating the area of each strip. Let us try with four strips and adding the area of the four strips. Width of each strip = (2-1)/4 = 0.25 Let us construct a small table for this computation. Interval for the strip [1.0 1.25] [1.25 , 1.5]

Midpoint of the strip f(midpoint) 1.125 3.0802 1.375 3.9550

[1.5, 1.75]

1.625

[1.75, 2.0]

1.875

5.07842

6.52082 -------------sum= 18.63444 Since we have taken equal width of 0.25 for each strip: total area = width [f(1.125) +f(1.375)+f(1.625)+f(1.875)] I = 0.25 x 18.63444 = 4.65861 The exact value of the integral = 4.67075 Error = 4.67075 - 4.65861 = 0.01889 % error = (0.01889/4.67075 ) x 100 = 0.4% Note that by taking four small strips of area, we have reduced the error form 4% to 0.4% Suppose you take 8 strips of area of width 0.125 , you can reduce the error further.! Of course, the computation gets tiring by hand calculations ,forming a table like this. You can write a simple computer program using your favorite language {BASIC,C ,Fortran or Java } and perform the computation in a fraction of a minute.Once the program is written ,it can be used for several such problems.Try doing that.!That is a great way to learn numerical methods and computer programming in one shot.!! [ Each width is often called 'step size' and multi-strips as 'multi-step' methods] Trapezoidal Method Example 16 Let us take again the same example of finding the integral: I = We will construct a trapezoid for the area under the curve of exp (x) from x=1 to x =2.The vertical lines at x=1 and x=2 touching the curve are the two sides of the trapezium.Let us join the points (1,exp(1)) and (2,exp(2)) by a straight line. The x axis from x=1 and x=2 is the other boundary. What is the area of this trapezium? : area A = width (side 1+side2)/2 Area = (2-1) [exp(1) + exp(2)]/2 = 1 (2.7183 + 7.3891]/2=10.1073/2=5.0536 This value is not that close to the actual value of the integral which is 4.6708 . The error = 0.38. In general we can write:

A = (b-a) [f(b) + f(a)]/2

This method uses the chord connecting the two points : f(2) and f(1) We can improve this method by cutting up the area into strips ,each strip a small trapezoid. Let us divide the width x=2 to x=1 by four strips. Intervals of the strips [1 ,1.25]

function values [ f(1) + f(1.25)]/2

Area 0.25 (exp(1)+exp(1.25)/2 0.25 [2.7183+3.4903]/2 0.77608

[1.25, 1.5]

[1.5,1.75]

[1.75, 2.0]

[ f(1.25)+f(1.5)]/2 0.125 [ exp(1.25)+exp(1.5)] 0.125 (3.4903 + 4.4817] 0.9965 [f(1.5) + f(1.75)]/2 0.125 [ (exp(1.5)+exp(1.75)] 0.125 (4.4817 + 5.7546] 1.27953 [f(1.75)+f(2.0)]/2

0.125 [ (exp(1.75) + exp(2)] 0.125 ( 5.7546 + 7.3891) 1.64296

Total area of four strips = 4.69507 The area of this integral by this method [4 strips] gives: I= 4.69507 Error= 4.6708 - 4.69507=-0.02427 % error = (0.02427/4.6708) x 100 = Note that taking four strips gives an accuracy of 0.5% You can take more strips ,say 10 strips and so on. The number of function evaluations is equal to number of strips.

0.52%

The procedurefor multi-step method is as follows:

Let n be the number of strips The general formula becomes: width = [b-a]/n =w Area = I = w [ f(a)/2 + f(x1) + f(x2) --------f(x (n-1) + f(b)/2] We can simplify this: step 1

find S'= [f(a) + f(b) ]/2 ----the end points

step 2 evaluate the function at intermediate points : x1= a+w, x2 = a+ 2w and so on. Add : S'' = f(x1)+f(x2)+f(x3)......f(x(n-1) Step 3 Integral I

w (s'+s'')

If we want more accuracy, we have to increase the number of strips or n, then the number of function evaluations increases too. [This procedure resembles what Archimedes did to find the value of pi by taking small strips along the circumference of a circle.Read about this.] This procedure is easy to do with computer programs.But with increasing function evaluations,the 'truncation error' may increase.Learn about this.!

Simpson's Rule This is a well-known, powerful method for numerical integration.In midpoint method and trapezoidal rule,we used straight line to approximate the curve.By breaking down the curve into small line segments ,we could achieve some accuracy. The next improved method is to replace the given curve by a parabola, with three points.This leads to Simpson rule.

If we want to integrate : Let us replace y=f(x) by a parabola:

y= ax^2 + bx +c

What are the approximate values of a,b and c.? By curve -fitting or quadratic interpolation, we can find the best values of a ,b and c. [Let us take three points: y1=f(x1), y2=f(x2) and y3 = f(x3) Solve the set of simultaneous equations with a,b and c as unknowns and solve.Once you get a,b and c, it is easy to integrate:

,evaluate it at x=a and x= b to get the integral. I am not giving the complete derivation of Simpson's formula which you can find in text books.] In Simpson's rule, let us find f(x) at three points, x=a, x=b(the end points) and the middle value of x:.x=(a+b)/2 Take the three functions: f(a) , f((a+b)/2) and f(b) Then Simpson rule is given as follows:

This formula is very easy to remember: I width [weighted average of the height] The weighted average of height = 1/6 [ f(a) + 4 f( (a+b)/2) + f (b)] Note that we are giving greater weightage for the mid value of f(x) in the curve, four times the two end point values and divide by six....That is how it turns out when we fit the curve to a parabola. [Other masters have given other weighted average formula for height ...see Weddle's rule ,for instance] In general, all these methods ivolve multiplying the width of a strip with weighted average of heights at different values of x.In Trapezoidal, we take I =width [f(a)+f(b)]/2, the mean value. Example 17 Let us take the same integral given earlier.

Step 1 Width w = 2-1 =1 Step2 Evaluate the three functions: f1=f(1)=exp(1)= 2.71828 f2 = f(1.5) = exp(1.5)= 4.48168 f3= f(2) = exp(2)= 7.38906 Step 3

I = w [f1 +4f2+f3]/6 I = 1 [ 2.71828 + 4 (4.48168) + 7.38906]/6 = 28.03406/6=4.67234

The exact value= 4.6708 The error = 4.6708 -4.67234= 0.00154 % Error = 0.00154/4.6708 x 100 = 0.033% Note that by this method,with only 3 function evaluations, we get an error of 0.033% only. This method has been the favorite of practical engineers. With computer programs, it is really easy to execute the Simpson's rule.Note that you can cut up the x axis into smaller strips and apply Simpson's rule .For instance you can intgerate first from x=1 to x=1.5 and then from x=1.5 to x=2 , with a total lof six functional evaluations. Example 18

Find I by Simpson's rule:

The answer is ,of course, ln2. Let us get this value by Simpson's rule. Step 1: width = 2-1 =1 Step2: Evaluate the function f(x) =1/x at three points: x f(x)=1/x 1

1

1.5

1/1.5

2 0.5 I = width x average height = 1 [ 1 + 4/1.5 +0.5]/6 = 0.69444 The exact value I = ln 2 = 0.69315 Error= 0.00129 or 0.18%

Simpson Rule- Composite formula We extend the simpson rule by breaking the width into even number of strips. For instance, consider :

We can integrate in two steps: The Simpson's rule becomes:

Combining the two terms, we get:

Note that we have reduced the width now to 0.5, and most important ,the multiplying factors are: 1,4,2,4,1.In composite formula,the multipliers are 1,4,2,4 sequence. Try this in practice problems.

Example19

Find by Simpson's rule [multiple steps]

x 0 0.25 0.5 0.75 1

f(x) 1 0.94118 0.8 0.64 0.5

Multiplier 1 4 2 4 1

f(x).M 1 4x0.94118 1.6 2.56 0.5 -----------sum= 9.424632

I = 0.5/6 (sum) = 0.785386 =

Note: Archimedes found a value of 'pi' by the laborious method of approximating a circle to a polygon of n sides [n-gon] with 12 sides, 72 sides and so on.Now we can get 'pi' using numerical integration and Simpson's rule in a few steps.

Practice Problems Using Trapezoidal rule and Simpson's, evaluate the following integrals or for the interval indicated: Check your approximate value with the actual and find the %error: 1

for the following functions

Ans: ln 5

2

Ans: 193.6

3

Ans: 21/32

4

Ans: 1.154

Applied Problems 1 The work done by an electric motor for a machine is given by the integral:

where Find the integral by Simpson's method. Ans: 10,233.6

2 The velocity of a parajumper is given by the equation: Find the integral which gives the distance fallen in six seconds:

Ans: 2.66 meters

3 The stress versus strain curve beyond the elastic region for a steel is given by the table here: Strain (x) Stress (y) 0.05 37.5 0.10 43 0.15 52 0.2 60 0.25 55 Find the integral of stress in terms of strain from x= 0.05 to x= 0.25 Ans: 10.141 [Note: The numerical integration can be used for data in tabular form as given in this example.] Suggestions and comments 1 Use graphing calculators to draw the curves and get better understanding of the functions used. 2 For optimisation/maxima/minima problems,drawing the curves for the functions is useful. 3 For the first four topics, there are many books with the title "Advanced Calculus" which should be useful. A classic, brief book is : Serge Lang: 'A First Course in Calculus'.[Springer] and another is F B Hildebrand's 'Advanced Calculus for Applications.' 4 For numerical methods, there are several books available.I suggest one here: S C Chapra and R P Canale Numerical Methods for Engineers {Mc Graw Hill} A classic book is: F B Hildebrand: Introduction to Numerical Analysis [Dover reprint] 5 It is strongly suggested that you write your own computer programs for numerical methods and for polynomial evaluations. 6 I have included many problems of business interest [maximising the profit or revenue,minimising cost ,marginal costing and replacement decision] and general interest. Leave your feedback in my email :nksrinivasan at hotmail dot com ------------------------------xxxxxxxxxxxxxxxxxxxx----------------------------------------

Related Documents


More Documents from ""

Foot Path Bazaar
June 2020 19
Dwaita,advaita And Beyond!
December 2019 46
Walking Meditation
December 2019 39
Why Goddess Worship ?
December 2019 34