I need to plot the survival probability for neutrino oscillations in matter, for which the formula is $P(x)=1-sin^{2}(2\alpha')sin^{2}(\frac{1}{4}ML/x)$ with $sin^{2}(2\alpha') = \frac{sin^{2}(2\alpha)}{1-2(lv/lm)Cos(2\alpha)+(lv/lm)^{2}}$ and $M=\sqrt{1-2(lv/lm)Cos(2\alpha)+(lv/lm)^{2}}$. Again, lv(x)=$2.48*x$ and $lm = \frac{1.77*10^7}{2}$. So putting in alpha = 22.5 degrees and $L = 5 x 10^6$ m, i should be able to plot probability versus x, for x in range $10^4 to 10^8$. In mathematica, I have the following code. But the graph dosent show up! Any suggestions on how to fix this?

lv[x_] := 2.48*x
lm := (1.77*10^7)/2
alpha = 22.5 Degree
m[x_] := Sqrt[1 - 2*(lv[x]/lm)*Cos[2*alpha] + (lv[x]/lm) ** 2]
a[x_] := ((Sin[2*alpha])^2)/(1 - 
2*(lv[x]/lm)*Cos[2*alpha] + (lv[x]/lm)^2)
g[x_] := 1 - a[x]*(Sin[(5*10^6*m[x])/(4*x)])^2
LogLinearPlot[g[x], {x, 10^4, 10^8}, 
PlotRange -> {{10^4, 10^8}, {0, 1}}]

(Sorry for so many formulae! I wanted to present the exact thing to figure out where I am making a mistake)


closed as off-topic by m_goldberg, Jens, Bob Hanlon, march, Michael E2 Jun 27 '17 at 18:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – m_goldberg, Jens, Bob Hanlon, march, Michael E2
If this question can be reworded to fit the rules in the help center, please edit the question.



lm := (1.77*10^7)/2
m[x_] := Sqrt[1 - 2*(lv[x]/lm)*Cos[2*alpha] + (lv[x]/lm) ** 2]


lm = (1.77 10^7)/2;
m[x_] := Sqrt[1 - 2(lv[x]/lm) Cos[2 alpha] + (lv[x]/lm)^2]

and you will get your plot. The 1st change isn't strictly needed, but it is a good idea.

  • $\begingroup$ Thanks! It works @m_goldberg $\endgroup$ – Epari shalini Jun 27 '17 at 17:04

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