# Thread: Calculus for computers question

1. Originally Posted by Siddy
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!
Surely you could draw the graph using mathematica?!

2. well, to plot in mathematica you need to set max and min values for the x axis. I cant factorise it so i dont know what to enter as the x values, and i tried i entering some x values like: -10, 20 and 10, 100, but i always get an error that it cant be graphed.

Any idea on what i can set x axis to graph this beast?

3. Originally Posted by Siddy
well, to plot in mathematica you need to set max and min values for the x axis. I cant factorise it so i dont know what to enter as the x values, and i tried i entering some x values like: -10, 20 and 10, 100, but i always get an error that it cant be graphed.

Any idea on what i can set x axis to graph this beast?
I don't know why you'd get an error. There should be no problem graphing it (you do realise there's a vertical asymptote at r = 0 .....?). Have you tried using a humble graphics calculator if you're having trouble graphing it with Mathematica? Setting useful windows is often trial and error if you have little idea what the graph looks like. It can be more an art than a science.

4. No, i had no idea there is an asymptote at x=0, so i tried graphing it from x=-10 to x=-1 (to avoid the asymptote if thats whats causing the problem with mathematica), but it still doesnt work. I found the explanation of the error, it says "Error messages are generated in this example because the symbolic parameters in the function to be plotted do not have numerical values."

So there can not be numerical values for the graph, i dont know how to get around that. I dont have a graphics calculator and im a scientist (chemist) maybe thats why im so bad at these questions...

5. Originally Posted by Siddy
No, i had no idea there is an asymptote at x=0, so i tried graphing it from x=-10 to x=-1 (to avoid the asymptote if thats whats causing the problem with mathematica), but it still doesnt work. I found the explanation of the error, it says "Error messages are generated in this example because the symbolic parameters in the function to be plotted do not have numerical values."

So there can not be numerical values for the graph, i dont know how to get around that. I dont have a graphics calculator and im a scientist (chemist) maybe thats why im so bad at these questions...
Did you give a positive value to a and b (as I advised) before trying to graph the equation?

Originally Posted by mr fantastic
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.

6. i tried replacing A an B with numbers like 1 and 5 but it still has the same error, is that what i was supposed to do?

7. The next question says:
"Express A and B in terms of rs and Ds"
How can i do that when i defined rs to be 2 different things?

8. Originally Posted by Siddy
i tried replacing A an B with numbers like 1 and 5 but it still has the same error, is that what i was supposed to do?
I don't know why you're getting an error. Perhaps you need to check the documentation on how to plot a graph in Mathematica.

Originally Posted by Siddy
The next question says:
"Express A and B in terms of rs and Ds"
How can i do that when i defined rs to be 2 different things?
Perhaps, as CaptainB suggested, there's a restriction that r > 0? Since U = U(r) is probably modelling something like the Van der Waals potential energy (you're the chemist, put your thinking cap on).

9. Originally Posted by mr fantastic
I don't know why you're getting an error. Perhaps you need to check the documentation on how to plot a graph in Mathematica.

Perhaps, as CaptainB suggested, there's a restriction that r > 0? Since U = U(r) is probably modelling something like the Van der Waals potential energy (you're the chemist, put your thinking cap on).
With Mathematica you are allways going to have problems ploting a function with a point where the function goes to infinity in the plot range. Try plotting from r=1 to whatever with A>B>0.

RonL

Page 2 of 2 First 12