Question

Estimate all of the zero of x3-x2-2x+1 graphically Use your code to refine the graphical estimates Hand in copies of your graph, your code for Newtons method and the command window where the functions were called

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

%function file

function zero = NewtonZeroCubic(x0)
%x0 is the initial guess
f=@(x)x^3-x^2-2*x+1;
df=@(x)3*x^2-2*x-2;
while(abs(f(x0))>.0000001)
    x0=x0-f(x0)/df(x0);
end
zero=x0;

Add a comment
Know the answer?
Add Answer to:
Estimate all of the zero of x3-x2-2x+1 graphically Use your code to refine the graphical estimates...
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
  • Determine the point of intersection between y-x3-2x+1 and y-x2 a) Use bisection to initialize the...

    Determine the point of intersection between y-x3-2x+1 and y-x2 a) Use bisection to initialize the problem (at least two steps) b) Write out the iteration scheme for Newton's Method (define your own initial guess, and perform one iteration) c)Write out the iteration scheme for Secant Method (define your own initial guess, and perform one iteration) Determine the point of intersection between y-x3-2x+1 and y-x2 a) Use bisection to initialize the problem (at least two steps) b) Write out the iteration...

  • Use Newton's method to estimate the two zeros of the function f(x)=x - 3x - 25....

    Use Newton's method to estimate the two zeros of the function f(x)=x - 3x - 25. Start with X-1 for the left-hand zero and with Xo = 1 for the zero on the right. Then, in each case, find > Determine xq when Xo = -1 (Simplify your answer. Round the final answer to four decimal places as needed. Round all intermediate values to four decimal places as needed.) Determine x2 when Xo 1 (Simplify your answer. Round the final...

  • Please show the code necessary, and explanations on MATLAB. Plotting 11) Plot the function y =...

    Please show the code necessary, and explanations on MATLAB. Plotting 11) Plot the function y = sin(x) from x = 0 to 21. 12) Plot the functions y = x2 z = x2 + 2x + 1 from x = 0 to 2 on the same graph. Scripts: Input and Output 13) Write a script (M-file) to read in a message at the command line using the MATLAB input function and then display the message to the Command Window using...

  • q2 please find x1.x2.x3.x4 using matlab &73 3:45 zain JO 4ll ring Q1 a function with...

    q2 please find x1.x2.x3.x4 using matlab &73 3:45 zain JO 4ll ring Q1 a function with the name "Area Circumference" to calculate the area and circumference tput) of a rectangle. Define the inputs of this function as required. (6marks) rite a manuscript to solve the following system of equations based on [A][x] =[b)]. Find x1, x2, . (5 Marks) 2x1+ x2-3 +2x4 4 x1+5x2-3ax3 +604 -2x1 +5a2-2r3 +6x4= 4 4x1+11x2-4x3+8x4 = 5 Q3: Having f(x) = 3x6-13x2 + 2x, Integratef...

  • Newton's Method in MATLAB During this module, we are going to use Newton's method to compute...

    Newton's Method in MATLAB During this module, we are going to use Newton's method to compute the root(s) of the function f(x) = x° + 3x² – 2x – 4 Since we need an initial approximation ('guess') of each root to use in Newton's method, let's plot the function f(x) to see many roots there are, and approximately where they lie. Exercise 1 Use MATLAB to create a plot of the function f(x) that clearly shows the locations of its...

  • please help me with these two questions. i dont have anymore posts. i will rate high....

    please help me with these two questions. i dont have anymore posts. i will rate high. thank you find X2: Use Newton's method to estimate the two zeros of the function f(x) = x* - 2x - 21. Start with Xo = - 1 for the left-hand zero and with Xo = 1 for the zero on the right. Then, in each case, Determine x2 when Xo = -1. X2 = (Simplify your answer. Round the final answer to four...

  • Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes co...

    Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...

  • Problem 1 Use the trapezoidal rule technique to approximate the following integrals: a) 「(x2+1)d...

    help wanted?? thank you explain correctly Problem 1 Use the trapezoidal rule technique to approximate the following integrals: a) 「(x2+1)dr(Note: use 0.5 increments forx) b) sina d INote: use a MATLAB function to subdivide the interval into eight equal parts) c e dx (Note: use 0.25 increments for x Problem 2 Use the Simpson's rule to evaluate the following integrals aDdr Problem 3: Given the polynomial: x3-6x2 + 30-0, Use MATLAB to find all roots of this polynomial. Use MATLAB's...

  • please show all your work i am really trying to understand how to solve these x2...

    please show all your work i am really trying to understand how to solve these x2 if x<5 consider f(x) = 2x-8 if x 25 1. graph the function. 2. For f(x), find the following (a) f(6) (b) f(-5) (c) f(5.8) (d) f(-1.1) Show all of your work on paper and submit it on canvas. your won't get any credit for the last answer without submission on Canvas. 1.first of all Graph the function. 2. find the following values: (a)...

  • Could someone explain these four promblems on matlab and if you do, could you write what...

    Could someone explain these four promblems on matlab and if you do, could you write what you wrote on matlab I.e. on the command window or script. Also if you have written anything by hand can you write neatly. Also an explain of how you did it would be greatly appreciated. 1] 5 points) Write the following set of equations in Matrix form and use Matlab to find the solution. 50 -5x3-6x2 2x2 + 7x3-30 x1-7x3-50-3x2 + 5x1 [2] (10...

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