Question
for math methods for engineers

Q2) Find the answer to the below equation, tolerance < 0.001 < 0.001), start with an initial guess of 0.5. You need to draw t
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;
clear all;
format long
f=@(x) sin(x)-exp(x) ;
f1=@(x) cos(x)-exp(x);
tol=0.001;
x=0.5;
n=1;
while(n<100)
  
x1=x-(f(x)/f1(x));
x=x1;
Err=f(x);
if abs(Err)<tol
break
end
end
Solution=x
Error=Err

OUTPUT

Solution = -3.183021980612657

Error = -4.269720879733485e-005

Add a comment
Know the answer?
Add Answer to:
Q2) Find the answer to the below equation, tolerance < 0.001 < 0.001), start with an initial gues...
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
  • clearvars close all clc tol = 0.0001; % this is the tolerance for root identification xold...

    clearvars close all clc tol = 0.0001; % this is the tolerance for root identification xold = 0.5; % this is the initial guess test = 1; % this simply ensures we have a test value to enter the loop below. %If we don't preallocate this, MATLAB will error when it trys to start the %while loop below k = 1; %this is the iteration counter. Similar to "test" we need to preallocate it %to allow the while loop to...

  • Use Newton's method to find all roots of the equation correct to eight decimal places. Start...

    Use Newton's method to find all roots of the equation correct to eight decimal places. Start by drawing a graph to find initial approximations. (Do this on paper. Your instructor may ask you to turn in this graph.) 4e-** sin(x) = x2 - x + 1 0.219164 X (smaller value) 1.084225 X (larger value)

  • Problem 3: (a) Fine the root for the equation given below using the Bisection and Newton-Raphson ...

    Problem 3: (a) Fine the root for the equation given below using the Bisection and Newton-Raphson Numerical Methods (Assume initial value) using C++Programming anguage or any other programming angua ge: x6+5r5 x*e3 - cos(2x 0.3465) 20 0 Use tolerance 0.0001 (b) Find the first five iterations for both solution methods using hand calculation. Note: Show all work done and add your answers with the homework Show Flow Chart for Bisection and Newton-Raphson Methods for Proramming. Note: Yur amwer Som the...

  • Task 2 (25 points + 4 points for commenting): Write computer code to perform the Fixed.Point...

    Task 2 (25 points + 4 points for commenting): Write computer code to perform the Fixed.Point method and use your code to find the root of the following equation using an initial guess of 3 and a stopping criterion of 0.001%; f(x) e -4x For Fixed-Point, you do not have to code Matlab to take the derivatives of the function and check the g'(x). You can do that step by hand, and then show me your hand cal ulations to...

  • The circuit in the figure to the right is represented by the equation below, where I...

    The circuit in the figure to the right is represented by the equation below, where I is the current through the inductor Land Ve is the voltage drop across the capacitor C. Find formulas for I, and Vc when R=0.5 ohms, C = 12.5 farads, L= 2.5 henry, the initial current is o amperes, and the initial voltage is 12 volts. R Het с 1 RC Vc 000 L Choose the correct answer below. 4.(t) Vc(t) 0.100 OA 30 sin(-0.08t)...

  • Please answer this MATLAB questions when able. Thanks. 4. Laboratory Problem Description In this laboratory you...

    Please answer this MATLAB questions when able. Thanks. 4. Laboratory Problem Description In this laboratory you are required to Find the solution of the following systems of linear equation: 1) xl + x2 + x3 3 4x1 - x2 x3-2 x1 2x2 x3-2 2) 2 -1 3 A 1 3 -2. B-2 Given the following system 4x1+3x2+7x3- 3 3x1+2x2+1x3 1 2x1+3x2+4x3- 2 Using MATLAB commands solve the following system using Gaussian elimination with partial pivoting. Find P, L, and U...

  • 7. Answer the questions below for the following initial value problem: y (t) = sin y,...

    7. Answer the questions below for the following initial value problem: y (t) = sin y, 0 <y(0) < 27. (a) [1 pt) Determine the equilibrium (i.e., critical or steady-state) solutions. (b) (2 pts) Construct a sign chart for y' = sin y. Hy' = sin y 21 (c) (3 pts] Now construct a sign chart for y", and find the inflection points (if any). Hy" = f(y) 271 (d) [5 pts] Draw the phase line, and sketch a graph...

  • Consider the equation below. 9 7 - 8 sin(e) (a) Find the eccentricity. e = x...

    Consider the equation below. 9 7 - 8 sin(e) (a) Find the eccentricity. e = x (b) Identify the conic. O ellipse O parabola hyperbola O none of the above (c) Give an equation of the directrix (in Cartesian coordinates). (d) Sketch the conic. 10 -15 10

  • Differential Equation Please answer both of the questions below Thanks! Solve the given initial value problem....

    Differential Equation Please answer both of the questions below Thanks! Solve the given initial value problem. y'' + 36y = 0; y(0) = 3, y'(O) = 5 x(t) = Find a general solution to the differential equation using the method of variation of parameters. y'' + 2y' +y=2e -t The general solution is y(t) = .

  • Q2) Using the data in the below table, which were obtained for enzyme activity without presence...

    Q2) Using the data in the below table, which were obtained for enzyme activity without presence of inhibitors. [15 points) IS (MM) 1.3 2.6 6.5 13.0 26.0 VomM/s) 2.50 4.00 6.30 7.60 9.00 A) Draw Lineweaver-Burk plot and determine the K. and Vmax for this uninhibited enzyme. (You may use hand, excel or other program to draw the graph and find the equation. Then copy and paste the graph here, you need to show axis labels) [6 points) B) From...

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