{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

aritmitiki-analisi1 - ΑΡΙΘΜΗΤΙΚΗ...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
ΑΡΙΘΜΗΤΙΚΗ ΑΝΑΛΥΣΗ - ΠΡΩΤΗ ΕΡΓΑΣΤΗΡΙΑΚΗ ΑΣΚΗΣΗ 1. Δίνεται η εξίσωση 1 ( ) cos 0 2 f x x x = = που είναι συνεχής ως διαφορά συνεχών (g(x)=x πολυωνυμική και h(x)=1/2cosx τριγωνομετρική ) και για την οποία ισχύει : . 1 (0) 2 (0) (1) 0 1 (1) 1 cos1 0.500076152 0.5 2 (0,1) : ( ) 0. Bolzano f f f f x f x ϑ = − < = = ∃ ∈ = Άρα δείξαμε ότι η f(x) έχει στο (0,1) μία τουλάχιστον ρίζα . Αν δείξουμε ότι η f(x) είναι και ( γνησίως ) μονότονη στο [0,1] θα έχουμε δείξει ότι η δοθείσα εξίσωση έχει στο [0,1] μοναδική ρίζα . Έχουμε : 1 '( ) 1 sin 2 f x x = + Φτιάχνουμε σταδιακά την ανισότητα ως εξής : 0 1 sin 0 sin sin1 1 sin 0.017... 1 1 1 1 1 sin 1 0.017 2 2 2 x x x x + + + ? Άρα συμπεραίνουμε ότι '( ) 0 [0,1] f x x > ∀ ? , δηλαδή η f(x) είναι γνησίως αύξουσα στο [0,1], με αποτέλεσμα η εξίσωση 1 ( ) cos 0 2 f x x x = = να έχει μοναδική ρίζα στο [0,1]. Ακολουθεί ο κώδικας του ζητούμενου προγράμματος και αμέσως μετά το πρόγραμμα εκτελεσμένο . --------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- C PROGRAM ASK1 C C SYNERGATES DIMOS NIKOLAOS, KAMPOLIS GEORGIOS C C BISEC, QUANEW, SECAN, NEWTO C DOUBLE PRECISION F,DF,EPS,A,B,X,FX,E,Y EXTERNAL F,DF WRITE(6,*) 'GIVE A,B,NIT,EPS' READ(5,*) A,B,NIT,EPS WRITE(6,*) 'INPUT:' WRITE(6,*) 'A=',A,' B=',B WRITE(6,*) 'NIT=',NIT,' EPS=',EPS WRITE(6,*) ' ' WRITE(6,*) 'OUTPUT:' CALL BISECT(F,A,B,NIT,EPS,X,FX,E,KIT,ITEST) 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ΑΡΙΘΜΗΤΙΚΗ ΑΝΑΛΥΣΗ - ΠΡΩΤΗ ΕΡΓΑΣΤΗΡΙΑΚΗ ΑΣΚΗΣΗ WRITE(6,*) 'ITEST=',ITEST,' KIT=',KIT WRITE(6,*) 'X=',X,' FX=',FX WRITE(6,*) 'E=',E WRITE(6,*) 'BISEC HAS FINISHED!!!' C WRITE(6,*) 'GIVE M,NIT,EPS AND X5 OF BISEC FOR X' READ(5,*) M,NIT,EPS,X WRITE(6,*) 'INPUT:' WRITE(6,*) 'M=',M,' NIT=',NIT,' EPS=',EPS WRITE(6,*) 'X=',X WRITE(6,*) ' ' WRITE(6,*) 'OUTPUT:' CALL NEWTON(F,DF,M,NIT,EPS,X,FX,KIT,ITEST) WRITE(6,*) 'ITEST=',ITEST,' KIT=',KIT IF(ITEST.EQ.0) STOP WRITE(6,*) 'X=',X,' FX=',FX WRITE(6,*) 'QUANEW HAS FINISHED!!!' C WRITE(6,*) 'GIVE NIT, EPS,Y=0.5,X=0.25' READ(5,*) NIT,EPS,Y,X WRITE(6,*) 'INPUT:' WRITE(6,*) 'NIT=',NIT,' EPS=',EPS WRITE(6,*) 'Y=',Y WRITE(6,*) 'X=',X WRITE(6,*) ' ' WRITE(6,*) 'OUTPUT:' CALL SECANT(F,NIT,EPS,Y,X,FX,KIT,ITEST) WRITE(6,*) 'ITEST=',ITEST,' KIT=',KIT IF(ITEST.EQ.0) STOP WRITE(6,*) 'X=',X,' FX=',FX WRITE(6,*) 'SECAN HAS FINISHED' C WRITE(6,*) 'GIVE M,NIT,EPS,X=0.5' READ(5,*) M,NIT,EPS,X WRITE(6,*) 'INPUT:' WRITE(6,*) 'M=',M,' NIT=',NIT,' EPS=',EPS WRITE(6,*) 'X=',X WRITE(6,*) ' ' WRITE(6,*) 'OUTPUT:' CALL NEWTON(F,DF,M,NIT,EPS,X,FX,KIT,ITEST) WRITE(6,*) 'ITEST=',ITEST,' KIT=',KIT IF(ITEST.EQ.0) STOP WRITE(6,*) 'X=',X,' FX=',FX WRITE(6,*) 'NEWTO HAS FINISHED.THANK YOU!!!' STOP END C---------------------------------------------------------------- SUBROUTINE BISECT(F,A,B,NIT,EPS,X,FX,E,KIT,ITEST) C C SOLUTION OF THE EQUATION F(X)=0 BY THE BISECTION METHOD C C USES D.P. FUNCTION F C C INPUT: 2
Image of page 2
ΑΡΙΘΜΗΤΙΚΗ ΑΝΑΛΥΣΗ - ΠΡΩΤΗ ΕΡΓΑΣΤΗΡΙΑΚΗ ΑΣΚΗΣΗ C F: FUNCTION C [A,B]: SEARCH INTERVAL C NIT: MAXIMUM NUMBER OF ITERATIONS C EPS: ERROR TEST NUMBER C C OUTPUT: C
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern