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).
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
Apply Newton’s method to?(?)=?−2sin(?)=0. Compare the number of iterations required for convergence to that of the...
Apply Newton’s method to?(?)=?−2sin(?)=0. Compare the number of iterations required for convergence to that of the fixed-point iteration method with formulation ?=?(?)=2sin(?). Solve for x0 = pi/4, piand -piwith14-digit accuracy [i.e., tol = 10-(14+1)= 10-15]. Compare your solutions to those obtained using Matlab’s fsolve and fzero.
Q1: Use bisection method to find solution accurate to within 10^−4 on the interval [0, 1]...
Q1: Use bisection method to find solution accurate to within 10^−4 on the interval [0, 1] of the function f(x) = x−2^−x Q3: Find Newton’s formula for f(x) = x^(3) −3x + 1 in [1,3] to calculate x5, if x0 = 1.5. Also, find the rate of convergence of the method. Q4: Solve the equation e^(−x) −x = 0 by secant method, using x0 = 0 and x1 = 1, accurate to 10^−4. Q5: Solve the following system using the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT