Analyze the given function around its critical point. ▪ f(x) Script 1 %Use symbolic processing with the variable x 3 4%Enconde the function f(x) 5 f(x) = 6 7 %Set the distance to the left/right of the critical point 8 h 0.01 9 10 %Find the first derivative of the function 11 fp(x) = 12 13 %Solve for the roots of fp 14 root1 solve(fp) 15 16 %Consider the first critical point only 17 c=root1 (1) 18 19 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point 20 if (fp(c+h) >0) 21 IODR = 22 elseif (fp(c+h) <0) 23 IODR = 24 end CP= 36 elseif IoDL=="Decreasing" & IODR =="Increasing" 37 CP= 38 end 25 26 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point 27 if (fp(c-h)>0) 28 IODL = 29 elseif (fp(c-h) <0) 30 IODL = 31 end 32 33 %Use first derivative Test to Determine if the critical point is a "Maximum" point or "Minimum" point. 34 if IoDL=="Increasing" & IODR =="Decreasing" 35 39 40 %Find the second derivative of the function 41 fpp(x)= diff(f, 2); 42 43 %Find the points of inflection of the function by equating the second derivative of the function to zero. 44 CC = 45 CP2 = Save 56 %GRAPH THE FUNCTION 57 clf(); 58 g1 ezplot (f); 59 hold on 46 %Apply Second Derivative Test to check whether the critical point is a "Maximum" point, a "Minimum" point or "Point of Inflection". 47 if fpp(c) >0 48 CP2 = 49 elseif fpp (c) <0 50 CP2 = 51 else 52 53 end 54 55 60 grid on 61 plot (c, f(c), 'r*') 62 title("Curve Tracing") C Reset 63 text (c+.5, f(c), ["("+string(c)+","+string(f(c))+") 64 "+CP ]) MATLAB Documentation ▶ Run Script ?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

DUE NOW. Please answer the "script part" given the problem. See also the guide on how to solve the problem using script. Thank you!

 

Analyze the given function around its critical point.
▪ f(x) =
Script
1 %Use symbolic processing with the variable x
2
3
4 Enconde the function f(x)
5 f(x) =
6
7 %Set the distance to the left/right of the critical point
8 h 0.01
9
10 %Find the first derivative of the function
11 fp(x) =
12
13 %Solve for the roots of fp
14 root1 solve(fp)
15
16 Consider the first critical point only.
17 c=root1 (1)
18
19
Determine if the function is "Increasing" or "Decreasing" at the right of the critical point
20 if (fp(c+h) >0)
IODR =
≈ ≈ ≈ ≈ 4 2N228 m m m
21
22 elseif (fp(c+h) <0)
IODR =
23
24 end
25
26 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point
if (fp(c-h)>0)
27
IODL =
29 elseif (fp(c-h) <0)
IODL =
30
31 end
32
35
33 %Use first derivative Test to Determine if the critical point is a "Maximum" point or "Minimum" point.
34 if IoDL=="Increasing" & IODR =="Decreasing"
CP=
36 elseif IODL=="Decreasing" & IODR =="Increasing"
37
CP=
38 end
39
40 %Find the second derivative of the function
41 fpp (x)= diff(f, 2);
42
Save
48
49 elseif fpp(c) <0
50
CP2 =
51 else
52
53 end
54
CP2 =
43 %Find the points of inflection of the function by equating the second derivative of the function to zero.
44 CC =
45
46 %Apply Second Derivative Test to check whether the critical point is a "Maximum" point, a "Minimum" point or "Point of Inflection".
if fpp(c) >0
47
CP2 =
55
56 %GRAPH THE FUNCTION
57 clf();
58 g1= ezplot (f);
59 hold on
C Reset
60 grid on
61 plot (c, f(c), 'r*')
62 title("Curve Tracing")
63 text (c+.5, f(c), ["("+string(c)+","+string (f(c))+") "+CP 1)
64
MATLAB Documentation
Run Script ?
Transcribed Image Text:Analyze the given function around its critical point. ▪ f(x) = Script 1 %Use symbolic processing with the variable x 2 3 4 Enconde the function f(x) 5 f(x) = 6 7 %Set the distance to the left/right of the critical point 8 h 0.01 9 10 %Find the first derivative of the function 11 fp(x) = 12 13 %Solve for the roots of fp 14 root1 solve(fp) 15 16 Consider the first critical point only. 17 c=root1 (1) 18 19 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point 20 if (fp(c+h) >0) IODR = ≈ ≈ ≈ ≈ 4 2N228 m m m 21 22 elseif (fp(c+h) <0) IODR = 23 24 end 25 26 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point if (fp(c-h)>0) 27 IODL = 29 elseif (fp(c-h) <0) IODL = 30 31 end 32 35 33 %Use first derivative Test to Determine if the critical point is a "Maximum" point or "Minimum" point. 34 if IoDL=="Increasing" & IODR =="Decreasing" CP= 36 elseif IODL=="Decreasing" & IODR =="Increasing" 37 CP= 38 end 39 40 %Find the second derivative of the function 41 fpp (x)= diff(f, 2); 42 Save 48 49 elseif fpp(c) <0 50 CP2 = 51 else 52 53 end 54 CP2 = 43 %Find the points of inflection of the function by equating the second derivative of the function to zero. 44 CC = 45 46 %Apply Second Derivative Test to check whether the critical point is a "Maximum" point, a "Minimum" point or "Point of Inflection". if fpp(c) >0 47 CP2 = 55 56 %GRAPH THE FUNCTION 57 clf(); 58 g1= ezplot (f); 59 hold on C Reset 60 grid on 61 plot (c, f(c), 'r*') 62 title("Curve Tracing") 63 text (c+.5, f(c), ["("+string(c)+","+string (f(c))+") "+CP 1) 64 MATLAB Documentation Run Script ?
Curve Tracing [A]
Curve Tracing
In carrying out a Calculus based analysis of the graph of a function, the following steps can be performed.
First Derivative
1. Solve the first derivative of the function.
2. If the first derivative of a function at a given point is positive, the function is increasing.
3. If the first derivative of a function at a given point is negative, the function is decreasing.
4. The point where the first derviative equates to zero is the critical point of the function.
5. If the slopes besides the critical point are changing from negative to positive, the critical point is a minimum point.
6. If the slopes besides the critical point are changing from negative to positive, the critical point is a minimum point.
Second Derivative
1. Solve the second derivative of the function.
2. If the second derivative of a function at a given point is positive, the function is concave upward.
3. If the second derivative of a function at a given point is negative, the function is concave downward.
4. The point where the second derivative equates to zero is the inflection point of the function.
5. If the concavity at the critical point is upward, the critical point is a minimum point.
6. If the concavity at the critical point is downward, the critical point is a maximum point.
Transcribed Image Text:Curve Tracing [A] Curve Tracing In carrying out a Calculus based analysis of the graph of a function, the following steps can be performed. First Derivative 1. Solve the first derivative of the function. 2. If the first derivative of a function at a given point is positive, the function is increasing. 3. If the first derivative of a function at a given point is negative, the function is decreasing. 4. The point where the first derviative equates to zero is the critical point of the function. 5. If the slopes besides the critical point are changing from negative to positive, the critical point is a minimum point. 6. If the slopes besides the critical point are changing from negative to positive, the critical point is a minimum point. Second Derivative 1. Solve the second derivative of the function. 2. If the second derivative of a function at a given point is positive, the function is concave upward. 3. If the second derivative of a function at a given point is negative, the function is concave downward. 4. The point where the second derivative equates to zero is the inflection point of the function. 5. If the concavity at the critical point is upward, the critical point is a minimum point. 6. If the concavity at the critical point is downward, the critical point is a maximum point.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY