To reduce the degree of the equation ,these operations are done, a=1 , b=2.3, c=0.32 , d=-0.56
If we write y+r , instead of x (x=y+r)
y3 +(3r+2.3)y2+3r2+4.6r+0.32y+r3+2.3r2+0.32r-0.56=0
If we choose r=-2.33
Equation becomes this form; y3+my+n=0 m=3ac-b23a2 n=2b3-9abc-27a2d27a3 m=-1.44333… n=0.09598 ∆=m327+n24 if ∆=0.4)then exit end if write(unit=3,fmt=*)iter,c,real_err,app_err print*,iter,c,real_err,app_err end do close(unit=3) case(2) open (unit=4,file="HW2-110070152#-nr.txt",status="replace",action="write",iostat=ios) if (ios/=0) then print*,"Error during opening file" end if tol=0.0001 x=1 iter=0 print*,"Iteration Calculated Root Percent True Error Percent Approximated Error" write(unit=4,fmt=*)"For this solution initial guess is taken ONE" write(unit=4,fmt=*)"Iteration Calculated Root Percent True Error Percent Approximated Error" do xi=x iter=iter+1 f=xi**3+2.3*xi**2+0.32*xi-0.56 d_f=3*xi**2+4.6*xi+0.32 x=xi-f/d_f re=abs(0.4-x)/0.4*100 ae=abs((x-xi))/x*100
if