1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ser-zykov [4K]
3 years ago
8

Find the root using bisection method with initials 1 and 2 for function 0.005(e^(2x))cos(x) in matlab and error 1e-10?

Computers and Technology
1 answer:
frutty [35]3 years ago
5 0

Answer:

The root is:

c=1.5708

Explanation:

Use this script in Matlab:

-------------------------------------------------------------------------------------

function  [c, err, yc] = bisect (f, a, b, delta)

% f the function introduce as n anonymous function

%       - a y b are the initial and the final value respectively

%       - delta is the tolerance or error.

%           - c is the root

%       - yc = f(c)

%        - err is the stimated error for  c

ya = feval(f, a);

yb = feval(f, b);

if  ya*yb > 0, return, end

max1 = 1 + round((log(b-a) - log(delta)) / log(2));

for  k = 1:max1

c = (a + b) / 2;

yc = feval(f, c);

if  yc == 0

 a = c;

 b = c;

elseif  yb*yc > 0

 b = c;

 yb = yc;

else

 a = c;

 ya = yc;

end

if  b-a < delta, break, end

end

c = (a + b) / 2;

err = abs(b - a);

yc = feval(f, c);

-------------------------------------------------------------------------------------

Enter the function in matlab like this:

f= @(x) 0.005*(exp(2*x)*cos(x))

You should get this result:

f =

 function_handle with value:

   @(x)0.005*(exp(2*x)*cos(x))

Now run the code like this:

[c, err, yc] = bisect (f, 1, 2, 1e-10)

You should get this result:

c =

   1.5708

err =

  5.8208e-11

yc =

 -3.0708e-12

In addition, you can use the plot function to verify your results:

fplot(f,[1,2])

grid on

You might be interested in
Why can't this app have people ask riddles.
sergij07 [2.7K]
I don’t know why it doesn’t have that
4 0
2 years ago
4
bixtya [17]

Answer: its keyword

Explanation:

4 0
3 years ago
How to burn mp3 on dvd
ki77a [65]
Look up on google a software that can do it for you. Doing it through a pre-made software is about the only way to do it most computers won't allow you to.

7 0
3 years ago
Read 2 more answers
A string variable can hold digits such as account numbers and zip codes.<br><br> FALSE<br><br> TRUE
gavmur [86]
True. The second one is right
6 0
3 years ago
List 100 social media with functions​
olga55 [171]

Answer:

J

Explanation:

6 0
2 years ago
Other questions:
  • As yall know its spoopy season. This means spoopy music! I am having a live stream on the Spoon app under the username teendrago
    11·1 answer
  • How do you read a column
    8·1 answer
  • Which of the following consists of electronic components that store instructions?
    10·1 answer
  • A server provides the necessary IP configuration to your network host so the host can communicate on the network. If this servic
    7·1 answer
  • Technician A says that S-cams can be left or right handed. Technician B says that S-cam foundation brakes can have one or two an
    15·1 answer
  • MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use
    10·1 answer
  • To gain a competitive edge this year, the upper management of a global IT company has decided to focus on customer service, empl
    13·1 answer
  • Stuart wants to delete some text from a slide. What should Stuart do?
    8·1 answer
  • Data is best described as
    10·2 answers
  • A printer is considered to be in the category of
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!