4
$\begingroup$

I tried plotting the function shown below in Mathematica; however the plot showed nothing. Could you help me explain it?

Note that here D' = 1- x.

enter image description here

ClearAll[a, x]; 
parameters = {0, 0.01, 0.02, 0.05, 0.1}; 
Plot[(1/((1 - x)*(1 + a/(1 - x)^2))) /@ parameters, {x, 0, 1}, 
  PlotRange -> {{0, 1}, {0, 5}}]

enter image description here

$\endgroup$
11
$\begingroup$

There are a number of ways to do this, e.g.:

f[a_, x_] := 1/((1 - x) (1 + a/(1 - x)^2))
parameters = {0, 0.01, 0.02, 0.05, 0.1};
Plot[Evaluate[f[#, x] & /@ parameters], {x, 0, 1}, 
 PlotRange -> {0, 5}, 
 PlotLegends -> 
  Table[Row[{"\!\(\*SubscriptBox[\(R\), \(L\)]\)/R=", j}], {j, 
    parameters}]]

enter image description here

or using Table:

Plot[Evaluate[Table[f[j, x], {j, parameters}], {x, 0, 1}]]
$\endgroup$

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.