Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Math Help - Calculus for computers question

  1. #1
    Junior Member
    Joined
    Aug 2008
    Posts
    26

    Calculus for computers question

    Hi, i have an assignment of 2 questions - both of which i cant do. Im asking for help for the first question to try and get the ball rolling as i have no idea...


    We are given a formula, its just something random from a science book:

    U(r) = A/r^12 - B/r^6

    Where A and B are constants and r is the distance separating atoms (not important information). It doesnt say what U is, im assuming its like f(x) but U(r)...


    i) Calculate r = rs, such that U(rs) is a minimum
    (the "rs" is r(subscript)s).

    Now, we are using the program mathematica to do this assignment, and i have attempted this question in a similar way to how the tut was done, that is to input the function and then find the 2nd derivative, which is:
    156a/r^14 - 42b/r^8

    and that is as far as i can get, i would appreciate any help!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by Siddy View Post
    Hi, i have an assignment of 2 questions - both of which i cant do. Im asking for help for the first question to try and get the ball rolling as i have no idea...


    We are given a formula, its just something random from a science book:

    U(r) = A/r^12 - B/r^6

    Where A and B are constants and r is the distance separating atoms (not important information). It doesnt say what U is, im assuming its like f(x) but U(r)...


    i) Calculate r = rs, such that U(rs) is a minimum
    (the "rs" is r(subscript)s).

    Now, we are using the program mathematica to do this assignment, and i have attempted this question in a similar way to how the tut was done, that is to input the function and then find the 2nd derivative, which is:
    156a/r^14 - 42b/r^8

    and that is as far as i can get, i would appreciate any help!
    Get the value of r at the stationary points by solving

    1st derivative of U with respect to r = 0.

    Use the second derivative test to determine the nature of these solutions:

    Substitute each solution to 1st derivative = 0 into the 2nd derivative and see whether the result is greater than zero or less than zero.

    This will depend on the value of A and B but if you can assume that A > 0 and B > 0 then it's clear cut.

    I'll leave it to you to write the appropriate code.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Siddy View Post
    Hi, i have an assignment of 2 questions - both of which i cant do. Im asking for help for the first question to try and get the ball rolling as i have no idea...


    We are given a formula, its just something random from a science book:

    U(r) = A/r^12 - B/r^6

    Where A and B are constants and r is the distance separating atoms (not important information). It doesnt say what U is, im assuming its like f(x) but U(r)...


    i) Calculate r = rs, such that U(rs) is a minimum
    (the "rs" is r(subscript)s).

    Now, we are using the program mathematica to do this assignment, and i have attempted this question in a similar way to how the tut was done, that is to input the function and then find the 2nd derivative, which is:
    156a/r^14 - 42b/r^8

    and that is as far as i can get, i would appreciate any help!
    It's a long time since I used Mathematica so I don't recall the syntax, but you need to do something like:

    You need to define a function

    U(r):=A/r^12 - B/r^6

    then another function containing the derivative:

    dU(r):=diff(U(r),r)

    then solve the equation dU(r)=0, something like:

    solve(dU(r)=0,r)

    I believe this will have only one positive real solution (the negative and complex solutions are non-physical and so we can ignore them). This is a local maximum or minimum (or possibly a point of inflelection) depending on the values of A and B.

    RonL
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by Siddy View Post
    [snip]
    r is the distance separating atoms (not important information).
    [snip]
    Quote Originally Posted by CaptainBlack View Post
    [snip]I believe this will have only one positive real solution (the negative and complex solutions are non-physical and so we can ignore them).

    RonL
    Not important information .....

    (There's a moral to the story somewhere here ....)
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by mr fantastic View Post
    Not important information .....

    (There's a moral to the story somewhere here ....)
    The question is who decided that the domain of U was unimportant, and was that what was meant rather than that the origin of the problem was unimportant.

    RonL
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Junior Member
    Joined
    Aug 2008
    Posts
    26
    Thanks for the help guys,

    Mr Frantic, this is what i have done so far based on what you said:


    Now im up to "Substitute each solution to 1st derivative = 0 into the 2nd derivative and see whether the result is greater than zero or less than zero."
    Could you explain this a little? What is each solution? Is it the individual groups in the brackets? And where in the f'' do they go?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by Siddy View Post
    Thanks for the help guys,

    Mr Frantic, this is what i have done so far based on what you said:


    Now im up to "Substitute each solution to 1st derivative = 0 into the 2nd derivative and see whether the result is greater than zero or less than zero."
    Could you explain this a little? What is each solution? Is it the individual groups in the brackets? And where in the f'' do they go?
    The solutions are the values of r given in Out[10]. You substitute these values of r into the expression given in Out[11].

    You should make sure you're familiar with the double derivative test and what it tells you.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member
    Joined
    Aug 2008
    Posts
    26
    Quote Originally Posted by mr fantastic View Post
    The solutions are the values of r given in Out[10]. You substitute these values of r into the expression given in Out[11].

    You should make sure you're familiar with the double derivative test and what it tells you.
    Thanks again,
    Out of the 6 solutions only the first two are real, so i am ignoring the last four.

    Now, i did exactly what you said, sub'ed in the solutions from Out[10] into Out[11] but i get the SAME answer for both!!!! I know the minimum i am looking for should be > 1 but both answers are > 1.

    Follow Math Help Forum on Facebook and Google+

  9. #9
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,589
    Thanks
    1445
    Quote Originally Posted by Siddy View Post
    Thanks again,
    Out of the 6 solutions only the first two are real, so i am ignoring the last four.

    Now, i did exactly what you said, sub'ed in the solutions from Out[10] into Out[11] but i get the SAME answer for both!!!! I know the minimum i am looking for should be > 1 but both answers are > 1.

    If they're both local maxima, just find out which one is greater (substitute into the original function).

    But I have a feeling you've made a mistake with the second derivative test.

    If the second derivative > 0 at the critical point, you have a minimum.

    If the second derivative = 0 at the critical point, you may or may not have a stationary point of inflexion.

    If the second derivative < 0 at the critical point, you have a maximum.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Junior Member
    Joined
    Aug 2008
    Posts
    26
    Ok, so i sub'ed into the original equation and i get the same answer for both again!

    Here is a complete explanation of what i have done and in RED i wrote the thought process based on your guys input and what i looked up about 2nd derivative test:

    Last edited by Siddy; August 15th 2008 at 07:31 PM. Reason: reduced image size
    Follow Math Help Forum on Facebook and Google+

  11. #11
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,589
    Thanks
    1445
    Quote Originally Posted by Siddy View Post
    Ok, so i sub'ed into the original equation and i get the same answer for both again!

    Here is a complete explanation of what i have done and in RED i wrote the thought process based on your guys input and what i looked up about 2nd derivative test:

    Actually, look at your question again, it's asking you to find the minima, not the maxima.

    You've done everything right, and have proven that the stationary points are minima because the second derivative is positive at the critical points.

    So the question is finished
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Siddy View Post
    Ok, so i sub'ed into the original equation and i get the same answer for both again!

    Here is a complete explanation of what i have done and in RED i wrote the thought process based on your guys input and what i looked up about 2nd derivative test:


    That is because the original function is symmetic, they are mirror images of one another and both minima (or maxima), and U takes the same value at both.

    (have you declared a and b to be positive?)

    RonL
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Junior Member
    Joined
    Aug 2008
    Posts
    26
    for 2 days ive been racking my brain over why i get the same answers, i cant believe i was actually doing it right...

    Can i ask, as the original question does, "Calculate rs when U(rs) is a min", do i write "rs equals both (14.12a^1/6)/b^1/2 and -(14.12a^1/6)/b^1/2 (because function is symmetrical)

    and, "Calculate Ds = -U(rs)", do i write "Ds = -(0.25b^2/a)"


    (nb. those solutions are from my image above)
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by Siddy View Post
    for 2 days ive been racking my brain over why i get the same answers, i cant believe i was actually doing it right...

    Can i ask, as the original question does, "Calculate rs when U(rs) is a min", do i write "rs equals both (14.12a^1/6)/b^1/2 and -(14.12a^1/6)/b^1/2 (because function is symmetrical)

    and, "Calculate Ds = -U(rs)", do i write "Ds = -(0.25b^2/a)"


    (nb. those solutions are from my image above)
    Yes (assuming a and b are positive).

    By the way, if you plot a graph of U versus r (substitute some positive values for a and b) its very clear what's going on.
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Junior Member
    Joined
    Aug 2008
    Posts
    26
    Thanks for the confirmation frantic.

    Yes, i would have loved to graph the function before i started then i would have known what i was dealing with - but i cant because i cant factories it so i cant set x values!
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. Integrals in computers
    Posted in the Math Software Forum
    Replies: 10
    Last Post: January 17th 2011, 04:36 AM
  2. Four color theorem and computers
    Posted in the Math Software Forum
    Replies: 1
    Last Post: November 21st 2010, 10:31 PM
  3. Computers problem
    Posted in the Advanced Applied Math Forum
    Replies: 0
    Last Post: July 28th 2008, 11:20 AM
  4. Finance Charges and Computers! Help!
    Posted in the Algebra Forum
    Replies: 1
    Last Post: March 7th 2008, 08:16 AM
  5. [SOLVED] computers sweepstakes
    Posted in the Algebra Forum
    Replies: 1
    Last Post: September 22nd 2005, 10:25 PM

Search Tags


/mathhelpforum @mathhelpforum