Announcement

Collapse
No announcement yet.

Apolyton Math Question. bring your calculus hats

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    awesome. forgot to attach.

    rename to opt.exe from opt.zip.

    poly doesn't like exe attachments.
    Attached Files
    12-17-10 Mohamed Bouazizi NEVER FORGET
    Stadtluft Macht Frei
    Killing it is the new killing it
    Ultima Ratio Regum

    Comment


    • #47
      Code:
            IMPLICIT DOUBLE PRECISION(A, T, X-Z)
            IMPLICIT INTEGER(B-S, U-W)
            
            
            COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z
            SAVE/PARAMS/
            
            COMMON/VARS/S(5),W
            SAVE/VARS/
            
            SMAX(1)=8
            SMAX(2)=12
            SMAX(3)=16
            SMAX(4)=20
            SMAX(5)=24
            
            PRINT *, "Enter E1"
            READ *, SCOEFF(1)
            
            PRINT *, "Enter E2"
            READ *, SCOEFF(2)
            
            PRINT *, "Enter E3"
            READ *, SCOEFF(3)
            
            PRINT *, "Enter E4"
            READ *, SCOEFF(4)
            
            PRINT *, "Enter E5"
            READ *, SCOEFF(5)
            
            PRINT *, "Enter x"
            READ *, X
            
            PRINT *, "Enter Z"
            READ *, Z
            
            T = TMIN()
            
            PRINT *, S(1), S(2), S(3), S(4), S(5), W, T
            
            RETURN
            END
            
            DOUBLE PRECISION FUNCTION TMIN()
      			
            IMPLICIT DOUBLE PRECISION(A, T, X-Z)
            IMPLICIT INTEGER(B-S, U-W)
            
            DIMENSION SMIN(5)
            
            COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z
            SAVE/PARAMS/
            
            COMMON/VARS/S(5),W
            SAVE/VARS/
      
            TMIN = 1.0D10
            
            DO 103 I1=0,1
            DO 113 I2=0,1
            DO 123 I3=0,1
            DO 133 I4=0,1
            DO 143 I5=0,1
            DO 153 W=1,9
      	S(1)=I1*SMAX(1)
      	S(2)=I2*SMAX(2)
      	S(3)=I3*SMAX(3)
      	S(4)=I4*SMAX(4)
      	S(5)=I5*SMAX(5)
      	T=TCALC()
      	IF(T.LE.TMIN) THEN
      		TMIN=T
      		DO 173 J=1, 5
            		 SMIN(J)=S(J)
       173	     CONTINUE
      		WMIN=W
      	ENDIF
       153 CONTINUE
       143 CONTINUE
       133 CONTINUE
       123 CONTINUE
       113 CONTINUE
       103 CONTINUE
       
      	DO 183 J=1, 5
            	 S(J)=SMIN(J)
       183  CONTINUE
      	 W=WMIN
      			
      	 END
      			
      	DOUBLE PRECISION FUNCTION TCALC()
      		
      	IMPLICIT DOUBLE PRECISION(A, T, X-Z)
              IMPLICIT INTEGER(B-S, U-W)
            
              COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z
              SAVE/PARAMS/
            
              COMMON/VARS/S(5),W
              SAVE/VARS/
            
              TCALC = 1.0D10
              C = CCALC(W,Z)
              A = ACALC()
              H = HCALC()
              IF(H.LT.1) GOTO 104
              TCALC = C*A/H
            
       104	RETURN
               END
      			
      			
      	INTEGER FUNCTION CCALC(W,Z)
      	
              DOUBLE PRECISION Z
              INTEGER W
            
              CCALC = INT(9.0/(W*(1.0+Z))-0.00001)+1
      
               END
            
              INTEGER FUNCTION HCALC()
            
              IMPLICIT DOUBLE PRECISION(A, T, X-Z)
              IMPLICIT INTEGER(B-S, U-W)
            
              COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z
              SAVE/PARAMS/
            
              COMMON/VARS/S(5),W
              SAVE/VARS/
            
              HCALC = 0
              DO 105 I = 1, 5
            	  HCALC=HCALC+SCOEFF(I)*S(I)
       105 CONTINUE
       
      	END
      			
      	DOUBLE PRECISION FUNCTION ACALC()
      			
      	IMPLICIT DOUBLE PRECISION(A, T, X-Z)
              IMPLICIT INTEGER(B-S, U-W)
            
              COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z
              SAVE/PARAMS/
            
              COMMON/VARS/S(5),W
              SAVE/VARS/
            
              ACALC = X
              DO 106 I = 1, 5
            	 ACALC=ACALC+120.0*W*S(I)
       106 CONTINUE
       
      	END
      12-17-10 Mohamed Bouazizi NEVER FORGET
      Stadtluft Macht Frei
      Killing it is the new killing it
      Ultima Ratio Regum

      Comment


      • #48
        Fortran

        Comment


        • #49
          physics language
          12-17-10 Mohamed Bouazizi NEVER FORGET
          Stadtluft Macht Frei
          Killing it is the new killing it
          Ultima Ratio Regum

          Comment


          • #50
            You're awesome KH!
            I made a spreadsheet and corresponding chart to show the solution. I made the spreadsheet a few hours before i downloaded the program and had to basically just had to guess and check the graph.

            but thats awesome KH and essentially what I wanted to make without the ability to do so.

            BTW, 45 minutes for me? I am flattered.
            Last edited by MRT144; April 10, 2007, 00:14.
            "I hope I get to punch you in the face one day" - MRT144, Imran Siddiqui
            'I'm fairly certain that a ban on me punching you in the face is not a "right" worth respecting." - loinburger

            Comment


            • #51
              graph!
              Attached Files
              "I hope I get to punch you in the face one day" - MRT144, Imran Siddiqui
              'I'm fairly certain that a ban on me punching you in the face is not a "right" worth respecting." - loinburger

              Comment


              • #52
                Originally posted by KrazyHorse


                I don't see why not. If you're in a domain with continuous partial derivatives and no zeroes in any of the partial derivatives anywhere then the absolute minimum (and maximum, of course) on your domain must be at one of the corners.
                On the boundary in general, if the boundary isn't bounded by hyperplanes like in this case.

                Also that's IF there is an extremum it has to be on the boundary. You need compactness to omit this part IIRC.

                I guess I knew this, I never thought about what derivatives of quotients of multivariable linar functions would look like.

                I guess all the S variable are integers each so all of this is moot since there's only a finite number of possibilities.
                (Except for w)
                Last edited by Lul Thyme; April 10, 2007, 07:41.

                Comment


                • #53
                  Originally posted by Lul Thyme


                  On the boundary in general, if the boundary isn't bounded by hyperplanes like in this case.

                  Also that's IF there is an extremum it has to be on the boundary. You need compactness to omit this part IIRC.

                  I guess I knew this, I never thought about what derivatives of quotients of multivariable linar functions would look like.

                  I guess all the S variable are integers each so all of this is moot since there's only a finite number of possibilities.
                  (Except for w)
                  w is bounded above by 9

                  And we're on a closed, bounded subset of R^n so bolzano-weierstrass tells me what I need to know here...
                  12-17-10 Mohamed Bouazizi NEVER FORGET
                  Stadtluft Macht Frei
                  Killing it is the new killing it
                  Ultima Ratio Regum

                  Comment


                  • #54
                    Lets face it,

                    you could all be making this up and frankly you probably are.
                    Space is big. You just won't believe how vastly, hugely, mind- bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.
                    Douglas Adams (Influential author)

                    Comment


                    • #55
                      Originally posted by KrazyHorse


                      w is bounded above by 9

                      And we're on a closed, bounded subset of R^n so bolzano-weierstrass tells me what I need to know here...
                      Sure.
                      In this specific problem, the domain can be taken to be a finite set so you don't even need Bol-Wei to know it's compact.

                      If you reread my comment you'll see that I wasn't denying your conclusion in this specific case, just nitpicking that the way you stated it in general was missing a few things.

                      Comment


                      • #56
                        Is this something to do with CIV?
                        You just wasted six ... no, seven ... seconds of your life reading this sentence.

                        Comment


                        • #57
                          Originally posted by Krill
                          Is this something to do with CIV?
                          That would be blasphemy on the off-topic boards no?

                          Comment


                          • #58
                            Probably.

                            Not that I care much though
                            You just wasted six ... no, seven ... seconds of your life reading this sentence.

                            Comment


                            • #59
                              Originally posted by Lul Thyme


                              Sure.
                              In this specific problem, the domain can be taken to be a finite set so you don't even need Bol-Wei to know it's compact.

                              If you reread my comment you'll see that I wasn't denying your conclusion in this specific case, just nitpicking that the way you stated it in general was missing a few things.
                              Okay. No problem.

                              It's just that in this specific case the conclusion seemed obvious to me.

                              I know that if we'd had curved boundaries etc. my conclusion would not be true. But given any specific problem my physics brain immediately draws a picture of it.

                              That's what makes me a good physicist and a bad mathematician. Some math problems just don't have any rational picture you can draw of them...
                              12-17-10 Mohamed Bouazizi NEVER FORGET
                              Stadtluft Macht Frei
                              Killing it is the new killing it
                              Ultima Ratio Regum

                              Comment


                              • #60
                                The unfortunate thing for MRT is that none of that work is actually applicable to CIV, if that is indeed what MRT is using it for.
                                You just wasted six ... no, seven ... seconds of your life reading this sentence.

                                Comment

                                Working...
                                X