sin'a 1) Let A = 1-cos and B = B for x = 0.1,0.01, 0.001, 0.0001,0.00001, and calculate the error for each x. 2 (1+cos z) Write a computer program to evaluate A and %3D 2) Consider the quadratic equation ax2 + bx + c = 0 where a + 0. Write a computer program to calculate and print the real roots for the following three sets of values {a, b, c}:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section2.6: A Case Study: Radar Speed Traps
Problem 5E: (Conversion) a. Design, write, compile, and run a C++ program to convert temperature in degrees...
icon
Related questions
Question

help me with matlab please

1) Let A = 1l-cos and B =
B for x =
sin2a
2 (1+cos r)
Write a computer program to evaluate A and
%3D
0.1,0.01, 0.001,0.0001, 0.00001, and calculate the error for each x.
2) Consider the quadratic equation ax + bx +c = 0 where a + 0. Write a computer
program to calculate and print the real roots for the following three sets of values
{a, b, c}:
a. {1,2, 1}
b. {-100.01,9, 100.01}
c. {1, -9, 1}
N
3) Write a computer program to calculate and print S = (0.1) and P= N x 0.1 for
%3D
k=1
N = 10, 100, 1000, 10000. Calculate the error for each N.
4) Compute positive integer powers of the golden mean o = y3 using:
+V5
%3!
a. product of o with itself n times;
b. on+1 = 6" + Øn-1
for several values of n. Plot the absolute error in between as a function of n. Repeat
for both single and double precision.
Transcribed Image Text:1) Let A = 1l-cos and B = B for x = sin2a 2 (1+cos r) Write a computer program to evaluate A and %3D 0.1,0.01, 0.001,0.0001, 0.00001, and calculate the error for each x. 2) Consider the quadratic equation ax + bx +c = 0 where a + 0. Write a computer program to calculate and print the real roots for the following three sets of values {a, b, c}: a. {1,2, 1} b. {-100.01,9, 100.01} c. {1, -9, 1} N 3) Write a computer program to calculate and print S = (0.1) and P= N x 0.1 for %3D k=1 N = 10, 100, 1000, 10000. Calculate the error for each N. 4) Compute positive integer powers of the golden mean o = y3 using: +V5 %3! a. product of o with itself n times; b. on+1 = 6" + Øn-1 for several values of n. Plot the absolute error in between as a function of n. Repeat for both single and double precision.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning