Results 1 to 7 of 7
  1. #1
    DEUS VULT
    FITE ME

    Join Date
    Mar 2007
    Posts
    10,606
    BG Level
    9
    Blog Entries
    4

    Maff Question (Tangents; or, we need a Sath / Woozie tag)

    Hey jerks. In my Behavioral Ecology course we're currently discussing the Marginal Value Theorem for foraging, which in the patch-choice model basically states that there are diminishing returns from foraging in a patch, and that depending on the time it would take to move to the next patch, it can sometimes be more advantageous to leave a relatively abundant patch of resources since the rate of return (in calories) will lower the longer you stay. Interestingly enough, when travel time between patches is long, it's more advantageous to stay in a patch longer, even if you get less and less return.

    Anyway! This is just an extra credit question, but as it's dealing with tangents and derivatives (I've focuses more on stats than calc), I'm a bit lost as to how to start. Here is the problem:

    Spoiler: show



    Here's an image of the patch-choice model for a more basic idea:
    Spoiler: show



    Basically, I need to find the tangent that would intersect the x-axis at -3 (three minute travel time between each patch) and hit the rate of return just as the curve begins to deplete. Then I'd need to drop a line down from where the tangent intersects the return curve to ascertain how long I'd stay at that patch. I understand what I'm looking for, just not how to go about mathing!

    Thanks very much!

  2. #2
    Ridill
    Join Date
    Oct 2006
    Posts
    18,369
    BG Level
    9
    FFXIV Character
    Sath Fenrir
    FFXIV Server
    Cactuar
    FFXI Server
    Fenrir

    Maff Question (Tangents; or, we need a Sath / Woozie tag)

    Before I answer this, let me just say that there is a much better way to solve this. I was laying in bed when I read my PMs and I'm too stubborn to ignore this but too lazy to get up for some pen and paper. Also, decent chance this is wrong.

    Firstly, there's some rule relating the slope of a secant line to the slope of a tangent line. I don't remember exactly what it is so this might be way off. I took the slope of the line between the points (5,1) and (0,0), the minimum and maximum of the displayed graph. Got m = 1/5 obviously.

    Next I looked at the point (-3,0) with m=1/5. Solved y=mx+b for b=3/5, or .6. Eyeballed the trace of that line to the curve and saw that it looked reasonable-ish.

    Then, since I want a slope of 1/5, I set m = 1/5 in y'=2x/(x^2+1)^2 where y'=m. Algebra to set the expaded equation to zero and I get x^4 + 2x^2 -10x +1 = 0. Solved for the roots, 2 were imaginary. Tossed them out. Of the two remaining one was x =~.01 and the other was x=~1.8.

    X=~1.8 matches what I eyeballed to be the intersection point of my line and looks to be the turning point of the curve.

    I did this all in my head and with wolfram app for the roots, but I'm drawing a blank super hard on a proper way to do these types of problems.

    Hopefully someone else can clarify or point out errors if I made any.

  3. #3
    Campaign
    Join Date
    Aug 2007
    Posts
    6,547
    BG Level
    8

    I've been thinking too much tonight with 2 big tests coming up tomorrow and the day after, but unless I'm thinking about it completely wrong, a simple check with the point-slope formula (well, you have to find the y coordinate, but that's easy enough) will show that that isn't the correct answer, Sath, because the X-intercept isn't -3

  4. #4
    Campaign
    Join Date
    Aug 2007
    Posts
    6,547
    BG Level
    8

    The answer is 2 minutes.

    I was racking my brain trying to remember some formula that would work, but proving Sath wrong gave me a better idea -- guess and check. And unless someone proves me wrong, I'm going to go with that is how you are suppose to figure it out, because it is extra credit, after all. I just chose 2 because Sath's guess of 1.8 was pretty close, but the line needed to be just a little flatter. But yeah here's the explanation and sorry for no equation pictures:

    Also, I'm leaving out most of the algebra just so things are clearer

    With a chosen X value of 2, we need to find the Y value, so go ahead and plug that into the normal equation:

    Y=1-1/((x^2)+1) >>> Y=1-1/((2^2)+1) >>> Y = .8

    Next, lets find the slope of the equation by plugging in the X value into the derivative of the normal equation, which is given:

    f(x)=2x/((x^2)+1)^2 >>> f(2)=2(2)/((2^2)+1)^2 >>> f(2)=4/25

    Now that we have the slope, we can plug everything into the point-slope formula (leaving everything I substitute in parentheses for ease of reading):

    Y-y1=m*(X-x1) >>> Y-(.8)=(4/25)(X-2) >>> Y=(4/25)(X-2)+(.8)

    Great, now that we have the equation of the tangent we can plug in 0 for Y and find the X-Intercept:

    Y=(4/25)(X-2)+(.8) >>> (0)=(4/25)(X-2)+(.8) >>> X= -3

    And there you have it

  5. #5
    Renegade Philosopher
    Join Date
    Jul 2004
    Posts
    4,439
    BG Level
    7

    Also getting 2 minutes using the method below. My methodology is:

    (1) Use the Mean Value Theorem and Fundamental Theorem of Calculus to find the Average Value of Happiness Per Party (no actual integration required).

    (2) Find the Maximum of Average Value of Happiness Per Party by taking the derivative of (1) and finding the zeroes (I get 0 and 2 as possible real solutions -- 0 corresponds to a minimum [no happiness if you go to no parties]).

    I can elaborate if that sounds like jibberish. It's also a little more involved algebra than the above posts (mostly in step 2).

  6. #6
    DEUS VULT
    FITE ME

    Join Date
    Mar 2007
    Posts
    10,606
    BG Level
    9
    Blog Entries
    4

    You guys are all fantastic, I'm going to sit with this a bit and see if I can't make a light go off in my brain. I'm far more concerned with understanding this than getting a problem right.

  7. #7
    An Efficient Consumption Bundle
    Join Date
    Oct 2005
    Posts
    3,178
    BG Level
    7
    FFXIV Character
    Elyise Thierremont
    FFXIV Server
    Gilgamesh
    FFXI Server
    Bahamut
    WoW Realm
    Muradin

    Since the problem has been solved I'll add an aside:
    Have you been introduced to the method of Lagrangian multipliers for solving constrained optimization problems? This method is used a lot in economics, but applies to any problem where you wish to find where a function is tangent to some constraint. It's also useful because it can be used for dynamic optimization, which would pop up in ecology/biology. The wikipedia page (liked above) provides a good technical explanation but I'll give a simple

    max{x,y} z=(x^a)*(y^(1-a)) subject to c = x*p1 + y*p2 - This is a common utility maximization problem using a Cobb-Douglas utility function where c is income, p1, p2 are the prices of good one and two, and a is a preference parameter where a<1

    Set up the Lagrangian: L = (x^a)*(y^(1-a)) + mu(c-x*p1-y*p2)

    Take the first order conditions:
    L1 = a*(x^(a-1)*(y^(1-a)) - mu*p1 = 0
    L2 = (1-a)*(x^a)*(y^(-a) - mu*p2 = 0
    Lmu = c-x*p1-y*p2 <-- which is recovering your constraint

    Solve L1, L2 for mu, the Lagrange multiplier, and solve for one of the variables of interest. (Can also just divide L1 by L2, but that requires an assumption that )
    -> y = [(1-a)/a]*[(x*p1)/p2]

    Substitite that back into L3, which is your constraint and solve for x:
    x* = (a*c)/p1
    And by using that earlier condition
    y* = ((1-a)c)/p2

    This gives you optimal values of your variables of interest in terms of the exogenous variables.

    Anyway, hopefully you find this interesting if you haven't seen this method before. It's utility comes from its expandability. You could have an objective function of 12 variables and four constraint equations and the method works the same. But with more than three variables and two constraints the algebra gets very tedious to do by hand, but luckily it's pretty easy to solve with a program like Maple or MatLab (and a bunch of others I would assume).

Similar Threads

  1. Replies: 5
    Last Post: 2004-12-05, 06:28