Question

Apply Secant method Perform 3 iterations using MATLAB 26. e - tanx = 0, xo = 1, x1 = 0.7

1 0
Add a comment Improve this question Transcribed image text
Answer #1

Required Matlab code with explanatory comments is given below:

START CODE

x=[1,0.7];
f=@(x) exp(-x)-tan(x);
for k=1:3 %3 iterations
    x(k+2)=(x(k)*f(x(k+1))-x(k+1)*f(x(k)))/(f(x(k+1))-f(x(k))); %secant method
end
display(x(end));

END CODE

And the output:

Command Window >> Q secant f(x (end)) %check 0.5314 ans -6.8448e-05 |fx >

\blacksquare

Hope this was helpful. Please do leave a positive rating if you liked this answer. Thanks and have a good day!

Add a comment
Know the answer?
Add Answer to:
Apply Secant method Perform 3 iterations using MATLAB 26. e - tanx = 0, xo =...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT