Write C code for the following: 1. Find x for x sinx = el-rsin(x2) by the Newton-Raphson method in the interval, [-2, 2] Show transcribed image text Write C code for the following: 1. Find x for x sinx = el-rsin(x2) by the Newton-Raphson method in the interval, [-2, 2]
Answer
#include <stdio.h>
#include <math.h>
float function(float x)
{
return pow(2.7183, x) – x * sin(pow(x, 2)) – x * sin(x); // f(x)function value calculation
}
// differntitate function
float diff(float
OR
OR