Message Boards Message Boards

0
|
3190 Views
|
9 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Plot gives no output?

Posted 3 years ago

I have the below mentioned plot issue in mathematics. Every thing is written perfectly but cant plot it. enter image description here

enter coderm = (( 1 + 2 \[Nu] ) Rg)/2;
bc = Sqrt[rm^2 (1 - Rg/rm)^(1 - 2 \[Nu])];

\!\(\*OverscriptBox[
StyleBox["a",
FontSize->12], \(_\)]\) = Sqrt[(2 rm)/((5 - 2 \[Nu]) Rg)];

\!\(\*OverscriptBox[\(b\), \(_\)]\) = 
  Sqrt[(2  rm  )/(
    Subscript[R, g] (5 - 2 \[Nu])  )] ( 
     Log[(16 rm (5 - 2 \[Nu])^2)/((-1 + 2 \[Nu]) Rg) ((4 - 2 \[Nu]) - 
         Sqrt[(3 - 2 \[Nu]) (5 - 2 \[Nu])])^2]) - \[Pi];
Rg = 2 M;
\[Theta] = bc/\[ScriptCapitalD]LS (1 + E^((
\!\(\*OverscriptBox[\(b\), \(_\)]\) - \[Pi] + \[Beta])/
\!\(\*OverscriptBox[
StyleBox["a",
FontSize->12], \(_\)]\))) (180*3600)/\[Pi]*10^6;
\[Beta]s = Rs/\[ScriptCapitalD]LS;

 Rs = 6.96*10^8; \[Beta]0 = 1 \[Beta]s; M = 
 10 (1476); \[ScriptCapitalD]OS = 1.496*10^11; \[ScriptCapitalD]LS = 
 3.08567758*10^14 + 1.496*10^11;
\[ScriptCapitalD]OL = 3.08567758*10^14; \[Nu] = 1;
k = Plot[Log10[\[Theta]], {\[Beta], -10, 10}, PlotRange -> All, 
  Frame -> True, Axes -> False, PlotStyle -> {Red}] here
POSTED BY: nani khan
9 Replies
Posted 3 years ago

Thank you for reconsidering my request and helping me out.

POSTED BY: nani khan

Your latest code has no syntax error, but it may not correspond to the formulas in your book.

POSTED BY: Gianluca Gorni
Posted 3 years ago

Thank you Sir for your reply and comments. Regards.

POSTED BY: nani khan
Posted 3 years ago

enter image description here

POSTED BY: nani khan
Posted 3 years ago

Thank you Sir for your reponse. I have now tried to change the syntax. May be they will no be error free. Also, I have attaced a .png to have a better look of my codes. Kindly check them. Regards

rm = (( 1 + 2 n ) Rg)/2;
bc = Sqrt[rm^2 (1 - Rg/rm)^(1 - 2 n)];
A = Sqrt[(2 rm)/((5 - 2 n) Rg)];
B = Sqrt[(2  rm  )/(
    Rg (5 - 2 n)  )] ( 
     Log[(16 rm (5 - 2 n)^2)/((-1 + 2 n) Rg) ((4 - 2 n) - 
         Sqrt[(3 - 2 n) (5 - 2 n)])^2]) - \[Pi];
Rg = 2 M;
\[Theta] = 
  bc/DLS (1 + E^((B - \[Pi] + \[Beta])/A)) (180*3600)/\[Pi]*10^6;
\[Beta]s = Rs/DLS;

 Rs = 6.96*10^8; \[Beta]0 = 1 \[Beta]s; M = 10 (1476); DOS = 
 1.496*10^11; DLS = 3.08567758*10^14 + 1.496*10^11;
DOL = 3.08567758*10^14; n = 1;
k = Plot[Log[10, \[Theta]], {\[Beta], -10, 10}, PlotRange -> All, 
  Frame -> True, Axes -> False, PlotStyle -> {Red}]
POSTED BY: nani khan
Posted 3 years ago

There are several issues with the code.

This is not valid syntax

enter coderm = (( 1 + 2 \[Nu] ) Rg)/2

Rg is not the same as Subscript[R, g].

rm is not defined.

POSTED BY: Rohit Namjoshi

Check your formulas for mistakes.

POSTED BY: Gianluca Gorni
Posted 3 years ago

Thank you Sir for your response, but it's still not working. The graph I am getting is attached: enter image description here

rm = (( 1 + 2 \[Nu] ) Rg)/2;
bc = Sqrt[rm^2 (1 - Rg/rm)^(1 - 2 \[Nu])];

\!\(\*OverscriptBox[
StyleBox["a",
FontSize->12], \(_\)]\) = Sqrt[(2 rm)/((5 - 2 \[Nu]) Rg)];

\!\(\*OverscriptBox[\(b\), \(_\)]\) = 
  Sqrt[(2  rm  )/(
    Rg (5 - 2 \[Nu])  )] ( 
     Log[(16 rm (5 - 2 \[Nu])^2)/((-1 + 2 \[Nu]) Rg) ((4 - 2 \[Nu]) - 
         Sqrt[(3 - 2 \[Nu]) (5 - 2 \[Nu])])^2]) - \[Pi];
Rg = 2 M;
\[Theta] = bc/\[ScriptCapitalD]LS (1 + E^((
\!\(\*OverscriptBox[\(b\), \(_\)]\) - \[Pi] + \[Beta])/
\!\(\*OverscriptBox[
StyleBox["a",
FontSize->12], \(_\)]\))) (180*3600)/\[Pi]*10^6;
\[Beta]s = Rs/\[ScriptCapitalD]LS;

 Rs = 6.96*10^8; \[Beta]0 = 0 \[Beta]s; M = 
 10 (1476); \[ScriptCapitalD]OS = 1.496*10^11; \[ScriptCapitalD]LS = 
 3.08567758*10^14 + 1.496*10^11;
\[ScriptCapitalD]OL = 3.08567758*10^14; \[Nu] = 1;
k = Plot[Log[10, \[Theta]], {\[Beta], -10, 10}, PlotRange -> All, 
  Frame -> True, Axes -> False, PlotStyle -> {Red}]
POSTED BY: nani khan

You must give a value to rm, Rg and decide if Rg is the same as the subscripted version. It is not Log10[\[Theta] but Log[10,\[Theta]].

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract