human
Program for Newton Raphson Method | An example function whose solution is determined using Bisection Method . The function is x ^ 3 - x ^ 2 + 2.
Derivative of the above function which is 3 * x ^ x - 2 * x.
Function to find the root.
x ( i + 1 ) = x ( i ) - f ( x ) / f '(x).
Initial values assumed"
Solution in Python:
 What is a code to program for Newton Raphson Method and the other steps required?
assistant
#Here is code to program for Newton Raphson Method and the other steps required.
 def func ( x ) :
	return x * x * x - x * x + 2
def derivFunc ( x ) :
	return 3 * x * x - 2 * x
def newtonRaphson ( x ) :
	h = func ( x ) / derivFunc ( x )
	while abs ( h ) >= 0.0001 :
		h = func ( x ) / derivFunc ( x )
		x = x - h
	print ( " The ▁ value ▁ of ▁ the ▁ root ▁ is ▁ : ▁ " , " % .4f " % x )
x0 = - 20
newtonRaphson ( x0 )