Skip to main content

Newtonraphson Method

#include<iostream.h>
#include<conio.h>
#define EPSILON 0.01
double fun(double X)
{
return X*X*X+X*X+9X;
}
double derive fun(double X)
{
return 3*X*X+2*X+9;
}
void newtonraphson(double X)
{
double h=fun(X)/drive fun(X);
while (abs(h)>=EPSILON)
{
    h=fun(X)/drive fun(X);
    X=X-h;
    }
    cout<<"The value of root"<< x;
    }
    void main( )
    {
    X=200;
    newtonraphson (x);
    getch( );
    }

Popular posts from this blog

PHYSICS B.sc SEMESTER lll EXAMINATION, 2018

MATHEMATICS, B.sc. SEMESTER V EXAMINATION,2018

Subject- MATHEMATICS (BMA-E503), Linear Algebra

PHYSICS, B.sc. SEMESTER V EXAMINATION,2018

  Subject:- PHYSICS (BPH-E501), Digital and Analog Circuits and Instrumentation