clc
clear

f = @(x) x.*tan(x) - 9;

fplot(f, [0, 10]);
grid on;
xlabel('x');
ylabel('f(x)');
title('Plot of x tan(x) - 9');

hold on;


root1 = fzero(f, 4.5); 
root2 = fzero(f, 7.5); 

fprintf('Root 1: %.4f\n', root1);
fprintf('Root 2: %.4f\n', root2);

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: