0
$\begingroup$

I would like to solve the following equation and make a log-log plot of $M$ against $\lambda$:

$$\bigg|\frac{2\lambda^{2}}{(4\pi)^{2}} \frac{m^{2}}{m_{h}^{2}} \left[\log\left(\frac{m_{h}^{2}}{m^{2}}\right) - \frac{7}{6} \right]\bigg| = 10^{-12}$$

What is wrong with the following code?

table = 
  Table[
    {Exp[M], λ /. 
       NSolve[
         (((2*(λ^2))/(4 *Pi)^(2)) *(1/Exp[2 M]) *[Log[Exp[2 M]] - (7/6)]) == 
           10^(-12), λ][[2]]}, 
    {M, -15, 15, 0.03}];

ListLogLogPlot[table]
$\endgroup$

closed as off-topic by Bob Hanlon, m_goldberg, Young, MarcoB, corey979 Feb 10 '17 at 11:17

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." – Bob Hanlon, m_goldberg, Young, MarcoB, corey979
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ In your code you use square brackets instead of parentheses for the Log term. Try this: table = Table[{Exp[M], \[Lambda] /. NSolve[0.0023193043361 - (((2*(\[Lambda]^2))/(4 *Pi)^(2)) *(1/ Exp[2 M]) *(Log[Exp[2 M]] - (7/6))) == 10^(-12), \[Lambda]][[2]]}, {M, -15, 15, 0.03}]; ListLogLogPlot[table] $\endgroup$ – Anjan Kumar Feb 10 '17 at 2:31
  • 1
    $\begingroup$ Your code doesn't correspond with the equation you presented in MathJaX. $\endgroup$ – m_goldberg Feb 10 '17 at 2:49
  • $\begingroup$ why does it not? $\endgroup$ – hottynotty Feb 10 '17 at 2:57
1
$\begingroup$
f[a_, m_] := Abs[2 a^2/(4 Pi m)^2 (Log[m^2] - 7/6)]
sol[j_] := {Exp[j], a} /. 
  NSolve[f[a, Exp[j]] == 10^-12 && a > 0, a][[1]]
tab = Table[sol[j], {j, -15, 15, 0.03}];
ListLogLogPlot[tab, Joined -> True]

enter image description here

$\endgroup$

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