Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function and lines ▪ f(x)=2x²-3x²-2x+5 Script 1% This program computes for the Tangent Line / Normal Line of a curve % about a given point 2 %define x for symbolic processing 3 4 %IDENTIFY the function f(x) 5 f(x) = 6 7 %DETERMINE the point of tangency (This will be a random point) 8 x0=randi ([-5,5]) 9 %SOLVE for the ordinate of the point of tangency 10 yo=f(x0); %Evaluate y given value fox 11 12 %FIND the slope function 13 yprime = 14 %Determine the slope at the given xo %Evaluate the slope 16 m 17 18 %Solve the equation of the tangent line 19 ytangent= 20 21 %Solve the Equation of the normal line 22 ynormal = 23 %Solve for the first derivative ✓ 24 %DISPLAYING RESULTS 25 fprintf('The tangent line to f(x) =%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,ye, string(ytangent)) 26 fprintf('The normal line to f(x) =%s at (%.2f, %.2f) is y = %s \n',string(f(x)), x0, yo, string(ynormal)) 27 28 %PLOTTING 20 21 % Solve the Equation of the normal line 22 ynormal = 23 28 %PLOTTING 29 g1-ezplot (f, [-15, 15]); 30 set (g1, 'color', 'b') 31 grid on 32 hold on 24 %DISPLAYING RESULTS 25 fprintf('The tangent line to f(x) =%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,ye, string(ytangent)) 26 fprintf('The normal line to f(x) =%s at (%.2f , %.2f) is y = %s \n', string(f(x)),x0,ye, string(ynormal)) 27 33 plot (x0, ye, '*') 34 text (x0+1, yo, "Point of Tangency") 35 g2=ezplot(ytangent, [-15,15]); 36 text (5,5, ["y (Tangent)=", string(ytangent)]) 37 pause (1) 38 set (g2, 'color', 'm') 39 pause (1) Save 40 g3=ezplot(ynormal, [-15,15]); 41 text(3,3, ["y (Normal)=", string(ynormal)]) 42 set (g3, 'color', 'c'); 43 title("Tangent Line and Normal Line") 44 C Reset MATLAB Documentat
Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function and lines ▪ f(x)=2x²-3x²-2x+5 Script 1% This program computes for the Tangent Line / Normal Line of a curve % about a given point 2 %define x for symbolic processing 3 4 %IDENTIFY the function f(x) 5 f(x) = 6 7 %DETERMINE the point of tangency (This will be a random point) 8 x0=randi ([-5,5]) 9 %SOLVE for the ordinate of the point of tangency 10 yo=f(x0); %Evaluate y given value fox 11 12 %FIND the slope function 13 yprime = 14 %Determine the slope at the given xo %Evaluate the slope 16 m 17 18 %Solve the equation of the tangent line 19 ytangent= 20 21 %Solve the Equation of the normal line 22 ynormal = 23 %Solve for the first derivative ✓ 24 %DISPLAYING RESULTS 25 fprintf('The tangent line to f(x) =%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,ye, string(ytangent)) 26 fprintf('The normal line to f(x) =%s at (%.2f, %.2f) is y = %s \n',string(f(x)), x0, yo, string(ynormal)) 27 28 %PLOTTING 20 21 % Solve the Equation of the normal line 22 ynormal = 23 28 %PLOTTING 29 g1-ezplot (f, [-15, 15]); 30 set (g1, 'color', 'b') 31 grid on 32 hold on 24 %DISPLAYING RESULTS 25 fprintf('The tangent line to f(x) =%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,ye, string(ytangent)) 26 fprintf('The normal line to f(x) =%s at (%.2f , %.2f) is y = %s \n', string(f(x)),x0,ye, string(ynormal)) 27 33 plot (x0, ye, '*') 34 text (x0+1, yo, "Point of Tangency") 35 g2=ezplot(ytangent, [-15,15]); 36 text (5,5, ["y (Tangent)=", string(ytangent)]) 37 pause (1) 38 set (g2, 'color', 'm') 39 pause (1) Save 40 g3=ezplot(ynormal, [-15,15]); 41 text(3,3, ["y (Normal)=", string(ynormal)]) 42 set (g3, 'color', 'c'); 43 title("Tangent Line and Normal Line") 44 C Reset MATLAB Documentat
Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
Related questions
Question
DO THIS IN MATLAB
![Activity:
Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function and lines
▪ f(x) = 2x²-3x² - 2x+5
Script>
1% This program computes for the Tangent Line / Normal Line of a curve % about a given point
2
%define x for symbolic processing
3
4 %IDENTIFY the function f(x)
5 f(x) =
6
7 %DETERMINE the point of tangency (This will be a random point)
8 x0=randi ([-5,5])
9 %SOLVE for the Ordinate of the point of tangency
10 y0=f(x0); %Evaluate y given value fo x
11
12 %FIND the slope function
13 yprime =
14
15 %Determine the slope at the given x0
16 m=
%Evaluate the slope
17
18 %Solve the equation of the tangent line
19 ytangent=
20
21 %Solve the Equation of the normal line
22 ynormal =
23
%Solve for the first derivative
24 %DISPLAYING RESULTS
25 fprintf('The tangent line to f(x)=%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,yo, string(ytangent))
26 fprintf('The normal line to f(x) = %s at (%.2f, %.2f) is y = %s\n',string(f(x)),x0,yo, string(ynormal))
27
28 %PLOTTING
20
21 %Solve the Equation of the normal line
22 ynormal =
23
Save
24 %DISPLAYING RESULTS
25 fprintf('The tangent line to f(x)=%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,yo, string(ytangent))
26 fprintf('The normal line to f(x)=%s at (%.2f, %.2f) is y = %s\n',string(f(x)), x0, yo, string(ynormal))
27
28 %PLOTTING
29 g1-ezplot (f, [-15,15]);
30 set (g1, 'color', 'b')
31 grid on
32 hold on
33 plot (x0, yo,'*')
34 text (x0+1, yo, "Point of Tangency")
35 g2-ezplot(ytangent, [-15,15]);
36 text (5,5, ["y (Tangent)=", string(ytangent)])
37 pause (1)
38 set (g2, 'color', 'm')
39 pause (1)
40 g3=ezplot(ynormal, [-15,15]);
41 text (3,3, ["y (Normal)=", string(ynormal)])
42 set (g3, 'color', 'c');
43 title("Tangent Line and Normal Line")
44
C Reset
MATLAB Documentation](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2b440f33-084c-494d-b061-0eca22d6a83d%2F7b06e727-2abe-44fe-82bf-5dfc05384c47%2Fl7hmvm5_processed.png&w=3840&q=75)
Transcribed Image Text:Activity:
Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function and lines
▪ f(x) = 2x²-3x² - 2x+5
Script>
1% This program computes for the Tangent Line / Normal Line of a curve % about a given point
2
%define x for symbolic processing
3
4 %IDENTIFY the function f(x)
5 f(x) =
6
7 %DETERMINE the point of tangency (This will be a random point)
8 x0=randi ([-5,5])
9 %SOLVE for the Ordinate of the point of tangency
10 y0=f(x0); %Evaluate y given value fo x
11
12 %FIND the slope function
13 yprime =
14
15 %Determine the slope at the given x0
16 m=
%Evaluate the slope
17
18 %Solve the equation of the tangent line
19 ytangent=
20
21 %Solve the Equation of the normal line
22 ynormal =
23
%Solve for the first derivative
24 %DISPLAYING RESULTS
25 fprintf('The tangent line to f(x)=%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,yo, string(ytangent))
26 fprintf('The normal line to f(x) = %s at (%.2f, %.2f) is y = %s\n',string(f(x)),x0,yo, string(ynormal))
27
28 %PLOTTING
20
21 %Solve the Equation of the normal line
22 ynormal =
23
Save
24 %DISPLAYING RESULTS
25 fprintf('The tangent line to f(x)=%s at (%.2f, %.2f) is y = %s\n', string(f(x)),x0,yo, string(ytangent))
26 fprintf('The normal line to f(x)=%s at (%.2f, %.2f) is y = %s\n',string(f(x)), x0, yo, string(ynormal))
27
28 %PLOTTING
29 g1-ezplot (f, [-15,15]);
30 set (g1, 'color', 'b')
31 grid on
32 hold on
33 plot (x0, yo,'*')
34 text (x0+1, yo, "Point of Tangency")
35 g2-ezplot(ytangent, [-15,15]);
36 text (5,5, ["y (Tangent)=", string(ytangent)])
37 pause (1)
38 set (g2, 'color', 'm')
39 pause (1)
40 g3=ezplot(ynormal, [-15,15]);
41 text (3,3, ["y (Normal)=", string(ynormal)])
42 set (g3, 'color', 'c');
43 title("Tangent Line and Normal Line")
44
C Reset
MATLAB Documentation
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Advanced Engineering Mathematics](https://www.bartleby.com/isbn_cover_images/9780470458365/9780470458365_smallCoverImage.gif)
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
![Numerical Methods for Engineers](https://www.bartleby.com/isbn_cover_images/9780073397924/9780073397924_smallCoverImage.gif)
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
![Introductory Mathematics for Engineering Applicat…](https://www.bartleby.com/isbn_cover_images/9781118141809/9781118141809_smallCoverImage.gif)
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
![Advanced Engineering Mathematics](https://www.bartleby.com/isbn_cover_images/9780470458365/9780470458365_smallCoverImage.gif)
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
![Numerical Methods for Engineers](https://www.bartleby.com/isbn_cover_images/9780073397924/9780073397924_smallCoverImage.gif)
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
![Introductory Mathematics for Engineering Applicat…](https://www.bartleby.com/isbn_cover_images/9781118141809/9781118141809_smallCoverImage.gif)
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
![Mathematics For Machine Technology](https://www.bartleby.com/isbn_cover_images/9781337798310/9781337798310_smallCoverImage.jpg)
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
![Basic Technical Mathematics](https://www.bartleby.com/isbn_cover_images/9780134437705/9780134437705_smallCoverImage.gif)
![Topology](https://www.bartleby.com/isbn_cover_images/9780134689517/9780134689517_smallCoverImage.gif)