Question

In: Advanced Math

2.5xˆ3=cos(x)+13.5 if your initail estimate is x0=1.1

2.5xˆ3=cos(x)+13.5 if your initail estimate is x0=1.1

Solutions

Expert Solution


%Matlab code for fixed point method
clear all
close all
%function for which root have to find using fixed point method
f=@(x) 2.5*x.^3-cos(x)-13.5;
%displaying the function
fprintf('The function is \n')
disp(f)
%plotting the function
xx=linspace(1.1,3.5);
yy=f(xx);
plot(xx,yy)
xlabel('X')
ylabel('f(X)')
title('x vs. f(x) plot')

%function for fixed point iteration
g1=@(x) ((cos(x)+13.5)./2.5).^(1/3);
fprintf('Function for fixed point iteration \n')
disp(g1)
%initial guess
x0=1.1; err=1;k=0;
%loop for finding root using fixed point iteration
while err>10^-12
    k=k+1;
    x1=g1(x0);
    err=abs(x0-x1);
    x0=x1;
    fprintf('\tAfter %d iteration the value x= %.15f and error is %e.\n',k,x0,err)
  
end
fprintf('\nThe root for the function is %f.\n',x1)
hold on
plot(x1,f(x1),'r*')

%%%%%%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%%%%%%%


Related Solutions

For the given function f(x) = cos(x), let x0 = 0, x1 = 0.25, and x2...
For the given function f(x) = cos(x), let x0 = 0, x1 = 0.25, and x2 = 0.5. Construct interpolation polynomials of degree at most one and at most two to approximate f(0.15)
Use MuPAD to compute the following limits. a. lim x* x0+ b. lim (cos x)/tan
Use MuPAD to compute the following limits.  a. lim x* x0+ b. lim (cos x)/tan 
(a) Estimate the area under the graph of f(x) = 4 cos(x) from x = 0...
(a) Estimate the area under the graph of f(x) = 4 cos(x) from x = 0 to x = π/2 using four approximating rectangles and right endpoints. (Round your answers to four decimal places.) R4 = Sketch the graph and the rectangles. WebAssign Plot WebAssign Plot WebAssign Plot WebAssign Plot Is your estimate an underestimate or an overestimate? underestimate overestimate (b) Repeat part (a) using left endpoints. L4 = Sketch the graph and the rectangles. WebAssign Plot WebAssign Plot WebAssign...
Solve cos^2(x)-cos(x)=0 for x,
Solve cos^2(x)-cos(x)=0 for x,
GIVEN: COS(x) +3xe^-x=0 USING NEWTON RAPHSON METHOD Find: 1.) The POSITIVE ROOT USING X0=2 2.) THE...
GIVEN: COS(x) +3xe^-x=0 USING NEWTON RAPHSON METHOD Find: 1.) The POSITIVE ROOT USING X0=2 2.) THE NEGATIVE ROOT USING X0=-0.5 *STOPPING CRITERION ≤ 0.01% use radian mode in calcu and i dont want a program answers pls i need the manual method.
what is the midline of 3-cos(x) and of 2-cos(x)?
what is the midline of 3-cos(x) and of 2-cos(x)?
a. (5 Marks) 1 1 cos(x)cos(y) = -cos(x-y) + -cos(x + y) 1 l sin(x)sin(y) =...
a. 1 1 cos(x)cos(y) = -cos(x-y) + -cos(x + y) 1 l sin(x)sin(y) = -cos(x-y)--cos(x+ y) 1 l sin(x)cos(y) =—sin(x-y) +-sin(x + y) A DSB-FC (double sideband-full carrier) signal s(t) is given by, s(t) = n cos(2rr/cf)+ cos(2«-/mt)cos(2«-fct) What is the numeric value for the AM index of modulation, m, fors(f) ?
1. Suppose X is normal with ?=10 and ?=5. Find x0 such that P(X?x0)=0.0643 10.8 15...
1. Suppose X is normal with ?=10 and ?=5. Find x0 such that P(X?x0)=0.0643 10.8 15 10.32 17.6 2.4 2. A survey was conducted to measure the number of hours per week adults in the United States spend on home computers. In the survey, the number of hours was normally distributed, with a mean of 7 hours and a standard deviation of 1 hour. A survey participant is randomly selected. Which of the following statements is true? The probability that...
f (x) = -0.248226*cos (2 x) - 0.0184829*cos ((2+2)x) - 0.0594608*cos(x)*sin(x) + 0.123626*sin ((2+2)x). The intervall...
f (x) = -0.248226*cos (2 x) - 0.0184829*cos ((2+2)x) - 0.0594608*cos(x)*sin(x) + 0.123626*sin ((2+2)x). The intervall is ]0, 3/2[ What is the local maximum and local minimum? Answer with 5 decimals
f(r,?) f(x,y) r(cos(?)) = x r(cos(2?)) = ? r(cos(3?)) = x3-3xy2/x2+y2 r(cos(4?)) = ? r(cos(5?)) =...
f(r,?) f(x,y) r(cos(?)) = x r(cos(2?)) = ? r(cos(3?)) = x3-3xy2/x2+y2 r(cos(4?)) = ? r(cos(5?)) = ? Please complete this table. I am having trouble converting functions from polar to cartesian in the three dimensional plane. I understand that x=rcos(?) and y=rsin(?) and r2 = x2 + y2 , but I am having trouble understanding how to apply these functions.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT