Use MATLAB to numerically find the solutions to the equation


Use MATLAB to numerically find the solutions to the equation: x/5 = sin x and save them in a vector in order form least to greatest. Include both the code and the output bellow.

Solution

clc;
clear all;
close all;


syms x

ezplot(sin(x),[-30,30]);
hold on
ezplot(x/5,[-30,30]);

a(1)=vpasolve(sin(x)-x/5==0,x,-2);
a(2)=vpasolve(sin(x)-x/5==0,x,0);
a(3)=vpasolve(sin(x)-x/5==0,x,2);

----------------- note only 3 solutions exist as evident from the plot -----------------------------

 Use MATLAB to numerically find the solutions to the equation: x/5 = sin x and save them in a vector in order form least to greatest. Include both the code and

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site