Chapter 3 Differential Calculus
Chapter 3 Differential CalculusSafarzadehTable of ContentsTOC \o "1-2" \h \z \uDerivative and Differentiability PAGEREF _Toc23694087 \h 1Limit PAGEREF _Toc23694088 \h 1Continuity PAGEREF _Toc23694089 \h 2Differentiability and Derivative PAGEREF _Toc23694090 \h 4Differentiability PAGEREF _Toc23694091 \h 4Derivative PAGEREF _Toc23694092 \h 4Derivative and Slope of a Function: PAGEREF _Toc23694093 \h 7Higher Order Derivatives: PAGEREF _Toc23694094 \h 9Taylor Series Expansion: PAGEREF _Toc23694095 \h 18Derivative and DifferentiabilityMany business and economic decisions are based on the cost and benefit analysis or more specifically on the marginal cost and marginal benefit analysis. For example, to maximize profit, a firm in a perfectly competitive market sets marginal cost of the product equal to the price of the product; a producer in a monopolistic market sets marginal cost of the product equal to its marginal revenue. The concept of “marginal” in economics is nothing but the concept of the “derivative” in mathematics. Marginal cost and marginal revenue are the derivatives of the total cost and the total revenue functions with respect to quantity output. The mathematical concept of the derivative is also of extreme importance for optimizing problems. Maximizing revenue or profit, or minimizing cost are examples of optimizing problems that can be solved using derivatives. Differential calculus is the branch of mathematics that deals with the calculation of the derivatives of functions and with the application of these derivatives. The derivative is the most fundamental concept studied in this chapter. However, the concepts of limit and continuity, which have direct bearing on differentiability and derivatives of the functions, will be studied first.LimitLet the function f(x) be defined on the set of real numbers and xo be a real number. If f(x) approaches the real number c when x approaches xo, we say that f(x) has the limit c at xo, and we write limf(x)→c as x→xo.Example 1: Find the limit of f(x)=x2+1 as x approaches 3.Solution: When x approaches 3, x2+1 approaches 10. Thus, f(x) has the limit 10 at 3 or, limf(x)→10 as x→3.#Needed for Limit.library(Ryacas)#Limit of x^2 + 1 as x approaches 3.#First Define x as a Symbolic Variablex <- Sym("x") Limit(x^2 + 1, x, 3) ## expression(10)Example 2: Find the limits of f(x)=(x+1)x as x approaches 1 and ∞.Solution: As x approaches 1, f(x) approaches 2. As x approaches an infinitely large number, ∞, f(x) is undefined. However, if we write f(x) as f(x)=1+1x, as x→∞, 1x→0 and the limit of f(x) approaches 1.#Limit of (x + 1)/x as x approaches 1 and Infinity.#First Define x as a Symbolic Variablelibrary(Ryacas)x <- Sym("x") Limit((x + 1)/x, x, 1)## expression(2)Limit((x+1)/x, x, Infinity)## expression(1)ContinuityA function f(x) is said to be continuous at x=xo if and only if f(xo) exists and the limf(x)→xo whether x approaches xo from x values greater than xo or x values less than xo. That is, a function is continuous if the following three conditions are satisfied:1- f(xo) exists. 2- limf(x)→xo if x approaches xo from x values x<xo. 3- limf(x)→xo if x approaches xo from x values x>xo.If the three conditions hold for all the values of x in the domain of function, the function is called everywhere continuous. Otherwise, the function is called piecewise continuous.Example 1: Verify continuity of f(x)=x2+x+1 at x=1.Solution: Find f(1) and limf(x)→1. f(1)=3 and limf(x)→1 = 3. Since both f(x) and limf(x)→1 exist and are equal to each other, the function satisfies all the three conditions for continuity and f(x) is continuous at x=1. The plot of the function, below, also shows the continuity at x = 1.#Plot of x^2 + x + 1 and its Continuity at Xo = 1.curve(x^2 + x + 1, .5, 1.5, main="Continuity at Xo = 1" )Example 2: Verify the continuity of f(x) = (x+1)(x-1), at x=1.Solution: f(1) does not exist and limf(x) as x→1 from left side is -∞ and is +∞ if x approaches to 1 from rightside.Therefore, f(x) is not continuous at x=1. The plot of the function also shows discontinuity at x=1.#Plot of (x + 1)/(x -1) 1 and its Dis-continuity at Xo = 1.curve((x+1)/(x-1), 0, 2, main="Continuity at Xo = 1")Differentiability and DerivativeDifferentiabilityA function f(x) is differentiable at x=xo if f'(xo) exists. The function f(x) is differentiable in an open interval (a,b) if it is differentiable at every point in that interval. Continuity and differentiability are two desirable properties of functions. If a function f(x) is differentiable at xo, then f(x) is continuous at xo. However, continuity does not imply differentiability. That is, a function f(x) may be continuous at point xo, but not differentiable at that point.DerivativeDerivative of a Function: Derivative is the most fundamental concept in differential calculus. It is concerned with the instantaneous rate of change of a function f(x) with respect to x at a point, say x0. Let the function f given by y=f(x) be continuous in the open interval a<x<b which contains the point x0. If we represent a small increment in x0 by △x and the corresponding increment in y by △y,△y=(f(x0)+△x)-f(x0), the following quotient,△y△x=(f(x0)+△x)-f(x0)△x is called a difference quotient. The difference quotient shows the average rate of change of f(x) with respect to x, over the interval △x. Regardless of how small we make △x, we can not use the difference quotient to compute the instantaneous rate of change of y with respect to x at the point x0. The difficulty is that at x0, we have no interval △x over which we could take an average. However, if △y△x approaches a limit as △x approaches zero, it is reasonable to define the instantaneous rate of change of y with respect to x at x=x0 as the limit of the difference quotient.Therefore, the instantaneous rate of change of y with respect to x at x=x0, which may be denoted by f'(x0), is defined as,f'(x)=lim△x→0△y△x=lim△x→0(f(x0)+△x)-f(x0)△x## Differentiation Formulas:The basic method of finding the derivative of a function is to apply the definition of derivative. However, learning the following formulas enables us to compute derivatives much more rapidly. The proof of the formulas are not given here. Students are required to practice deriving at least the first three formulas using the definition of the derivative.Formula 1: If y=f(x)=c (constant), y'=0.Example: Find y' if y=10. Solution: Since y equals a constant number, y'=0. Using R, the solution is,#Derivative of y = 10.D(expression(10),'x')## [1] 0Formula 2: If y=f(x)=cxm, y'=cmxm-1Example: Find derivative of y=10x3.Solution: The solution is 30x2. Using R, the solution is,#Derivative of y = 10x^3.D(expression(10*x^3),'x')## 10 * (3 * x^2)Formula 3: Let u be a differentiable function of x and y=um, then y'=d(um)dx=mu'um-1, where u'=dudxExample: Find y', if y=f(x)=(4x3+3x+1)5.#Derivative of y = (4x^3 + 3x + 1)^5.D(expression((4*x^3 + 3*x + 1)^5),'x')## 5 * ((4 * (3 * x^2) + 3) * (4 * x^3 + 3 * x + 1)^4)Formula 4: If u and v are differentiable functions of x and y=uv, then y'=d(uv)dx=u'v+v'u, where u'=dudx and v'=dvdxExample: Find y'if y=f(x)=(5x3+5x2+1)(3x3+2x-1).#Derivative of y = (5x^3+5x^2+1)(3x^3+2x-1).D(expression((5*x^3+5*x^2+1)*(3*x^3+2*x-1)),'x')## (5 * (3 * x^2) + 5 * (2 * x)) * (3 * x^3 + 2 * x - 1) + (5 * ## x^3 + 5 * x^2 + 1) * (3 * (3 * x^2) + 2)Formula 5: Let y=uv. If u and v are differentiable functions of x and y'=d(uv)dx=u'v+v'uv2, where u'=dudx and v'=dvdxExample: If y=f(x)=5x2+3x3-1, find dydx.#Derivative of y = (5x^2+3)/(x^3-1).D(expression((5*x^2+3)/(x^3-1)),'x')## 5 * (2 * x)/(x^3 - 1) - (5 * x^2 + 3) * (3 * x^2)/(x^3 - 1)^2Formula 6: If u is a differentiable function of x and y=lnu,then y'=dydx=u'u , where u'=dudxExample:If y=f(x)=10+ln(x3-1), find y'.#Derivative of y = 10 + ln(x^3 - 1).D(expression(10 + log(x^3 - 1)),'x')## 3 * x^2/(x^3 - 1)Note: If the logarithm has a base other than e, first transform it to a natural logarithm, then differentiate. To transform a log to natural log, note that logbx=logexlogbe.Example:If y=f(x)=log2x2 , find y'.#Derivative of y = log base 2 of x^2.D(expression(log2(x^2)),'x')## 2 * x/(x^2 * log(2))Formula 7: If u is a differentiable function of x and y=eu,then y'=u'eu , where u'=dudxExample:If y=f(x)=ex2, find y'#Derivative of y = e^(x^2).D(expression(exp(x^2)),'x')## exp(x^2) * (2 * x)Derivative and Slope of a Function:For a linear function y=mx+c, the slope of the line(m) represents its steepness. For two arbitrary points P(x1,y1) and Q(x2,y2) on a line segment, the slope of the line represents the ratio of rise to run (△y△x) and is measured by m=tanθ=y2-y1x2-x1 = △y△x, where θ the angle between the line and the x-axis. Obviously for the equation of a line, the slope m is the same everywhere along the line. However, for a non-linear function, y=f(x), the slope of the curve at a point P(xo,yo), denoted by mp, is the slope of the tangent to the curve at that point. In other words, the slope of f(x) at a point x=xo is the instantaneous rate of change of the function at this point or f'(x0)=lim△x→0△y△x. Therefore, to find the slope of a function at a given point, find the derivative of the function and evaluate it at that point.Example: Find the slope of y=f(x)=x2+x-5 at x=2. Solution: The slope of the function at x=2 is f'(2). The derivative of the function is f'(x)=2x+1. Evaluated at x=2, f'(2)=5.#Slope of y = x^2 + x - 5 at x = 2.m <- function(x) {}body(m) <- D(expression(x^2+x-5),'x')body(m)## 2 * x + 1m(2)## [1] 5Example: Demand for a product is given as Q=100p0.8 . Find the slope of the demand function at P=12Solution: Find the derivative of Q with respect to P and evaluate it at P=12. The derivative is Q'=dQdP=-80P1.8. Evaluated at P=12, dQdP=-.91. (Note: Conventional market theory assumes P as the vertical axis and Q as the horizontal axis for demand and supply functions. With this assumption, the slope of the demand curve would be dPdQ=-10.91)#Slope of Demand Function Q = 100/p^.8 at p = 12.m <- function(p) {}body(m) <- D(expression(100/(p^0.8)),'p')body(m)## -(100 * (0.8 * p^-0.2)/(p^0.8)^2)m(12)## [1] -0.9131955Example: Price Elasticity of Demand Demand for a product is given as Q=100p2. Find the price elasticity of demand at P=2#Price Elasticity of Demand e = (dQ/dP)(P/Q).Q <- function(p) {}body(Q) <- D(expression(100 /(p^2)),'p')body(Q)## -(100 * (2 * p)/(p^2)^2)Q(2)* 2/(100/2^2)## [1] -2Example: Production Function and Marginal product of Labor For a single-input production function, Q=100L0.8 find marginal product of labor.#Marginal Product of Labor.Q <- function(x) {}body(Q) <- D(expression(100 *L^0.8),'L')body(Q)## 100 * (0.8 * L^-0.2)Problems: 1- Find the derivative of the following functions: a) y=f(x)=x3+4x2-2x+8 b) y=f(x)=(x4+3x3-5x)5 c) y=f(x)=(x3-1)4x2 d) y=f(x)=x3+2x e) y=f(x)=ln(x3+x)2 f) y=f(x)=ln(10x) g) y=f(x)=log10(x2-1) h) y=f(x)=e10x i) y=f(x)=105x2- Find the slope of the following functions at the given points. a) y=f(x)=2x+10;p(1,12) b) y=f(x)=x3-3x+2;P(1,0) c) y=1+x1-x;P(0,1) d) y=e2x;P(0,1) e) y=xx2+1;P(-1,-12) f) y=logx;P(10,1)3- Market demand and supply for a perfectly competitive industry is given as Qd=7000-80P, Qs=3000+120P. A firm in this market has the following total cost (TC) function TC=10+26q-3.5q2+13q3 . a- What is the equilibrium price and quantity in this market? b- Find the profit maximizing level of the output for the firm. What is the total profit? (Hint: For a firm in a perfectly competitive market the profit-maximizing quantity is decided by setting marginal cost (MC) equal to market price) c- Is this firm in its long-run equilibrium?4 - Suppose the market in question 3 above is monopolized with a monopolist that produces the same good with a total cost of, TC=1685000+22.239q-Q2+.0003Q3. a- What will be the level of output in the market? (Hint: A monopolist profit-maximizing quantity is decided by setting marginal cost (MC) equal to marginal revenue (MR)) b- At what price will the monopolist sell the product? c- What will be the profit of the monopolist?5 - Find price elasticity of demand for the following demand functions. (Hint: Price elasticity of demand, εp, is defined as εp=dqdppq). a)q=100-P2 b)q=100P36 - Prove that if demand for a product is elastic, an increase in price will decrease total revenue of the sellers and a decrease in price will increase total revenue.7 - Total output of a firm as the function of labor input is given as Q=100+20L+10L2-0.2L3. Find the average rate of change of Q with respect to L as L changes from: a) 20 to 30, b) 20 to 25. c) Find the instantaneous rate of change of $Q $ with respect to L at L=20.8 - The following relation, C=a+blnY, a representation of the Engel curve, shows the relationship between the expenditure (C), and income (Y) of a consumer. Find the income elasticity. (Note:Income elasticity of demand is defined as εY=dCdYYC.9 - Let’s assume that a researcher has estimated the Engel curve as lnC=a+blnY. What will be the income elasticity in this case?10 - Find the short-run labor elasticity of output for the following production function, Q=100L0.75K0.25, assuming that K = 2401 units. (Note: Elasticity of output with respect to labor input is defined as εL=dQdLLQ.Higher Order Derivatives:If f is a differentiable function, then its derivative f' is also a function that may have a derivative. Given y=f(x), dydx defines the first derivative of y with respect to x. If we differentiate dy with respect to x, we obtain the second derivative of y with respect to x. The second derivative is denoted by $f "(x)$ or $y"$ or d2ydx2, or by fxx. Derivatives of order higher than two are defined similarly.Example: Find the first, second, and third derivatives of y=f(x)=(x3-1)2 Solution: The first derivative is dydx=y'=f'(x)=fx=6x2(x3-1), the second derivative is d2ydx2=y″=f″(x)=fxx=30x4-12, and the third derivative is d3ydx3=y?=f?(x)=fxxx=120x3-12x.#Method 1: Finding the First and the Second Derivatives of a Function.f <- function(x) {}body(f) <- D(expression((x^3 - 1)^2), "x")body(f)## 2 * (3 * x^2 * (x^3 - 1))b <- function(x) {}body(b) <- D (body(f), 'x')body (b)## 2 * (3 * (2 * x) * (x^3 - 1) + 3 * x^2 * (3 * x^2))c <- function(x) {}body(c) <- D (body(b), 'x')body (c)## 2 * (3 * 2 * (x^3 - 1) + 3 * (2 * x) * (3 * x^2) + (3 * (2 * ## x) * (3 * x^2) + 3 * x^2 * (3 * (2 * x))))#Method 2: Finding the First and Second Derivatives of a Function.DD <- function(expr, name, order = 1) { if(order < 1) stop("'order' must be >= 1") if(order == 1) D(expr, name) else DD(D(expr, name), name, order - 1)}DD(expression((x^3 - 1)^2), "x", 3)## 2 * (3 * 2 * (x^3 - 1) + 3 * (2 * x) * (3 * x^2) + (3 * (2 * ## x) * (3 * x^2) + 3 * x^2 * (3 * (2 * x))))Example: Find the first, second, and third derivative of y=f(x)=1x.# Finding the First, Second and Third Derivatives of a Function.DD <- function(expr, name, order = 1) { if(order < 1) stop("'order' must be >= 1") if(order == 1) D(expr, name) else DD(D(expr, name), name, order - 1)}DD(expression((1/x)), "x", 1)## -(1/x^2)DD(expression((1/x)), "x", 2)## 2 * x/(x^2)^2DD(expression((1/x)), "x", 3)## 2/(x^2)^2 - 2 * x * (2 * (2 * x * (x^2)))/((x^2)^2)^2Since the first derivative of a function represents rate of change, the second derivative represents rate of change of a rate of change. In other words, the first derivative of a function is the slope function. The second derivative is the slope of the slope function.In physical science, if y=f(t) represents the position of an object that moves in a straight line, the first derivative f'(t) represents the velocity of the object as a function of time, and f″(t) represents acceleration or deceleration. In business and economics, the second derivative represents the scale of a change. For example, in the production process, if output is increasing, it may be increasing with an increasing rate or decreasing rate. The sign of the second derivative will show whether the increase is at an increasing rate or a decreasing rate. The cases that may occur are as follows:Case 1: f'(x0)>0 and $f "(x_0) > 0$. This implies that, at x0, f is increasing at an increasing rate.Example: Total Product, Marginal Product, and Economies of ScaleThe relation between labor input (L) and output (Q) is given as Q=q(L)=100L1.5. Find the first derivative and the second derivative of the function at L0 = 25 and comment on the scale effect at this point.Solution: The first derivative of the function with respect to labor input (L) is q'(L)=150L0.5 . This is the marginal product function. The second derivative of Q is $q "(L) = 75L^{-0. 5}$. This function represents the slope of the marginal product function. The first derivative of q at L0 25 is q'(25)=750>0. The second derivative evaluated at L0=25 is $q "(25) = 15 > 0$. Therefore, at L0=25, q(L) is increasing at an increasing rate. That is, at L0=25 not only the marginal product of labor is positive, the marginal product of labor will increase as extra units of labor are employed. This means that at L0=25production process is increasing return to scale or the function exhibits economies of scale. The graph below is the graph of Q=q(L)=100L1.5 which is increasing and convex upward.#Derivatives and Economies of Scale.Q <- function(L) {}body(Q) <- D(expression(100*L^1.5),'L')body(Q)## 100 * (1.5 * L^0.5)Q(25)## [1] 750b <- function(L) {}body(b) <- D (body(Q), 'L')body (b)## 100 * (1.5 * (0.5 * L^-0.5))b(25)## [1] 15#Graph of Production Function with Economies of Scale.f <- function(L) (100*L^1.5)plot(f,0,30, ylab = 'Q',xlab = 'L', main='Economies of Scale') Case 2: f'(x0)>0 and $f "(x_0) < 0$. This implies that, at x0, f is increasing at a decreasing rate.Example: Total Product, Marginal Product, and Diseconomies of Scale The relation between labor input (L) and output (Q) is given as Q=q(L)=100L0.5. Find the first derivative and the second derivative of the function at L0=25 and comment on the scale effect at this point.Solution: The first derivative of the function is q'(L)=50L-0.5 . This is the marginal product function. The second derivative is $q"(L) = -25L^{-1.5}$. The first derivative of Q at L0=25 is q'(25)=10>0. The second derivative evaluated at L0=25 is $q "(25) = - .2 < 0$. Therefore, at L0=25, q(L) is increasing at a decreasing rate. That is, the function exhibits decreasing return to scale or diseconomies of scale. The graph of the function, below, shows that the function is increasing and convex downward.#Derivative and Diseconomies of Scale.Q <- function(L) {}body(Q) <- D(expression(100*L^0.5),'L')body(Q)## 100 * (0.5 * L^-0.5)Q(25)## [1] 10b <- function(L) {}body(b) <- D (body(Q), 'L')body (b)## 100 * (0.5 * (-0.5 * L^-1.5))b(25)## [1] -0.2#Graph of Production Function with Diseconomies of Scale.f <- function(L) (100*L^.5)plot(f,0,30, ylab = 'Q',xlab = 'L', main='Diseconomies of Scale') Case 3: f'(x0)<0 and $f "(x_0) > 0$. This implies that, at x0, f is decreasing at an increasing rate.Example: Average Variable Cost Average variable cost of a firm (AVC) as a function of its output (Q) is given as AVC(Q)=f(Q)=180-4.8Q+.08Q2. Find the slope of the AVC curve at Q0=10. How does AVC change as output increase at the neighborhood of Q0=10.Solution: The first derivative of the function gives the slope of the AVC. That is, f'(Q)=-4.8+.16Q. At Q0=10, f'(10)=-3.2<0. This implies that AVC is a decreasing function of Q at Q0=10. The second derivative of AVC is f''(Q)=0.16>0. That is, as Q increases at the neighborhood of Q0=10, AVC decreases with an increasing rate. As the graph of the function shows, at the neighborhood of Q0=10, the function is decreasing with an increasing rate (convex upward).#Average Variable Cost.Q <- function(Q) {}body(Q) <- D(expression(180 - 4.8*Q + 0.08*Q^2),'Q')body(Q)## 0.08 * (2 * Q) - 4.8Q(10)## [1] -3.2b <- function(Q) {}body(b) <- D (body(Q), 'Q')body (b)## 0.08 * 2b(10)## [1] 0.16#Graph of Average Variable Cost.f <- function(Q) (180 - 4.8*Q + 0.08*Q^2)curve(f,20,50, ylab = 'Q',xlab = '$', main="Average Variable Cost") Case 4: f'(x0)<0 and $f "(x_0) < 0$. This implies that, at x0, f is decreasing at a decreasing rate.Example: Average Product Average product (AP) of a firm as a function of labor input (L) is given as AP(L)=f(L)=2005+5L-0.3L2. The slope of the AP at L0=20. How does AP change as labor input increase from L0=20 to L0=25.#Average Product of Labor and Increase in Labor. Q <- function(L) {}body(Q) <- D(expression(2005 + 5*L -0.3*L^2),'L')body(Q)## 5 - 0.3 * (2 * L)Q(20)## [1] -7b <- function(L) {}body(b) <- D (body(Q), 'L')body (b)## -(0.3 * 2)b(20)## [1] -0.6#Graph of Average Product of Labor.f <- function(L) (2005 + 5*L -0.3*L^2)curve(f,10,30, ylab = 'AP',xlab = 'L', main='Average Product of Labor') Example: Three Phases of Production Function One of the conventional models of the production function is a third degree polynomial function that shows all three phases of production. Phase one is the starting or the low levels of input. In this phase, as input increases output increases with an increasing rate due to division of labor. Phase two is the middle phase, where the law of diminishing return sets in. In this phase, as input increases, output increases with a decreasing rate. The third phase is the output levels beyond the maximum level of output. In this phase as input increases, output decreases. The following graph is the presentation of such model given the relationship between labor input (L) and output (Q) expressed as Q=f(L)=900L+75L2-2L3.#Three Phases of Production.f <- function(L) (900*L + 75*L^2 -2* L^3)curve(f,0,35, ylab = 'Q',xlab = 'L', main='Three Phases of Production'); abline(v=12.5, col='blue') Phase one ranges from labor input of zero to 12.5. At any point in the first phase, where output increases with increasing rate, the first derivative (the slope of the curve) and the second derivative (slope of the slope curve) has to be positive. We can test this for an input level of L0=10. The first and second derivatives of the function are f'(L)=900+150L-3L2 $f"(L)=150-6L$, respectively. A L0=10,f'(10)=1800>0 and $f"(10)=30>0$. Since both f' and $f "$ are positive, at this point the function is increasing with an increasing rate. The R solution is given below.#Phase One of Production Q' > 0, Q" > 0, a Convex Function up to L = 12.5.A <- function(L) {}body(A) <- D(expression(900*L + 75*L^2 -2*L^3),'L')A(10) # at L = 10 Q' > 0.## [1] 1800#At L = 10 Q" > 0.A <- function(L) {}body(A) <- D(expression(900*L + 75*L^2 -2*L^3),'L')B <- function(L) {}body(B) <- D(body(A),'L')B(10)## [1] 30In the second phase, the first derivative (slope of the curve) is positive but the second derivative is negative. We can test this for an input level of L0=20. At this point f'(20)=1500>0 and $f"(20)<0$. The function is increasing with a decreasing rate. The R solution is given below,#Phase Two of Production. At L = 20, Q' > 0 but Q" < 0 a Concave Function.A <- function(L) {}body(A) <- D(expression(900*L + 75*L^2 -2*L^3),'L')A(20)## [1] 1500#At L = 20, Q" < 0.A <- function(L) {}body(A) <- D(expression(900*L + 75*L^2 -2*L^3),'L')B <- function(L) {}body(B) <- D(body(A),'L')B(20)## [1] -90In the third phase, the first derivative (slope of the curve) is negative. We can test this for an input level of L0=35. At this point f'(35)=-1200<0. The R solution is given below,#Phase Three of Production: Points Beyond L = 30, Q' < 0 and Q" < 0A <- function(L) {}body(A) <- D(expression(900*L + 75*L^2 -2*L^3),'L')A(35)## [1] -1200body(B) <- D(body(A),'L')B(35)## [1] -270Case 5: f'(x0)=0 and $f "(x_0) =0$. This will give the critical points (maxima, minima, inflection point) of the function. This subject will be studied in the next chapter.Taylor Series Expansion:Given a functional relation y=f(x), Taylor series expansion is a polynomial approximation to f(x) at a given point x=x0. That is,f(x)=f(x0)+f'(x0)(x-x0)1+f″(x0)(x-x0)22+f?(x0)(x-x0)36+.....+Rn, where Rn is the remainder term. In general, Taylor series can be expressed as,f(x)≈i=1n1i!dif'(x0)(x-x0)idxi, where i! is the factorial of i, as n!=n(n-1)(n-2)........3*2*1. The choice of i is arbitrary. The higher is i the more accurate is the approximation. The two most common and frequently used approximations are linear and quadratic approximations. The linear approximation can be expressed as,f(x)≈f(x0)+f'(x0)(x-x0)1, orf(x)≈f(x0)+f'(x0)(x-x0)≈f'(x0)x+[f(x0)-x0f'(x0)], or f(x)=mx+b. The quadratic approximation isf(x)≈f(x0)+f'(x0)(x-x0)1+f″(x0)(x-x0)22Example: Find a linear approximation to y=x2-4x+5, at xo=1.#Tylor Series Expansion: Linear Approximation.f <- function(x) x^2-4*x+5g <- function(x) {}body(g) <- D(expression(x^2-4*x +5),'x')h <- function(x)body(h) <- expression(f(1) + g(1)*(x - 1))body(h)## body(h) <- expression(f(1) + g(1) * (x - 1))Example: Find linear and quadratic approximations for y=f(x)=x-1 at xo=5.#Taylor Series Expansion: Linear and Quadratic Approximation.#Linear Approximation:f <- function(x) sqrt(x - 1)g <- function(x) {}body(g) <- D(body(f), 'x')h <- function(x) {}body(h) <- expression(f(5) + g(5)*(x - 5))body(h)## f(5) + g(5) * (x - 5)x <- seq(1, 8)plot(sqrt(x-1), type='l', main="Linear Approximation")lines(h(x), type="l")#Quadratic Approximationk <- function(x) {}body(k) <- D(body(g), 'x')l <- function(x) {}body(l) <- expression(f(5) + g(5)*(x - 5) + (k(5)*(x - 5)^2)/2)body(l)## f(5) + g(5) * (x - 5) + (k(5) * (x - 5)^2)/2x <- seq(1, 8)plot(sqrt(x-1), type='l', main="Quadratic Approximation")lines(l(x), type="l")Problems:1 - Find f'(x),$f"(x)$,and $f"'(x)$for the following functions: a) f(x)=2x3-3x2+5x-8 b) f(x)=3x4-3x-2-5 c) f(x)=(2x-3)5(1x-3x2)-4 d) f(x)=lnx+1x2+1+e2x e) f(x)=ALα2 - For the cost function TC=20+50q-3.75q2+0.10q3 show that TC increases with a decreasing rate at the output level of Q=10 and TC increases with an increasing rate at the output levels of Q=20.3 - The total cost of repaying a home loan at an interest rate of r % per year is C=f(r).What is the meaning of the derivative f'(r)?What does the statement f'(10)=800 mean?Is f'(r) always positive or does it change in sign?4 - Find linear and quadratic approximations for the following functions at the given points.y=f(x)=lnx;x0=1y=f(x)=1x;x0=1y=x3-1;x0=0y=x2-1;x0=1,andx0=2 ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.