clc;
clear all;
f=@(x)5-x^(-1); %function
a=0.1;b=0.25; % interval
if(f(a)*f(b)>0)
fprintf('Root is not applicable in [%f, %f]\n',a,b)
else
tol = 1e-6; % tolerance
Nmax=100;
err=0.1;
niter=0;
while (err >= tol && niter<=Nmax )
x = (a + b)/2;
if ( f(x) == 0 )
break;
elseif ( f(a)*f(x) < 0 )
b = x;
else
a = x;
end
err=abs( (b-a)/2)*100;
niter=niter+1;
Tf(niter)=x;
end
end
% x is root
%niter is number of iteration
disp('Root of the function')
x
disp('Number of iteration')
niter
%%%%%%%%%%%%%%%% Solution
Root of the function
x =
0.199999994039536
Number of iteration
niter =
23
>>
my w it uld Ul Table 2.10. Problem 3 (Chapter 3) - [Parts (a) and (b)...
question 3 please The first 5 questions refer to finding solutions to the equation exp(w) = 3.8 ln(1+x). You will need to write it in the form f(x)-0, and use various root finding methods. 1. (10 pts) Plot the curves y- exp(Vx), and y 3.8 ln(1+x) on the same graph in the range 0 x 6. Read off intervals in which there are roots of the equation exp(k)- 3.8 In(1+x) Now find the roots to 6 decimal places using the...
Submission Items: (1) A Word document in which you: a. Describe in brief the problem you are solving and the numerical method used. b. Snapshot of the output, when you run the program for the conditions mentioned in the questions. c. Discuss your results. (2) MATLAB code (m) file() Question 1: [10 points) Write a MATLAB function that calculates the approximate value of arctan(x) using the Maclaurin series approximation: arctan(x) = x- + +... The function should accept 3 parameters:...
3. DO NOT USE CALCULATOR for this problem! Find the EXACT VALUES for all the parts. Given the function f(x,y) (a) Calculate the total differential of z at the point (x, y, z) (b) Use the total differential to estimate the value of f(1+2(10200),-1 3(10-200). [ Hint : dz= 2(10-200) dy=_3(10-200)]. (c) Calculate the exact diffe ( f(1.-) I Note: total differentiala exact difference. ] rence of f(1+2(10-200)10 200))- (d) Find an equation for the plane s-L(x,y) tangent t(:-: f(z,y)...
Midterm Examination CSCI 3321 Summer, 2015 ___________ Your Name … .. Please answer each question by entering the most nearly correct answer (a, b, c, d) in the blank on the left. ____1. When approximating ex by a truncated Taylor series (expanded about x=0), how many terms would be required to keep the absolute value of the error below 10-3 over the interval [-1,1] ? a. 1 b. 2 c. 3 d. 4 ____2. The polynomial that...
019.09 points | Previous Answers SerCP9 1.AE.009 EXAMPLE 1.9Cartesian and Polar Coordinates GOAL Understand how to convert from plane rectangular coordinates to plane polar coordinates and vice versa. y (m) PROBLEM (a) The Cartesian coordinates of a point in the xy-plane are (x,y) (-3.50 m, -2.50 m), as shown in the NY figure. Find the polar coordinates of this point. (b) Convert (r, θ) = (5.00 m, 37.0°) to rectangular coordinates x (m) (-3.50,-2.50) STRATEGY Apply the trigonometric functions and...