i need some help using LogLogPlot for graphing an equation that has various values of a parameter so that I get a set of curves on the plot. The equation is as follows:

(1/L^.5) + 2 Log10[(2.51/re L^.5)+.27/(d/k)]==0

re ranges from 4x10^3 to 10^7 and d/k takes on values of 50,200,1000,5000,100000.

So I should have 5 curves on my plot of Log10[L] vs Log10[re].

I'm not sure how to set this up in Mathematica.

  • $\begingroup$ How far did you get? $\endgroup$ – Johu Jun 24 '16 at 7:35
  • $\begingroup$ Are you sure the form is right? This equation has no solution. $\endgroup$ – Feyre Jun 24 '16 at 8:37
  • $\begingroup$ @Feyre Solve doesn't have an issue with it. $\endgroup$ – rcollyer Jun 24 '16 at 13:16

In such cases, it is easier to do a variable transformation.

logplot[var1_, var2_, func_] := Module[{f, z1, z2, l11, l12, l21, l22}, 
 f = func /. {var1 -> 10.^z1, var2 -> 10.^z2};
 l11 = Log10[4 10^3]; l12 = Log10[10^7];
 l21 = Log10[.1]; l22 = Log10[1];
 ContourPlot[f, {z1, l11, l12}, {z2, l21, l22}, 
 FrameTicks -> {Table[{x, 10^ToString[x]}, {x, 4, 7}], 
 Table[{x, 10^ToString[x]}, {x, -1, 0, .2}], None, None}]]

logplot[re, L, (1/L^.5) + 2 Log10[(2.51/re L^.5) + .27/(5000)]]

enter image description here

You can customise the FrameTicks or FrameLabel in logplot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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