C DE ÖDEV YARDIM

Katılım
4 Eyl 2013
Mesajlar
4
Puanları
1
Write a C program which will consist of a MAIN function and a FUNCTION. Program will find one approximate root of a given F(X)=0 using the Eq.(1) and Eq.(2) given below. Xi+1=Xi-F(Xi)/F'(Xi) for i=0,1,2,3... (1) F'(Xi)=(F(Xi+h)-F(Xi))/h
(2) Within the MAIN function: 1. Set X0=0.5, h=1E-3(1x10) and epsilon=1E-12(1x10). X0 is the starting guess. epsilon is the desired accuracy. h is a small increment. Set maximum number of iteration (max_iteration) to 50. iteration : The output of the previous operation as the input for the next. 2. Compute the next guess from the current guess using Eq.(1) and Eq.(2)
3. Repeat step 2 until the desired accuracy is met, that is, until |Xi+1-Xi|< epsilon.
4. Print the root and the total number of iteration when the desired accuracy is met.
5. Program should stop when the desired accuracy is met or the number of iteration exceeds max_iteration. Within the FUNCTION: return the value of F(X).
 
Write a C program which will consist of a MAIN function and a FUNCTION. Program will find one approximate root of a given F(X)=0 using the Eq.(1) and Eq.(2) given below. Xi+1=Xi-F(Xi)/F'(Xi) for i=0,1,2,3... (1) F'(Xi)=(F(Xi+h)-F(Xi))/h
(2) Within the MAIN function: 1. Set X0=0.5, h=1E-3(1x10) and epsilon=1E-12(1x10). X0 is the starting guess. epsilon is the desired accuracy. h is a small increment. Set maximum number of iteration (max_iteration) to 50. iteration : The output of the previous operation as the input for the next. 2. Compute the next guess from the current guess using Eq.(1) and Eq.(2)
3. Repeat step 2 until the desired accuracy is met, that is, until |Xi+1-Xi|< epsilon.
4. Print the root and the total number of iteration when the desired accuracy is met.
5. Program should stop when the desired accuracy is met or the number of iteration exceeds max_iteration. Within the FUNCTION: return the value of F(X).

Mesajini yenile okudum, hala yardima ihtiyacin var mi ? Gecerliyse belirtirsen yardimci olacagim ...
 

Forum istatistikleri

Konular
128,179
Mesajlar
915,654
Kullanıcılar
449,940
Son üye
yavuzturan

Yeni konular

Geri
Üst