Algebra

home / study / questions and answers / math / algebra / consider the following function f(x) = 3 cos (x) …
Question


Consider the following function
f(x) = 3 cos (x) – 5x
find x such that f(x) = -5 (in the form f(x) – b = 0, b = -5).
In MATLAB create a function that uses the Newton Raphson method of the form

Hints:
This Matlab function approximates the root of f(x)-b = 0 where both f(x) and b are inputs.
Approximate error is calculated using root approximations that arise from two adjacent iterations. x_R(current iteration) is the root approximation that is found as the result of the current iteration, x_R(previous iteration) is the root approximation that is found as the result of the previous iteration.
Expert Answer