@@ -0,0 +1,901 @@
+import java.util.Scanner;%0Aimport java.math.*;%0Apublic class Newton %7B%0A%0A%09double x1,x2,function,Dfunction,formula,l;%0A%09%0A%09public synchronized double value(double tr)%7B%0A%09%09Scanner input = new Scanner(System.in);%0A%09%09System.out.println(%22Enter Initial value: %22);%0A%09%09x1 = input.nextDouble();%0A%09%09%0A%09%09System.out.println(%22%5CnEnter number of Iterations: %22);%0A%09%09l = input.nextDouble();%0A%09%09%0A%09%09for(int i=1;i %3C= l;i++)%7B%0A%09%09%09%0A%09%09function = (3*x1)+ Math.sin(x1)-Math.exp(x1);%0A%09%09System.out.println(%22%5Cn%22+i+%22.%22+%22 value of Function is %22+function);%0A%09%09Dfunction = 3 + Math.cos(x1)-Math.exp(x1);%0A%09%09System.out.println(%22value of Derivated Function is %22+Dfunction);%0A%09%09formula = x1 - (function/Dfunction);%0A%09%09%0A%09%09System.out.println(%22The Formulated Value is %22+formula);%0A%09%09x1= formula;%0A%09%09%0A%09%09%7D%0A%09%09%0A%09%09return 0;%0A%09%7D%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09Newton n1 = new Newton();%0A%09%09n1.value(0.767);%0A%09%09%0A%09%7D%0A%0A%7D%0A

Add files via upload