Consider the function f(x) = 0.92¹ - 1.5x³-² + r. (a) Use MATLAB (or octave) to plot f(x) for r in the interval [-1,2]. (b) Use the fzero command to find all the zeros of f in [-1,2]. (c) Use the command fminbnd to find the coordinates (x, f(x)) of each of the local maximum and minimum values of f for a in [1,2].
Consider the function f(x) = 0.92¹ - 1.5x³-² + r. (a) Use MATLAB (or octave) to plot f(x) for r in the interval [-1,2]. (b) Use the fzero command to find all the zeros of f in [-1,2]. (c) Use the command fminbnd to find the coordinates (x, f(x)) of each of the local maximum and minimum values of f for a in [1,2].
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
DISCRETE MATHS MATLAB
![Consider the function f(x) = 0.94-1.5x³-²+x.
(a) Use MATLAB (or octave) to plot f(x) for x in the interval [-1,2].
(b) Use the fzero command to find all the zeros of f in [-1,2].
(c) Use the command fminbnd to find the coordinates (x, f(x)) of each of the local
maximum and minimum values of f for z in [-1,2].](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F694d9785-2aee-48b8-994d-898a1f59d7c9%2Fa1ee9f77-b942-453e-9cc0-f14bb4781665%2Fe0c4ge_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Consider the function f(x) = 0.94-1.5x³-²+x.
(a) Use MATLAB (or octave) to plot f(x) for x in the interval [-1,2].
(b) Use the fzero command to find all the zeros of f in [-1,2].
(c) Use the command fminbnd to find the coordinates (x, f(x)) of each of the local
maximum and minimum values of f for z in [-1,2].
Expert Solution

Step 1: Code to plot the function
a) Plotting
To plot the function
1x = linspace(-1, 2, 500); % Create an array of 500 points between -1 and 2
2f_x = 0.9*x.^4 - 1.5*x.^3 + x; % Evaluate the function at each point
3
4figure; % Create a new figure
5plot(x, f_x); % Plot the function
6xlabel('x'); % Label the x-axis
7ylabel('f(x)'); % Label the y-axis
8title('Plot of f(x) = 0.9x^4 - 1.5x^3 + x'); % Add a title
9grid on; % Add a grid for better visualization
10
Step by step
Solved in 4 steps

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,

