Chapter2/newton.c File Reference

Example program using Newton's method for root finding. Show the execution of Newton's method on a small example. More...

#include <math.h>
#include <stdio.h>

Functions

double f (double x)
 The function whose roots are to be computed.
double fd (double x)
 The derivative of f.
int main ()
 Launch Newton's method.


Detailed Description

Example program using Newton's method for root finding. Show the execution of Newton's method on a small example.

Make sure to compile with '-lm' for trigonometric functions.

Author:
George Heineman
Date:
6/15/08

Function Documentation

double f ( double  x  ) 

The function whose roots are to be computed.

double fd ( double  x  ) 

The derivative of f.

int main (  ) 

Launch Newton's method.

Algorithm Development Kit 1.0