Page 1 of 2 12 LastLast
Results 1 to 40 of 41

Thread: A real quick question

  1. #1

    Thread Starter
    Lively Member MHENK's Avatar
    Join Date
    Sep 2001
    Location
    Wisconsin
    Posts
    99

    A real quick question

    Call me stupid, but someone could please solve this for me????


    A piece of wire 100cm long is going to be cut into several pieces and used tp construct the skeleton of a rectangular box with a square base.

    (a) what are the dimensions of the box with the largest volume?
    (b) what are the dimensions of the box with the largest Surface Area?

    -Thanks.

    MHENK
    "Have you ever woken up, looked at yourself in the mirror, and said 'screw the diet, how fat can i possibly get'?"

  2. #2
    Lively Member FRAIL_KNIGHT's Avatar
    Join Date
    Nov 2001
    Posts
    100
    OOOOOOOOO, OOOOOOOO

    This is a calculus question, I took Calculus....


    Let me think....
    IF Something <> "" Then
    There's Something there...
    ------------------------------------------
    GWBASIC, QBASIC, QuickBASIC, VB5/6, A little DJGPP C++, and I hate it.
    ------------------------------------------
    The pic u see is the logo of my favorite Christian Punk Band...Officer Negative!!!

    www.OfficerNegative.com

  3. #3
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    OK a box has 12 edges, so 100 cm divided by 12 is 8 and 1/3 cm per side. The surface area is then 416 and 2/3 cm^2, and the volume is also 416 and 2/3 cm^2

    ...don't know for sure if thats right, but it should be.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  4. #4

    Thread Starter
    Lively Member MHENK's Avatar
    Join Date
    Sep 2001
    Location
    Wisconsin
    Posts
    99
    mlewis -- theoretically that would work, but I am trying to maximize the volume of the box. I am not saying that all edges of the box are the same, they can change. Tahnks anyway though
    "Have you ever woken up, looked at yourself in the mirror, and said 'screw the diet, how fat can i possibly get'?"

  5. #5
    Lively Member FRAIL_KNIGHT's Avatar
    Join Date
    Nov 2001
    Posts
    100

    Talking

    I think you need to take the derivative of the volume of the rectangle, using the value of 100 cm. I don't have my book with me, and its been a while since I did one of those Max/Min problems, but I think you do something like that....
    IF Something <> "" Then
    There's Something there...
    ------------------------------------------
    GWBASIC, QBASIC, QuickBASIC, VB5/6, A little DJGPP C++, and I hate it.
    ------------------------------------------
    The pic u see is the logo of my favorite Christian Punk Band...Officer Negative!!!

    www.OfficerNegative.com

  6. #6
    Lively Member FRAIL_KNIGHT's Avatar
    Join Date
    Nov 2001
    Posts
    100
    The volume of a rectangle should be length*width*height...

    Width and hight are the same so...

    V=L*W*H...

    V=L*W^2...

    Input 100 cm as V...

    100=L*W^2

    THEN I'm lost...I forget if you take the derivative now or after you solve for L??
    IF Something <> "" Then
    There's Something there...
    ------------------------------------------
    GWBASIC, QBASIC, QuickBASIC, VB5/6, A little DJGPP C++, and I hate it.
    ------------------------------------------
    The pic u see is the logo of my favorite Christian Punk Band...Officer Negative!!!

    www.OfficerNegative.com

  7. #7
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    If I recall correctly, if all the edges add up to 100cm, then it will always have the same volume and surface area...at least, it seems like it should!!!!

    Therefore my answer is correct...
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  8. #8
    Lively Member FRAIL_KNIGHT's Avatar
    Join Date
    Nov 2001
    Posts
    100
    So...

    V=L * W ^ 2

    The derivative of V=(L*2W)+(0*W^2)...
    Which is V=L2W
    L=V/(2W)

    Input L back in the function

    V = (V/(2W)) * (W^2)

    Input 100 cm as V

    100=(100/2W)) * (W^2)

    I'm very confused...

    You need to solve for L and W, Input 100 cm somewhere, and at some point take the derivative. I can't help you any more than that. Sorry
    IF Something <> "" Then
    There's Something there...
    ------------------------------------------
    GWBASIC, QBASIC, QuickBASIC, VB5/6, A little DJGPP C++, and I hate it.
    ------------------------------------------
    The pic u see is the logo of my favorite Christian Punk Band...Officer Negative!!!

    www.OfficerNegative.com

  9. #9

    Thread Starter
    Lively Member MHENK's Avatar
    Join Date
    Sep 2001
    Location
    Wisconsin
    Posts
    99
    what's this do for you?

    (4l+4w+4h)=100
    l+w+h=25


    v=l*w*h

    SA = 2lh+2lw+2wh

    Mlewis-Your answer is correct if and only if the box is a cube. I need to deal with any other type of box. The length and width are the same, but the height varies. This gets

    l^2+h=25

    v=h*l^2

    SA=4lh+2l^2

    now to maximine surface area and volume.... what do i do?
    "Have you ever woken up, looked at yourself in the mirror, and said 'screw the diet, how fat can i possibly get'?"

  10. #10
    Lively Member FRAIL_KNIGHT's Avatar
    Join Date
    Nov 2001
    Posts
    100

    Unhappy

    You have to take the derivative/integral of Volume/SA. Can I check my Calculus book when I get home, and tell you tomorrow??

    Its been almost a year since I did maximizing probs.
    IF Something <> "" Then
    There's Something there...
    ------------------------------------------
    GWBASIC, QBASIC, QuickBASIC, VB5/6, A little DJGPP C++, and I hate it.
    ------------------------------------------
    The pic u see is the logo of my favorite Christian Punk Band...Officer Negative!!!

    www.OfficerNegative.com

  11. #11
    Member
    Join Date
    Nov 2001
    Location
    Canada
    Posts
    59

    What this post doing here ?

    That's not really a general VB question... Isn't it?

  12. #12

    Thread Starter
    Lively Member MHENK's Avatar
    Join Date
    Sep 2001
    Location
    Wisconsin
    Posts
    99
    I thought General VB Questions stood for General, Very Bad, Questions. Sorry, i'll keep this stuff in the right place.....

    Seriously though, no one reads the maths forums consistantly, so when I have a question I need solved quickly, I post it here and let the VB Supergeniuses work on it...

    -MHENK
    "Have you ever woken up, looked at yourself in the mirror, and said 'screw the diet, how fat can i possibly get'?"

  13. #13
    Fanatic Member Slaine's Avatar
    Join Date
    Jul 2002
    Posts
    641
    It would be if someone suggests MHENK writes a VB proggie that calculates and graphs all possible volume and surface areas as the bottom square changes from 0cm square to 100cm square.
    Martin J Wallace (Slaine)

  14. #14
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226

    Re: A real quick question

    Originally posted by MHENK

    A piece of wire 100cm long is going to be cut into several pieces and used tp construct the skeleton of a rectangular box with a square base.

    (a) what are the dimensions of the box with the largest volume?
    (b) what are the dimensions of the box with the largest Surface Area?

    Does this mean that the length of all the edges must add up to 100cm, or does it mean that the maximum length of an edge is 100cm?
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  15. #15
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Re: A real quick question

    Originally posted by MHENK
    Call me stupid, but someone could please solve this for me????


    A piece of wire 100cm long is going to be cut into several pieces and used tp construct the skeleton of a rectangular box with a square base.

    (a) what are the dimensions of the box with the largest volume?
    (b) what are the dimensions of the box with the largest Surface Area?

    -Thanks.

    MHENK
    a rectangular box with a square base is a cube

    100 = 12 / x
    x = 100 / 12

    x = 8 1/3


    The volume of a cube:

    Length ^ 3

    the surface area

    6 * Length ^ 2

    So the volume would be:

    578.703703703703703703703703703704

    and the surface area would be

    416.666666666666666666666666666667

    That's the only maximum value because a rectangle with a square base is, well a cube

  16. #16
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    oh no, sorry my bad

    it's a cuboid

    i get it now

  17. #17
    Fanatic Member Slaine's Avatar
    Join Date
    Jul 2002
    Posts
    641
    The following is not perfect but gives you an idea.

    It gives me the following result:

    Max Volume: 578.703426
    8.32999999999987x8.32999999999987x8.34000000000027
    Max Area: 416.6666
    8.32999999999987x8.32999999999987x8.34000000000027

    you can change the accuracy by decreasing the increment in the following lines:

    Width = Width + 0.01
    Depth = Depth + 0.01

    But it will never give you a perfect result.

    Code:
        Dim Width As Double
        Dim Height As Double
        Dim Depth As Double
        Dim Volume As Double
        Dim Area As Double
        
        Dim MVWidth As Double
        Dim MVHeight As Double
        Dim MVDepth As Double
        Dim MaxVolume As Double
        Dim MVArea As Double
        
        Dim MAWidth As Double
        Dim MAHeight As Double
        Dim MADepth As Double
        Dim MAVolume As Double
        Dim MaxArea As Double
    
        
        
        Width = 0
        Depth = 0
        
        Do Until Height < 0
            'Calculate the  height
            Height = (100 - (((Width * 2) + (Depth * 2)) * 2)) / 4
            
            'Calculate Volume
            Volume = Width * Depth * Height
            
            'Calculate Area
            Area = ((Height * Depth) * 4) + ((Width * Depth) * 2)
            
            Debug.Print "volume: " & Volume, "Area: " & Area
            
            If Volume > MaxVolume Then
                MVWidth = Width
                MVHeight = Height
                MVDepth = Depth
                MaxVolume = Volume
                MVArea = Area
            End If
            
            If Area > MaxArea Then
                MAWidth = Width
                MAHeight = Height
                MADepth = Depth
                MAVolume = Volume
                MaxArea = Area
            End If
            
            Width = Width + 0.01
            Depth = Depth + 0.01
        
        Loop
        
    
    Debug.Print "Answer:"
    Debug.Print "Max Volume: " & MaxVolume
    Debug.Print MVWidth & "x" & MVDepth & "x" & MVHeight
    
    Debug.Print "Max Area: " & MaxArea
    Debug.Print MAWidth & "x" & MADepth & "x" & MAHeight
    Martin J Wallace (Slaine)

  18. #18
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Cutting wire into 12 equal length pieces and making a cube is the correct answer. The proof has been posted in the maths forum.

    Making a cube seems like a good guess for maximizing the volume. Without working on the problem, it is not obvious (to me anyway) that the same shape will maximize both area and volume, no matter what that shape is.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  19. #19
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Smile calculus

    v=h*l^2

    SA=4lh+2l^2

    now to maximine surface area and volume.... what do i do?
    you find the extreeme values for the function at the solution for the derivative(function) =0:
    v=hl^2
    l^2+h=25
    l^2=25-h
    v=(25-h)h
    v=25h-h^2
    Dv=25-h=0 => h=25

    V=whl
    4l+4w+4h=100
    l+w+h=25
    three unknowns two equations, subproblem:
    V=xwh where x is constant, gives the an expression for max one of the variables using extreemevalues at Derivate=0
    w+h=25-x
    V=xw(25-x-w)=25xw-x^2w-xw^2
    DV=25x-x^2-2xw=0 => w=(25-x)/2 ; w=0 or w=25 would give a flat box, the extreemvalue is maximi
    going the same way with h we get h=(25-x)/2 => w=h, and for l: l=(25-x)/2 assuming x was say substitute for w. => w=h=l=25/3

    A=2wh+2wl+2hl
    l+w+h=25
    three unknowns two equations, subproblem:
    A=2wh+2wx+2hx where x is constant, blahblah see above
    A=2(25-x-h)h+2(25-x-h)x+2hx
    DA=2(25-x-h)-2x+2x=>h=50-2x; h=0 or h=25 would give a flat box..blahblahblah(See above)... =>w=h=l=25/3
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  20. #20
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    duh, i'm late as usual Well just a different solution here
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  21. #21
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    what an earth is BORK?

  22. #22
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226

    Bork and other stuff

    I second the motion!! What is BORK!?!?


    Oh and da_silvy, I am really dying to know the phrase encrypted in your signature, but my cracking skills are a bit rusty... if you must keep it a secret, just pm/email me
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  23. #23
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    ehehheheh wouldn't you like to know.


  24. #24
    haravinth
    Guest
    I am thinking....
    This stuff is more complicated.

  25. #25
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Originally posted by haravinth
    I am thinking....
    This stuff is more complicated.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  26. #26
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Originally posted by haravinth
    I am thinking....
    This stuff is more complicated.
    what stuff?

  27. #27
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    He probably read Ked's post.

    It takes a while to realise that Ked has a pseudo maths generator which spits out lines of totally random mathematical looking gibberish just to confuse people.
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  28. #28
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Originally posted by Arbiter

    It takes a while to realise that Ked has a pseudo maths generator which spits out lines of totally random mathematical looking gibberish just to confuse people.

    Really? I gotta get me one for VB

    OK after coding myself a random "crap" generator, I have determined that is is the same one Microsoft uses to make their software! This is the Windows XP source code:

    VB Code:
    1. Dim Arf(184) As String
    2.  
    3. ArfStuff:
    4. Arf(Int(Rnd * 184)) = "BOB"
    5. Do
    6.  Arf(Int(Rnd * 184)) = Arf(Int(Rnd * 184))
    7. Loop Until Arf(54) = Arf(18)
    8. If StupidRandomThingFunction(Arf(1), 184^3.2 * Rnd, Me.hWnd, Arf(184)) Then
    9.   Call BSOD
    10.   Call RandomBehaviorGenerator
    11. Else
    12.   Call UglySpecialEffects
    13. End If
    14. Goto ArfStuff

    Note the terrible programming concepts and the use of the eternally cursed GoTo!!!!




    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  29. #29
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    yes, that's good code

    Never ending loop.

    Never ending goto recursion

  30. #30
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Try it -- it WILL end...eventually!

    In fact, it will only run once!

    Read through carefully and see why...
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  31. #31
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    in fact,

    it won't even run

    sub or function not defined

  32. #32
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    DUH!!!!


    Of COURSE they're not defined! I'm just talking about the loop
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  33. #33
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    meh, got no idea

  34. #34
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    *looks at the thread's subject*

    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  35. #35
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Originally posted by Jotaf98
    *looks at the thread's subject*

    What's THAT supposed to mean??!

    Are you trying to say we're off subject or something?!?
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  36. #36
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Kedaman: Just noticed your post. It seems to be correct. At least you got the right answer.

    However, iusing solving simultaneous equations seems a bit complicated and unnecessary. See the Thread in the Maths Forum.

    If you start with one unknown variable (say X), which is the decimal fraction of the wire used for base and top of the parallelopiped, you can get a fairly direct solution with just a bit of algebraic donkey work.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  37. #37
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226

    For the curious

    My little "endless loop" above is not endless for a very crazy reason: it will eventually do a BSOD, so the system must reboot, and thus the loop is ended!
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  38. #38
    Member
    Join Date
    Dec 2000
    Location
    Faraway from Osama bin Laden <--- Loser
    Posts
    42
    yep, it is a bit complicated.
    --------------
    hot2fire
    --------------
    I hate Microsoft, but I use it because I still badly need it. Hehe. Good luck in VB programming.

  39. #39
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Originally posted by mlewis


    What's THAT supposed to mean??!

    Are you trying to say we're off subject or something?!?
    No, it's just that the subject says "a real quick question"... it doesn't seem to be that quick to me
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  40. #40
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    it's been solved like 4 times, he just hasn't noticed

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width