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 V EXAMINATION,2018

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

MATHEMATICS, B.sc. SEMESTER V EXAMINATION,2018

Subject- MATHEMATICS (BMA-E503), Linear Algebra

COMPUTER SCIENCES, B.sc. SEMESTER II EXAMINATION,2018

Subject- COMPUTER SCIENCES (BCS-C-201), Data Structure ➡️Sessional Exam paper 2    Department of Computer science, GKV, Haridwar 1st Sessional Exam ( 2017-18)                   B.sc. II Semester      BCS-C201:Data  Structure and File              Processing Time: 1 hr.                          Maximum Marks: 20                         Section -A Note: Attempt all questions . Each question carries equal marks. ( 2 × 2 = 4 ) Q.1 What do you understand by Linked Queue & Linked Stack? Q.2 Compare Array and Linked List.                        Section-B Note: Attempt any two  questions. Each question carries equ...