In: Mechanical Engineering
Use MuPAD to find all the values of x where the graph of y = 3x - 2x has a horizontal tangent line.
The function given is
y = 3x – 2x
It is required to find the point x where the tangential line is horizontal. That means where the differential is zero.
The differentiation can be found using the MATLAB command diff and roots can be found out by found by using the command solve. Finally, we convert the symbolic answer in to numeric using the command double.
The MATLAB code is given below:
Input:
syms x
Y = 3^x - 2*x;
d = diff(Y);
sol = solve(d)
double(sol)
Output:
Therefore, the value of x is 0.5453.
Therefore, the value of x is 0.5453.