1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Maximizing an evolutionary biology equation (vector calculus)

  1. Jul 15, 2013 #1
    1. The problem statement, all variables and given/known data

    For a Gaussian landscape, the log-fitness change caused by a mutation of size r in chemotype element i is

    [itex] Q_i(r) = -\vec{k} \cdot S \cdot \hat{r_i}r - \dfrac{1}{2} \hat{r_i} \cdot S \cdot \hat{r_i}r^2 [/itex].

    To find the largest possible gain in log-fitness achievable by mutating chemotype element i, maximize [itex] Q_i(r) [/itex] with respect to r.

    2. Relevant equations

    The solution is:

    [itex] \Theta _i = \dfrac{|\vec{k} \cdot S \cdot \hat{r_i}|^2}{2\hat{r_i} \cdot S \cdot \hat{r_i}} [/itex]

    3. The attempt at a solution

    [itex] Q_i(r)' = -\vec{k} \cdot S \cdot \hat{r_i} - \hat{r_i} \cdot S \cdot \hat{r_i}r = 0 [/itex]

    [itex] \hat{r_i} \cdot S \cdot \hat{r_i} r = -\vec{k} \cdot S \cdot \hat{r_i} [/itex]

    [itex] r = \dfrac{-\vec{k} \cdot S \cdot \hat{r_i}}{\hat{r_i} \cdot S \cdot \hat{r_i}} [/itex]

    It's been forever since I've dealt with vector calculus so I know that I'm approaching this entirely the wrong way. Any points in the right direction will be greatly appreciated!
  2. jcsd
  3. Jul 15, 2013 #2


    Staff: Mentor

    It looks like you put a great deal of effort into formatting the equation above, but I'm having a hard time understanding what it says. If you "dot" two vectors, you get a scalar, but you can't dot that scalar with another vector. In other words, an expression such as ##\vec{u} \cdot \vec{v} \cdot \vec{w}## doesn't make sense.

    Also, is S a scalar? How you wrote it suggests that it is.
  4. Jul 15, 2013 #3
    Sorry! I forgot to state that S is a symmetric positive definite matrix. I believe that the operation will just be taking the dot product of [itex] \vec{k} [/itex] and S, and then using that as the scalar weight on [itex] \vec{k} [/itex].

    This is for a research project and I'm just going through old literature trying to rederive the equations so that I can better understand what's going on, and I kind of mindlessly transcribed it exactly as it was in the paper (with two dots). I'm not sure of the rationale behind putting the two dots in the paper, but it's there nonetheless.

    Hope this helps explain it better...
  5. Jul 16, 2013 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If I understand correctly, you have an expression of the form
    [tex]Q(r) = -a r - \frac{1}{2} b r^2 \\
    \text{where } a = \vec{k} \cdot S \hat{r}_i,\text{ and } b = \hat{r}_i \cdot S \hat{r}_i[/tex]
    with ##a, b## being constants, independent of ##r##. Maximizing Q(r) is a simple excercise in univariate calculus, and you did it correctly. Why do you think you have made an error?
  6. Jul 16, 2013 #5
    Unfortunately, my result does not seem to match with the solution arrived at in the paper which is provided in 2. Relevant Equations.
  7. Jul 16, 2013 #6
    My mistake in the previous reply to you. The expression should be [itex] \vec{k} \cdot S \cdot \vec{k}^T [/itex]. Let [itex] \vec{k} [/itex] be a 1 x N matrix and S an N x N matrix. The dot product of S and [itex] \vec{k}^T [/itex] will result in an N x 1 matrix which is then dotted with the 1 x N [itex] \vec{k} [/itex] matrix, resulting in a scalar.
  8. Jul 17, 2013 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I think that reason for the mis-match is that you are not computing the same thing the paper is computing. You calculated the best value of ##r##; the paper calculated the maximum value of ##Q##. Can you see now what you need to do?

    BTW: when replying, always use the "quote" button; otherwise nobody can figure out which message you are responding to.
  9. Jul 17, 2013 #8
    Ah. I have it figured out now. I can't believe I overlooked such an elementary concept...

    Thank you Ray!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted