Message Boards Message Boards

6 Replies
2 Total Likes
View groups...
Share this post:

Taking a limit inside a function and graphing it

Posted 11 years ago
Hello, thank you for your time.

I am trying to graph the following function:
f[x_] := 1/(Exp[(x-u)/(k*T)]+1);

I tried doing the above while setting T=0, but quickly learned that wouldn't work.   So I tried the following:
f[x_] := 1/(Limit[Exp[(x-u)/(k*T)],T->0]+1);
Then I tried to use the same plot.  This gave me no errors but now unfortunately nothing is showing up on my graph.  It should look like a step-function, where f(x) = 1 until x=u, then at that point f(x)=0 the rest of the way.

Any help is appreciated, thank you!
6 Replies
Need numerical values for u, k, T to plot a function of x. Possibly introduce ranges of values using Manipulate, In Plot, should have f not f[x_]. Sometimes missing plot region can be revealed by adding PlotRange->All.
POSTED BY: S M Blinder
Hi thanks for the response.  I do have values for these constants. u=5, k=10^(-5), but T is approaching zero.
Posted 11 years ago
In[1]:= u = 5;
k = 10^-5;
f[x_] := 1/(Limit[Exp[(x - u)/(k*T)], T -> 0] + 1);
Plot[f[x], {x, 0, 10}, AxesOrigin -> {0, -.1}]

Out[4]= ...PlotSnipped...
POSTED BY: Bill Simpson
Bill, thank you so much for the sample!  Maybe I am doing something wrong, but it is still not working.  Here is the entirety of the code:
When I compile, nothing shows up on the graph
AHA got it! Its because I was using Plot[f[x_]]... I should have been using Plot[f]

Thanks everyone!

I do have one more question.  What If I want to use
Will this work?  Because I am trying just that and it doesnt seem to be working
I actually got it working. I had to make f a function of x and T, like this:
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract