1
$\begingroup$

In my previous post @herbertfederer provided a script to plot $\frac{\partial C}{\partial u}\Big|_{u=0.5}$ where $C(u,v)= \min\left[ u^{0.0325}v, uv^{-0.1018} \right]$,

c[u_, v_] := Min[u^0.0325 v, u v^-0.1018]
Plot[D[c[u, v], u] /. u -> .5 // Evaluate, {v, 0, 1}]

Here I modified the range of $v$ to $(0,1)$. Now it plots a function say $f(v)$ for the horizontal $v$ values. I need to assign $87\sqrt{-2\log(1 - v)}$ to $v$ and plot the function based on this new horizontal axis. So I tried,

c[u_, v_] := Min[u^0.0325 v, u v^-0.1018]
Plot[D[c[u, v], u] /. u -> 0.5 /. v -> (87*Sqrt[-2*Log[1 - v]]) // Evaluate, {v, 0, 0.9999}]

I choose "{v, 0, 0.9999}" in order to $\log(1-v)$ be defined. But after running the script I got errors. Can you help me to fix the issue?

$\endgroup$
4
  • $\begingroup$ Try ParametricPlot $\endgroup$ Commented Dec 16, 2023 at 8:47
  • $\begingroup$ @UlrichNeumann Can you elaborate on that? I'm new to mathematica. $\endgroup$
    – Etemon
    Commented Dec 16, 2023 at 9:09
  • $\begingroup$ Did you modify the question? I remember v->h[x]? $\endgroup$ Commented Dec 16, 2023 at 12:10
  • $\begingroup$ @UlrichNeumann Yes I realized my explanation was not accurate and found a better way to explain the problem. $\endgroup$
    – Etemon
    Commented Dec 16, 2023 at 16:56

3 Answers 3

1
$\begingroup$
$Version

(* "14.0.0 for Mac OS X x86 (64-bit) (December 13, 2023)" *)

c[u_, v_] := Min[u^0.0325  v, u  v^-0.1018]

Using ParametricPlot as suggested by Ulrich Neumann

ParametricPlot[{(87*Sqrt[-2*Log[1 - v]]), Derivative[1, 0][c][0.5, v]}, 
  {v, 0, 1},
 AspectRatio -> 1/GoldenRatio,
 ColorFunction -> (ColorData["Rainbow"][#3] &),
 PlotLegends -> BarLegend[{"Rainbow", {0, 1}},
   LegendLabel -> Style[v, 14],
   LegendMarkerSize -> 220],
 Frame -> True,
 FrameLabel -> (Style[#, 14] & /@ {(87*Sqrt[-2*Log[1 - v]]),
     HoldForm[Derivative[1, 0][c][0.5, v]]})]

enter image description here

$\endgroup$
0
$\begingroup$

The new v looks like:

Plot[-87*Sqrt[-2*Log[1 - v]], {v, 0, 0.9999}]

enter image description here

Now rise this to the power of : -0.1018:

Table[(-87*Sqrt[-2*Log[1 - v]])^-0.1018, {v, 0, 0.9, 0.1}]

{ComplexInfinity, 0.6522 - 0.215998 I, 0.627758 - 0.207903 I, 
 0.612949 - 0.202998 I, 0.601844 - 0.199321 I, 0.592567 - 0.196248 I, 
 0.584208 - 0.19348 I, 0.576145 - 0.19081 I, 0.567696 - 0.188011 I, 
 0.55744 - 0.184615 I}

You see that the new v is complex.

$\endgroup$
4
  • $\begingroup$ Sorry, I realized I wrongly put an extra minus sign in the expression. It should be 87*Sqrt[-2*Log[1 - v]]. Thanks for detecting it. $\endgroup$
    – Etemon
    Commented Dec 16, 2023 at 17:04
  • $\begingroup$ For example assume the map of $v=0.4$ with above function is 90 and assume the original graph of partial derivative gives $f(0.4)= 0.3$ I'm looking for a plot that gives $f(90)=0.3$. And this pattern holds for other value of $v\in[0,1)$. And I want to scale only horizontal axis by the pre-defined function. $\endgroup$
    – Etemon
    Commented Dec 16, 2023 at 17:32
  • $\begingroup$ I am a bit confused because you have 2 variables: u, v. Are you looking for: f'( Inverse(f)(x)) ? $\endgroup$ Commented Dec 16, 2023 at 19:11
  • $\begingroup$ The variable u in the original function C(u,v) is only used for partial derivative and then plugging a specific u, i.e $\large\frac{\partial C}{\partial u}\Big|_{u=0.5}$ And this gives a function based on only the variable v. Now I want to transform the horizontal axis of the plot of this function the way I stated in my previous comment. $\endgroup$
    – Etemon
    Commented Dec 16, 2023 at 21:19
0
$\begingroup$

From your comment, I take it that you are looking for: f'( Inverse(f)(x) ).

Lets set u=0.1. Then the derivative is is defined for x>0. However, the inverse function creates a problem. Look at:

Plot[c[0.1, x], {x, 0, 1}, PlotRange -> All]

enter image description here

The inverse function c takes the values between 0.145 and 0.1 twice. Therefore, it it is not unique, but double valued. Therefore, you have to restrict the definition range to make the function single valued..

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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