Question
Program c...... Newton-Raphson program.......................... implicit none integer*4 i, nit real*8 fl,fr,f,fp,x,dx,eps x = 0 eps = 0.00000001 nit = 10 i=0 100 CONTINUE i =
Program
c...... Newton-Raphson program..........................
implicit none
integer*4 i, nit
real*8 fl,fr,f,fp,x,dx,eps x = 0
eps = 0.00000001
nit = 10
i=0 100 CONTINUE
i = i+1
call ffunction (fl,x-eps)
call ffunction (fr,x+eps)
f = 0.5*(fr+fl)
fp= (fr-fl)/(2*eps)
dx = -f/fp
x = x+dx
if(abs(dx).gt.eps) GOTO 100
write (6,*) STOPPED
write(6,*)Numer of iterations: , i, and x = , x
END c...... subroutine to assign value of f for given x.....
subroutine ffunction(f,x)
implicit none
real*8 pi
parameter (pi = 3.141592653589793)
real*8 f, x c...... you can define your function f(x) ..............
f = EXP(x)-x*x RETURN
END
Problem 10.2. Modify the Newton-Raphson program provided in this chapter to solve the following system of equations. ei" sin x1 + x3 = 6 x +e- sin C2 = 1 Submit the print out the source code and output. Problem 10.2. Modify the Newton-Raphson program provided in this chapter to solve the following system of equations. ei" sin x1 + x3 = 6 x +e- sin C2 = 1 Submit the print out the source code and outputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started