I am quite new in Mathematica and I am trying to plot a linear term of a particular function in Mathematica. I have tried something like this:

TD = 200
Debye[x_] := 3 (x/TD)^3 NIntegrate[y^3/(Exp[y] - 1), {y, 0, TD/x}]
Fa[x_] := 8.6173324*10^(-5) x (9 *TD/(8 x) + 3 Log[1 - Exp[-TD/x]] - 
Series[Fa[x], {x, 0, 1}]

Actually I want to plot Fa[x] with the linear term expansion. It shows some error called

"NIntegrate::nlim: "y = 200./t is not a valid limit of integration"

However If I just simply plot Fa[x] (without the series syntax), it works. It seems I am missing something regarding the Series syntax. Could anyone please help me out?

  • $\begingroup$ Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – user9660 Feb 1 '16 at 14:22
  • $\begingroup$ According to the documentation, you should use Normal[] to make the expression returned by Series[] work. $\endgroup$ – egwene sedai Feb 1 '16 at 14:50
  • $\begingroup$ Can you please bit specify, I mean where to place that 'Normal[]' command? I tried it but probably I don't know where to write and then how to plot. Could you please write the explicit plot syntax including series command? $\endgroup$ – baban Feb 1 '16 at 14:52
  • $\begingroup$ I could be wrong but I think Series[] needs a symbolic expression and here you have a numeric one. I think Debye[] has a closed analytic expression, and you can work from there $\endgroup$ – egwene sedai Feb 1 '16 at 14:56
  • $\begingroup$ I'd recommend two changes. (1) Define Debye as a function that only handles explicitly numeric input. This is done as Debye[x_?NumberQ]:=.... (2) Make ser into a function also restricted to explicit numeric input (and use Normal, as was already noted by @egwenesedai): ser[x_?NumberQ] := Normal[Series[Fa[y], {y, 0, 1}]] /. y -> x. First remember to clear the prior definitions: Clear[Debye,ser]. $\endgroup$ – Daniel Lichtblau Feb 1 '16 at 15:39
TD = 200;
Debye[x_] := 
 3 (x/TD)^3 Integrate[y^3/(Exp[y] - 1), {y, 0, TD/x}, Assumptions -> x > 0]
Fa[x_] := 8.6173324*10^(-5) x (9*TD/(8 x) + 3 Log[1 - Exp[-TD/x]] - Debye[x])
ser = Series[Fa[x], {x, 0, 1}] // Normal

 (* 0.00025852 x Log[1 - E^(-200/x)]*)

Plot[ser, {x, 1, 100}]

enter image description here

  • $\begingroup$ Wow!! Many thanks @rewi. Your answer just solved what I exactly was looking for. Thank you so much! $\endgroup$ – baban Feb 1 '16 at 15:51
  • $\begingroup$ you're welcome! $\endgroup$ – user36273 Feb 1 '16 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.