Question

C++ Programming Determine the roots of the function with errors of less than 0.1% for x...

C++ Programming

Determine the roots of the function with errors of less than 0.1% for x values between -5 and 5. you MUST NOT utilize the "if" statement in your code. Use the Newton-Raphson method.

f(x) = sin(x)

Homework Answers

Answer #1

SOLUTION:-

PROGRAM

#include<bits/stdc++.h>
using namespace std;

int main()
{
cout<<"Values of sin(x) for x values from -5 to 5\n\n";

cout<<"x"<<"\t"<<"sin(x)\n";
for(double i=-5;i<=5;i=i+0.5)
{
cout<<"\n"<<i<<"\t"<<sin(i);
}

return 0;
}

IMAGE OF PROGRAM

IMAGE OF OUTPUT

THANK YOU, if any queries please leave your valuable comment on comment box..........

If possible please rate the answer as well..........

Know the answer?
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
Similar Questions
Determine one of the roots of the non linear equation f (x) = 2x3 - x2...
Determine one of the roots of the non linear equation f (x) = 2x3 - x2 -1 using Newton Raphson Method. If known the initial value x = -3 and accuracy to 3 decimal places!
Determina las raíces reales de f(x) = -0.4x2 + 2.2x + 4.7. Utiliza los valores iniciales...
Determina las raíces reales de f(x) = -0.4x2 + 2.2x + 4.7. Utiliza los valores iniciales de x=0 y x=8. a) Gráficamente b) Por medio de la fórmula general c) Utiliza el método de bisección con tres iteraciones para determinar la raíz más grande. Calcula los errores. d) Utiliza el método de la secante con tres iteraciones para determinar la raíz más grande. Calcula los errores. e) Utiliza el método de Newton-Raphson con tres iteraciones para determinar la raíz más...
For the following function, determine the highest real root of f(x) = 2x3 – 11.7x2 +...
For the following function, determine the highest real root of f(x) = 2x3 – 11.7x2 + 17.7x - 5 by using (a) graphical methods, (b) fixed point iteration (three iterations, x0 = 3) (Hint: Be certain that you develop a solution that converges on the root), and (c) Newton-Raphson method (three iterations, x0 = 3). Perform an error check on each of your final root approximations (e.g. for the last of the three iterations).
Find the root of the function given below that is greater than zero with the Newton-Raphson...
Find the root of the function given below that is greater than zero with the Newton-Raphson method. First guess value You can get x0 = 0 f (x) = x2 + x - 2
Suppose f(x) is a differentiable function such that f(2)=3 and f'(x) is less than or equal...
Suppose f(x) is a differentiable function such that f(2)=3 and f'(x) is less than or equal to 4 for all x in the interval [0,5]. Which statement below is true about the function f(x)? The Mean Value Theorem implies that f(4)=11. The Mean Value Theorem implies that f(5)=15. None of the other statements is correct. The Intermediate Value Theorem guarantees that there exists a root of the function f(x) between 0 and 5. The Intermediate Value Theorem implies that f(5)...
The cumulative distribution function for a random variable X is F(x)= 0 if x less than...
The cumulative distribution function for a random variable X is F(x)= 0 if x less than or equal 0, or F(x)=sinx if 0 is less than x is less than or equal to pi/2 , or F(x)= 1, if x is greater than pi/2 . (a) find P(0.1 less than X less than 0.2. (b) find E(x)
Determine the degree of the MacLaurin polynomial for the function f(x) = sin x required for...
Determine the degree of the MacLaurin polynomial for the function f(x) = sin x required for the error in the approximation of sin(0.3) to be less than 0.001, and this approximate value for sin(0.3).
Given the region bounded by the function below and the x-axis on the interval also given:...
Given the region bounded by the function below and the x-axis on the interval also given: y = ln(x) / sin(x/5) , [11,14] a) estimate the arc length of y=f(x) on the given interval b(determine the exact arc length c) the average value must be between ____ and ____ (min and max) d) what is the average value e) the mean value theorem states that there must be at least one x-value c in [11,14] such that fave=f(c). use technology...
In R programming # given a numeric vector x, and a string vector 'labels' of the...
In R programming # given a numeric vector x, and a string vector 'labels' of the # same length as x, return the vector containing the labels that # correspond to the k smallest values in vector x. # # example: # if x      = c(3.1, 2.3, 0.1, 4.2) and #    labels = c("a", "b", "c", "d") and #    k = 2 # then smallest_labels(x, labels, k) should return c("c", "b") smallest_labels = function(x, labels, k) { # YOUR CODE...
. Find a cubic function f(x) with roots x = 4, x = 1, x =...
. Find a cubic function f(x) with roots x = 4, x = 1, x = −2 and f(1) = 16. 3. Sketch the graph of f(x) = (x − 2)/x^2−3x−4 showing zeros, intercepts, and asymptotes. 4. Assume that world population(in billions of people) in t years since 2016 is given by y = 7.7e^0.01t . When will the population reach 9 billion? 5. Solve for x: log3 (x + 2) + log3 (x − 4) = 3. 6. Show...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT