Density Parameters using Mathematica

In summary, Homework Statement asks for help with solving equations and plotting solutions. The equations are for equation (1) and equation (3), where the first equation is to be solved for two omegas, whilst the second equation is to be solved for the omegas and the function r_e.
  • #1
Rick88
114
0

Homework Statement


hello, I have to solve a couple of equations on Mathematica for a project, and since they are not really working out, I wondered if you could help me out a bit.

I need to solve equation (1) (you can find the equations in the .doc attached) and plot the solution for a range of values of two omegas.
The omegas are related by the fact that the sum of all the omegas is always 1, so what we usually did in class was to assume was of them was 1 and the other 0, and we got something similar to equation (2).
Now I need to solve the equation with two non-zero gammas. So say, "NR" a "n".
The solution to the equation in my mathematica notebook doesn't seem right at all as it is lines long, and I'm supposed to write it down.
And the plot is quite unusual. It's discontinuos and stops at z=1 when it should be 0<z<10.

The second equation/plot are for equation (3). The plot looks reasonable, but it should look like the thick line in the image linked below
http://iopscience.iop.org/0004-637X/659/1/98/65868.fg6.html .
(The subscript "M" corresponds to our "NR")

I'm quite at a loss because it seemed a simple enough thing to do and the code looks alright, but I guess it's not.

Help! :)
 

Attachments

  • dominations.nb
    18.9 KB · Views: 234
  • eqs-.doc
    93 KB · Views: 191
Physics news on Phys.org
  • #2
I can't speak for others, but I'd have a much easier time trying to help you out if I didn't have to open up a separate file just to see the problem. So you'll probably get quicker answers if you copy the relevant equations or whatever from the .doc file to your post.
 
  • #3
Ok, thanks for your suggestion.


Right, I need to solve equations (1) and (3) for two omegas only. That is, two of the omegas would be zero, whilst the other non-zero.
r2iwjp.jpg

And the sum of the omegas must always be 1.

What I've written so far in Mathematica is:
sol = NSolve[r2[z] == Integrate[(0.1*(1 + z)^3 + 0.9)^-0.5, z], r2[z]]

Plot[r2[z] /. sol, {z, 0, 10}, PlotRange -> {0, 10},
AxesLabel -> {z, Subscript[r, e]}]

sol1 = NSolve[
m[z] == 5 Log[(1 + z)*
NIntegrate[(0.27*(1 + z)^3 + 0.73)^-0.5, {z, 0, 10}] + 25 -
19.6], m[z]]

Plot[m[z] /. sol1, {z, 0, 10}, PlotRange -> {0, 20},
AxesLabel -> {z, m}]
 
  • #4
Are you supposed to solve for the omegas, or are you supposed to solve for [itex]r_e[/itex]? Are the omegas constants or are they functions of [itex]1 + z[/itex]? What about [itex]r_e[/itex], is that a function of z?
 
  • #5
I'm supposed to solve for re for different values of the omegas.
so say 0.2, 0.8; 0.5, 0.5 and so on.
And the omegas are constant.
 
  • #6
In that case, I don't think there's any reason to use NSolve. You can just define r2 as a function of z,
Code:
r2[z_] := Integrate[..., {z,0,z}]
 

1. What is the purpose of using Mathematica for density parameters?

The purpose of using Mathematica for density parameters is to efficiently calculate and manipulate various mathematical and statistical functions related to density, such as finding the probability density function, cumulative density function, and mean and standard deviation of a distribution.

2. How do I input data into Mathematica to calculate density parameters?

Data can be inputted into Mathematica using the data = {x1, x2, x3, ...} syntax, where x1, x2, x3, ... are the values of your data. Alternatively, you can also use the Import function to import data from a file or external source.

3. Can Mathematica handle large datasets for calculating density parameters?

Yes, Mathematica is capable of handling large datasets for calculating density parameters. It has efficient algorithms and parallel computing capabilities that allow for faster processing of large amounts of data.

4. How can I visualize the density parameters calculated in Mathematica?

You can use various built-in visualization functions in Mathematica, such as Histogram, BarChart, and SmoothHistogram, to visualize the density parameters. Additionally, you can also use the Plot function to plot the probability density function of a distribution.

5. Are there any resources available for learning how to use Mathematica for density parameters?

Yes, there are various resources available for learning how to use Mathematica for density parameters. These include the official Mathematica documentation, online tutorials and videos, and community forums where users can share their knowledge and experiences with using Mathematica.

Similar threads

  • Advanced Physics Homework Help
Replies
5
Views
756
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
246
  • Advanced Physics Homework Help
Replies
1
Views
2K
  • Advanced Physics Homework Help
Replies
0
Views
439
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Electrical Engineering
Replies
9
Views
1K
Back
Top