Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function a • f(x) = 2x²-3x² - 2x+5 Script 1% This program computes for the Tangent Line / Normal Line of a curve % about a given point %define x for symbolic processing 2 3 4 %IDENTIFY the function f(x) 5 f(x) = 2*x^3-3*x^2-2*x+5 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 y= 2*x^3-3*x^2-2*x` 12 %FIND the slope function 13 yprime 6*(-5)^2-6*(-5)-2 14 15 %Determine the slope at the given xo 16 m 190 %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 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(ytam 26 fprintf('The normal line to f(x)=%s at (%.2f, %.2f) is y = %s \n', string(f(x)), x0, yo, string(ynorm 27 28 %PLOTTING 29 %Solve for the first derivative g1=ezplot(f.[-15.15]);
Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function a • f(x) = 2x²-3x² - 2x+5 Script 1% This program computes for the Tangent Line / Normal Line of a curve % about a given point %define x for symbolic processing 2 3 4 %IDENTIFY the function f(x) 5 f(x) = 2*x^3-3*x^2-2*x+5 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 y= 2*x^3-3*x^2-2*x` 12 %FIND the slope function 13 yprime 6*(-5)^2-6*(-5)-2 14 15 %Determine the slope at the given xo 16 m 190 %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 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(ytam 26 fprintf('The normal line to f(x)=%s at (%.2f, %.2f) is y = %s \n', string(f(x)), x0, yo, string(ynorm 27 28 %PLOTTING 29 %Solve for the first derivative g1=ezplot(f.[-15.15]);
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
Can you please solve this using matlab codes. Thanks.
![Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function a
▪ f(x) = 2x³ - 3x2² - 2x+5
Script>
1 % This program computes for the Tangent Line / Normal Line of a curve % about a given point
%define x for symbolic processing
2
3
4 %IDENTIFY the function f(x)
5 f(x) 2*x^3-3*x^2-2*x+5
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 fox
11 y= 2*x^3-3*x^2-2*x
12 %FIND the slope function
13 yprime = 6*(-5)^2-6*(-5)-2
14
15 %Determine the slope at the given xo
16 m= 190
%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
D
%Solve for the first derivative
28 %PLOTTING
29 g1-ezplot(f,[-15,151);
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(ytar
26 fprintf('The normal line to f(x)=%s at (%.2f, %.2f) is y = %s \n',string(f(x)), x0, yo, string(ynorn
27](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff52d4da3-3cab-41fb-819b-5e515999451d%2F7cb8164e-14da-42c9-ba64-dcc28c60a221%2F6twlgmc_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Find the equation of the Tangent Line and Normal Line of the given equation at the given point. Graph the function a
▪ f(x) = 2x³ - 3x2² - 2x+5
Script>
1 % This program computes for the Tangent Line / Normal Line of a curve % about a given point
%define x for symbolic processing
2
3
4 %IDENTIFY the function f(x)
5 f(x) 2*x^3-3*x^2-2*x+5
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 fox
11 y= 2*x^3-3*x^2-2*x
12 %FIND the slope function
13 yprime = 6*(-5)^2-6*(-5)-2
14
15 %Determine the slope at the given xo
16 m= 190
%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
D
%Solve for the first derivative
28 %PLOTTING
29 g1-ezplot(f,[-15,151);
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(ytar
26 fprintf('The normal line to f(x)=%s at (%.2f, %.2f) is y = %s \n',string(f(x)), x0, yo, string(ynorn
27
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 1 images

Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
I would like to ask why the output of y_theta is unrecognized.

Transcribed Image Text:f(x)
Error in solution (line 11)
y_theta=double(f(x_theta))
Output
х0
Commands
Unrecognized function or variable 'x_theta'.
4
Error in solution (line 11)
y_theta=double(f(x_theta))
2*x^3 - 3*x^2 - 2*x + 5
Unrecognized function or variable 'x_theta
Error in solution (line 11)
y_theta=double(f(x_theta))
Solution
Recommended textbooks for you

Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated

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…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY

Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated

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…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY

Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,

