Tasks F24
Tasks F24
Fall 2024
Please complete the following tasks and submit your results in one file using the answer template.
Consider the graphs of the functions 𝑓(𝑥) = 𝑚𝑛 − 𝑥 and 𝑔(𝑥) = 𝑥 − 2𝑚 where 𝑚 and 𝑛
are the maximum and mean values of the digits in your student-ID number.
a) Create a vector v whose elements are the digits of your student-ID number.
b) Create a variable m and assign the maximum digit in v to it.
c) Create a variable n and assign the mean value of the digits in v to it.
d) Define the function f(𝑥) and g(𝑥) above as anonymous functions.
e) Plot the graphs of f(𝑥) and g(𝑥) on the same figure using the MATLAB/OCTAVE
function ezplot in the interval [-10,10].
f) Find the exact values of the 𝑥-coordinates of the intersection points between the two
graphs using the MATLAB/OCTAVE function solve.
g) Find the area bounded by the two graphs.
where 𝑚 and 𝑛 are the maximum and mean values of the digits in your student-ID number.
d) Evaluate the volume of the solid of revolution generated by revolving the graph of
h(𝑥) around the 𝑥-axis between 0 and 2𝜋.