Question

The function e^x −100x^2 =0 has three true solutions.Use Newton’s method to locate the solutions with...

The function e^x −100x^2 =0 has three true solutions.Use Newton’s method to locate the solutions with tolerance 10^(−10).

Homework Answers

Answer #1

MATLAB Script (Run it as a script, NOT from command window):

close all
clear
clc

f = @(x) exp(x) - 100*x.^2; % f(x)
fd = @(x) exp(x) - 200*x; % f'(x)
tol = 1e-10;

% Let's first plot the function to get approximate locations of the roots
x = -10:0.001:10;
plot(x, f(x)), grid on
axis([-2 10 -2 2]), xlabel('x'), ylabel('f(x)'), title('f(x) = exp(x) - 100x^2')
% Lets consider the initial guesses at x0 = -1, 1, 10.

fprintf('Roots: \n')

x0 = -1;
x = newton(f, fd, x0, tol);
fprintf('\t%.8f\n', x)

x0 = 1;
x = newton(f, fd, x0, tol);
fprintf('\t%.8f\n', x)

x0 = 10;
x = newton(f, fd, x0, tol);
fprintf('\t%.8f\n', x)

function xc = newton(f, fd, x0, tol)
xc = x0;
while true
xc = xc - f(xc)/fd(xc);
if abs(f(xc)) < tol
break;
end
end
end

Output:

Roots:
   -0.09534462
   0.10541197
   8.99951058

Plot:

Know the answer?
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
Similar Questions
Use Newton’s Method to approximate the real solutions of x^5 + x −1 = 0 to...
Use Newton’s Method to approximate the real solutions of x^5 + x −1 = 0 to five decimal places.
Use Newton’s method to find solutions accurate to within 10−4 for x − 0.8 − 0.2...
Use Newton’s method to find solutions accurate to within 10−4 for x − 0.8 − 0.2 sin x = 0, x in[0, π/2]. (Choose ?0=π/4).
Use the Bisection Method to locate all solutions of the following equations. Sketch the function by...
Use the Bisection Method to locate all solutions of the following equations. Sketch the function by using Matlab’s plot command and identify three intervals of length one that contain a root. Then find the roots to six correct decimal places. (a) 2x3 − 6x − 1 = 0 (b) ex−2 + x3 − x = 0 (c) 1 + 5x − 6x3 − e2x = 0 **MUST BE DONE IN MATLAB AND NEEDS CODE
Consider the function ?(?) = ?^2 − 3? − 2. a) Use Newton’s Method to estimate...
Consider the function ?(?) = ?^2 − 3? − 2. a) Use Newton’s Method to estimate a root for the function given by the above formula. More precisely: Using the initial value of ?1 = 5, calculate ?3. b) Solve the quadratic equation ?^2 − 3?− 2 = 0 and compute the two solutions to 4 decimal places. How do these compare to the approximate root you computed in part (a) above? c) Suppose your friend uses Newton’s Method to...
2. (a) For the equation e^x = 3 - 2 x , find a function, f(x),...
2. (a) For the equation e^x = 3 - 2 x , find a function, f(x), whose x-intercept is the solution of the equation (i.e. a function suitable to use in Newton’s Method), and use it to set up xn+1 for Newton’s Method. (b) Use Newton's method to find x3 , x4 and x5 using the initial guess x1 = 0 . How many digits of accuracy are you certain of from these results? (c) Use x1+ ln 2   and show...
Use Newton’s method to estimate the value of e. Use X0=2 and find x4 Hint: e=x...
Use Newton’s method to estimate the value of e. Use X0=2 and find x4 Hint: e=x In(e)=In(x)
Suppose that Newton’s method is applied to find the solution p = 0 of the equation...
Suppose that Newton’s method is applied to find the solution p = 0 of the equation e^x −1−x− (1/2)x^2 = 0. It is known that, starting with any p0 > 0, the sequence {pn} produced by the Newton’s method is monotonically decreasing (i.e., p0 >p1 >p2 >···)and converges to 0. Prove that {pn} converges to 0 linearly with rate 2/3. (hint: You need to have the patience to use L’Hospital rule repeatedly. ) Please do the proof.
Suppose we want to apply Newton’s method to solving f(x) = 0 where f is such...
Suppose we want to apply Newton’s method to solving f(x) = 0 where f is such that |f′′(x)| ? 10 and |f′(x)| ? 2 for all x. How close must x0 be to τ for the method to converge?
Use Newton’s method to find all solutions of the equation correct to six decimal places: ?^2...
Use Newton’s method to find all solutions of the equation correct to six decimal places: ?^2 − ? = √? + 1
Diogo has a utility function: U = 100X^0.75Z^0.25 The price of X is Px = $2,...
Diogo has a utility function: U = 100X^0.75Z^0.25 The price of X is Px = $2, the price of Z is Pz = $4, and his income is $1,000. What is Diogo's optimal bundle? (round your answer to one decimal place) X0= _ units Z0= _ units
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT