Thread: Optimization through derivatives...

  1. #1
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942

    Optimization through derivatives...

    Okay, in Calculus, we're doing optimization through the use of derivatives, and I mostly am getting it, but this elusive problem is evading my grasp:

    Code:
    Two posts, one 12 feet high and the other 28 feet high, stand 30 feet appart. They are to be statyed by two wires, attached to a single stake, running from ground level to the top of each post. Where should the stake be placed to use the least wire?
    So, I have no clue where to start on this problem. Any ideas? I'm sure it's probably something pathetically simple that'll make me kick myself...

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    Draw a picture.

  3. #3
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    Already did. I just can't think of what to do. I must just be really tired or something, because I can't focus on the problem.

  4. #4

    Join Date
    May 2005
    Posts
    1,042
    statyed
    What, exactly, was this supposed to be?

    EDIT:
    steadied? I'm going to go drink beer soon unless you help us help you.
    Last edited by BobMcGee123; 12-07-2005 at 07:48 PM.
    I'm not immature, I'm refined in the opposite direction.

  5. #5

    Join Date
    May 2005
    Posts
    1,042
    The cognitive model of the problem that currently resides in my brain looks something like this:

    The black stakes are the state 12 and 28 ft posts respectively

    The red stake is the stake in the middle

    The blue ........ is the wire

    But I don't know how high the stake is, so either we dont need to, or you forgot to include that part of the problem, or my cognitive model is incorrect.
    Last edited by BobMcGee123; 12-07-2005 at 08:11 PM.
    I'm not immature, I'm refined in the opposite direction.

  6. #6
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    Sorry about that. It's "stayed," not "statyed." The stake is at ground level, so it's 0 ft. high. That's about the same as the picture I drew, except my stake is 0 ft. high.

  7. #7

    Join Date
    May 2005
    Posts
    1,042
    Okay, so, what is the equation for the total length of the wire?

    The first step is, obviously, finding a mathematical description of the length of wire (in the picture that you allege you drew, do you see any triangles?), then, what do you do when you want to optimize an equation?

    EDIT:
    and do you need the exact distance, or can you find another way to represent distance, but makes the math easier?
    Last edited by BobMcGee123; 12-07-2005 at 08:13 PM.
    I'm not immature, I'm refined in the opposite direction.

  8. #8
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    There are two triangles that I see, one with sides of 12, base x, and hypotenuse y, and the other with sides of 28, base 30-x, and hypotenuse z. The equation for the total length of wire is (hypotenuse of triangle 1) + (hypotenuse of triangle 2), so L = y + z.

    I'm thinking that maybe, in order to use the least amount of wire, the triangles would have to be similar, but I'm not sure about that. If they were similar I could set up a proportion and solve for one of the variables in order to single it out and plug it into the L = y + z. Also I see that I need to solve for x, not y or z, so I could use the Pythagorean Theorem to solve for x in either of the triangles.

  9. #9

    Join Date
    May 2005
    Posts
    1,042
    I'm trying to bump you in the right direction without telling you exact answers.

    Lets just set aside details for a moment, and, lets just say you have a function, f(x) where x is the position of the stake on the ground, and it returns the length of the wire at that point.

    You also have f(x)' and f(x)'' (first and second derivatives of f(x))...do you know how to find the max/mins?

    I really don't know what you do/dont' know. It seems you know enough already to solve the problem (I'm trying to figure out what your problem really is).
    I'm not immature, I'm refined in the opposite direction.

  10. #10
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    Yeah, I know how to find the max and min. I think my real problem is that I need to sleep on it and just do it in the morning and see if I can work it out then. I'm have something of a brain fart.

    Thanks for the help.

  11. #11
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Quote Originally Posted by BobMcGee123
    [...]in the picture that you allege you drew [...]
    Quote Originally Posted by BobMcGee123
    I'm trying to bump you in the right direction without telling you exact answers.
    Objection your honor, leading the witness!

  12. #12
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Hmm.. maybe try some of those methods out and ask one of the above gurus if its the right answer.

    Bases are 4.3ft and 25.7ft.
    Wires are 12.75ft and 38.01ft.

    Guessing ftw.

    Edit: Couldn't you just take the first triangle, flip it horizontally, and move it down to make one triangle. That would be a = 30, b = 12 + 28 = 40, c = 50. The wire needs to be 50ft. Then solving for the individual b's wouldnt be hard from that. I got 4.3010439ft from the left as the place to put the spike. Haha thats so probably wrong, I need to get help.
    Last edited by Dae; 12-08-2005 at 01:28 AM.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  13. #13
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    Yup, sleeping finally did it. I guess I did know what to do and just was too tired to do it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Turn Off Optimization?
    By danlee58 in forum C Programming
    Replies: 6
    Last Post: 12-10-2008, 03:52 AM
  2. need reading material for c++ database optimization
    By elninio in forum C++ Programming
    Replies: 0
    Last Post: 07-24-2008, 11:32 PM
  3. optimization flags
    By markucd in forum C++ Programming
    Replies: 4
    Last Post: 06-30-2006, 09:08 AM
  4. Optimization settings
    By Roaring_Tiger in forum C Programming
    Replies: 4
    Last Post: 02-23-2005, 02:53 AM
  5. Optimization stuff
    By jverkoey in forum C++ Programming
    Replies: 2
    Last Post: 05-26-2004, 06:02 AM