0
$\begingroup$

I have been asked to produce a "parametric log-log plot of s=f(y) as a function of t=g(y), where

f[y_] = y (2 y^2 - 5) (y^2 - 1)^{1/2} + 3 Log[y + (y^2 - 1)^{1/2}]
g[y_] = y (2 y^2 - 1) (y^2 - 1)^{1/2} - Log[y + (y^2 - 1)^{1/2}]

for y in [1,2]. I have also been asked to "display the points (t,s)=(g(y),f(y)) in Magenta".

If I have understood the question correctly, with lots of efforts, and assuming I did it correctly, I produced the following code which returned me the graph:

s[y_] = y (2 y^2 - 5) (y^2 - 1)^{1/2} + 3 Log[y + (y^2 - 1)^{1/2}]
t[y_] = y (2 y^2 - 1) (y^2 - 1)^{1/2} - Log[y + (y^2 - 1)^{1/2}]
LogLogPlot[{s[y], t[y]}, {y, 1, 2}, PlotLabels -> "Expressions", 
 PlotRange -> All, Mesh -> {{0}}, MeshStyle -> Magenta]

enter image description here

Now I think the ending question is asking me to change the color of the intersection to Magenta?

So adding

MeshFunctions -> {t[#] - s[#] &}

gives me some errors that "LogLogPlot::invmeshf: MeshFunctions->{t[#1]-s[#1]&} must be a pure function or a list of pure functions".

Can someone please tell me if I have understood the question correctly and if so, how do I change the color of the intersection to Magenta.

Many Thanks

$\endgroup$
1
$\begingroup$
Clear["Global`*"]

f[y_] = y (2 y^2 - 5) (y^2 - 1)^(1/2) + 3 Log[y + (y^2 - 1)^(1/2)];

g[y_] = y (2 y^2 - 1) (y^2 - 1)^(1/2) - Log[y + (y^2 - 1)^(1/2)];

Reduce[f[y] == g[y], y, Reals]

(* y == 1 *)

f[1] == g[1] == 0

(* True *)

ParametricPlot[{g[y], f[y]}, {y, 1 + 10^-6, 2},
 PlotRange -> {{Automatic, Log[g[2]]}, {Automatic, Log[f[2]]}}, 
 ScalingFunctions -> {"Log", "Log"},
 Frame -> True,
 FrameLabel -> (Style[#, 12, Bold] & /@
    {"g(y)", "f(y)"}),
 ColorFunction -> (ColorData["Rainbow"][#3] &),
 PlotLegends -> BarLegend[{"Rainbow", {1, 2}},
   LegendLabel -> "y"]]

enter image description here

$\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.