In: Electrical Engineering
Plot -3x³+ 25sin(3.14x/4-15.5/4) + 7.43 for -2 < x < 2.5 to determine its roots . The number of roots is: using MATLAB
MATLAB CODE (command window):
clear all
clc
% Solving Using MATLAB:
syms x % First we need to define symbolic toolbox for variable
x
f(x)=(-3*x^3)+25*sin(3.14*0.25*x-0.25*15.5)+7.43
% Now plotting for range -2 to 2.5
ezplot(f,[-2 2.5])
grid on
% Now as we can clearly observe the
plot
% the zero crossing is at x = 1.06 , so
% this value of x is a root of f(x) expression.
% Hence there will be one root for
range -2 to 2.5 and i.e at x = 1.06
% ALSO: Finding overall roots
Fx_roots=solve(f,x)
MATLAB Screenshots: