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

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. et sin x1 + x3 = 6 x +e-22 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. et sin x1 + x3 = 6 x +e-22 sin C2 = 1 Submit the print out the source code and output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!