1. Not finding help here? Sign up for a free 30min 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!

Plot Graphene Distribition Problem

Tags:
  1. May 20, 2014 #1
    Hi.

    According to the attached article I couldn't draw fig1 with eq1 using mathematica.
    graphene_zps35285026.jpg
     

    Attached Files:

    Last edited: May 20, 2014
  2. jcsd
  3. May 21, 2014 #2

    NascentOxygen

    User Avatar

    Staff: Mentor

    Hi vesta33. http://img96.imageshack.us/img96/5725/red5e5etimes5e5e45e5e25.gif [Broken]

    Is there a question or something you intended should accompany your post?

    Not that I will be able to help, but someone else may offer to .....
     
    Last edited by a moderator: May 6, 2017
  4. May 21, 2014 #3

    DrClaude

    User Avatar

    Staff: Mentor

    I'll bite.

    You realize that ##g(\bar\omega^2)## is defined by different equations depending on the value of ##\bar\omega^2##? And that the figure in the paper plots ##g(\bar\omega^2)## as a function of ##\bar\omega^2##, not ##\bar\omega##?
     
  5. May 21, 2014 #4
    NascentOxygen and DrClaude, thank you for answers. I plotted this without elliptic integral. But this article referred to elliptic integrals. DrClaude, I am aware of your writings but mathematica has given error mesage:
    error_zpscae5b065.jpg
     
    Last edited: May 21, 2014
  6. May 21, 2014 #5

    DrClaude

    User Avatar

    Staff: Mentor

    Instead of using w^2 in the equation for g7, define a variable w2 that corresponds to ##\bar\omega^2##.
     
  7. May 21, 2014 #6
    I had tried.
    bug_zps55e289a1.jpg
     
  8. May 21, 2014 #7

    DrClaude

    User Avatar

    Staff: Mentor

    In the argument of the elliptic integral, you're missing the cube in ##(2-3\bar\omega^2)^3##.
     
  9. May 21, 2014 #8
    You are right. But after I tried all variable ranges with correct code, nothing changed. Mathematica file is attached for anyone intersted in this plot. Thanks for help.
     

    Attached Files:

  10. May 22, 2014 #9

    DrClaude

    User Avatar

    Staff: Mentor

    You posted this in a homework forum, but am I correct in assuming that this is not homework?

    Looking at your file, you have in it
    Code (Text):

    g2 = (9/\[Pi]^2) ((1 - 2 w)/(3 w (2 - 3 w)^3)^(1/2))
           (EllipticK[(1 - 2 w)/(w (2 - 3 w)^3)])^(1/2);
    Plot[g2, {w^2, 0, 1}]
    First, the argument of the elliptic integral is incorrect. The square root should be over the argument itself, not the entire integral. Second, you need to plot with respect to w, not w^2. Third, the equation for g you have there is only valid in the range ##1/3 \leq \bar\omega^2 \leq 1/2##. Therefore, you should have
    Code (Text):

    g2 = (9/\[Pi]^2) ((1 - 2 w)/(3 w (2 - 3 w)^3)^(1/2))
          EllipticK[((1 - 2 w)/(w (2 - 3 w)^3))^(1/2)];
    Plot[g2, {w, 1/3, 1/2}]
     
     
  11. Jun 11, 2014 #10
    I should stress that I know mathematica. I had tried all possibly variaions before wrote here. If anyone wants help me please first of all run the code. I think mathematica or the article has a bug. Please nobody reply the message without running the code.
     
  12. Jun 11, 2014 #11

    DrClaude

    User Avatar

    Staff: Mentor

    I will try to be as diplomatic as possible, but your latest post has made me cross. I was guiding you towards the solution to your problem, but instead of trying what I suggested, you reply without any new attempts.

    Then you should know why the statement
    Code (Text):
    Plot[g2, {w^2, 0, 1}]
    is not valid.

    Obviously not, because you have not been able to reproduce the graph.

    I did, told you what was wrong, and even gave you a correct replacement code, which is at least valid for part of the ##\bar{\omega}## domain.

    Both are fine. I was able to reproduce the figure in a couple of minutes. Before you ask for my code, note that this is not how things are done on PF. We don't feed you fish, we help with the fishing.

    Please do not reply before taking into account the replies of others.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted