Mathematica problem involving integral

In summary, the hint says to use NIntegrate to plot C_v/3Nk as a function of T/ \theta from 0.001 to 1.4.
  • #1
issacnewton
1,026
36
Hi

We know that in Debye theory,

[tex]C_v=9kN\left(\frac{T}{\theta}\right)^3 \int_0^{\theta/T} \frac{x^4 e^x}{(e^x-1)^2}\;dx[/tex]

is the heat capacity of the solid. I want to plot [itex]C_v/3Nk[/itex] as a function of [itex]T/ \theta[/itex] from 0.001 to 1.4 using mathematica. The hint says to use NIntegrate. Now should I first create a vector of values of [itex]T/ \theta[/itex] from 0.001 to 1.4 using "Table" ? Then maybe I can feed this vector to NIntegrate which could be placed inside another "Table"
statement.

any help ?
 
Technology news on Phys.org
  • #2
No need for a table. Just create a function that does what you want and plot it, like the attached notebook.
 

Attachments

  • Debye.nb
    6.3 KB · Views: 388
  • #3
thanks, I tried to do something like that, but since the upper limit of the integration is
a variable itself, NIntegrate tried to give warning and didn't seem to give correct answer
 
  • #4
Post what you did and we can probably figure out why.
Note that if you ask for immediate evaluation (=), and the limit of NIntegrate is a variable, then it can't evaluate and will give you an error. That's why I asked for delayed evaluation(:=), so it doesn't try to evaluate NIntegrate until after it has been supplied with a numeric limit. In this case, it doesn't even try to evaluate NIntegrate until it is making the plot and Plot has supplied it with a number to integrate up to.
 
  • #5
You nailed it... that was the problem... mathematica is very easy once we become familiar with it...

I read on their website that they are coming up with cloud services... In that case, people don't have to worry about the slower processing time of mathematica as compared to say, Fortran...since cloud servers are very powerful...
 
  • #6
Yes, Mathematica definitely has a learning curve, but it is very powerful once you become familiar with it.
 
  • #7
do you think it will be possible send mathematica notebooks to cloud computers for evaluation since ordinary computers don't have memory sometimes. mathematica simplifies the work of a physicist to a great extent. if you are programming in say fortran, then lot of time is spent in thinking about the programming issues.
 

FAQ: Mathematica problem involving integral

1. What is Mathematica and what can it do?

Mathematica is a computational software program used for mathematical, scientific, and engineering calculations. It can perform a wide range of tasks, including solving equations, generating graphs and visualizations, performing symbolic and numerical calculations, and integrating functions.

2. How do I input an integral into Mathematica?

To input an integral into Mathematica, you can use the "Integrate" function followed by the function or expression you want to integrate and the variable of integration. For example, to integrate the function x^2 from 0 to 5, you would enter "Integrate[x^2, {x, 0, 5}]".

3. Can Mathematica solve all types of integrals?

While Mathematica is capable of solving a wide range of integrals, there are some types of integrals that it may not be able to solve. In these cases, Mathematica will return the integral in its unsolved form.

4. How do I plot the graph of an integral in Mathematica?

To plot the graph of an integral in Mathematica, you can use the "Plot" function and input the integral as the function to be plotted. You can also specify the range of the variable of integration if desired. For example, "Plot[Integrate[x^2, {x, 0, a}], {a, 0, 5}]" will plot the graph of the integral of x^2 from 0 to a, with a ranging from 0 to 5.

5. Can Mathematica show the steps involved in solving an integral?

Yes, Mathematica has a function called "Trace" that can show the steps involved in solving an integral. You can use it by inputting "Trace[Integrate[x^2, x]]", and Mathematica will show the series of steps it takes to solve the integral of x^2 with respect to x.

Similar threads

Replies
1
Views
732
Replies
1
Views
1K
Replies
1
Views
843
Replies
2
Views
1K
Replies
1
Views
4K
Replies
6
Views
6K
Replies
2
Views
888
Back
Top