WRITE MATLAB CODE TO SOLVE THIS!! YOU NEED TO DETERMINE TWO POSITIVE ROOTS
Determine the two positive roots of f(x) = 7 sin(x)e-x - 1 :
a)Graphically.
b)Using the Newton-Raphson method.
c)Using the secant method.
Initial guesses of x can be decided from the plot and use maximum iterations. Explain your results.
function y=f(x)
y=7*sin(x)*exp(-x)-1;
end
x=0:0.1:2;
for i=1:21
y=f(x(i));
end
plot(x,y)
2.
3.
Get Answers For Free
Most questions answered within 1 hours.