1
$\begingroup$

I have a funciton in the following form. But I don't know how to plot it.

$$x=\int_1^{y(x)}\frac{dt}{\sqrt{2(t-t\ln t)}}.$$

For example, I want to plot it when $0<x<3$. Thanks in advance.

$\endgroup$
  • 1
    $\begingroup$ ParametricPlot[{NIntegrate[1/Surd[2 t (1 - Log[t]), 2], {t, 1, y}], y}, {y, 1, E}] $\endgroup$ – LouisB Jun 24 '17 at 9:31
  • $\begingroup$ @ LouisB, thanks, while how can we plot if we only know the range of $x$ rather than that of $y$? $\endgroup$ – jsxs Jun 24 '17 at 9:48
3
$\begingroup$

We must ask ourselves when does the integral exist? We see that when $\ln{t}>1$, we have the square root of negative number, which does not really make sense when we are talking about real variables. So, we say the integral maps y onto x when $0<y<e$. Outside of this range either the natural log or the square root fails to exist, so there is nothing to plot.

If we tell Mathematica about the range of $y$, we can get a symbolic expression.

h = Integrate[1/Surd[2 t (1 - Log[t]), 2], {t, 1, y}, 
   Assumptions -> 1 < y < E];
xmax = h /. y -> E
soln = Solve[x == h, y] // First;
Plot[y /. soln, {x, 0, xmax}]

The temptation is to go ahead and plot the "function" y/.soln on the interval $1<x<3$, but that would be wrong. We note that Solve gives us a warning that inverse functions are being used. What has happened is the inverse function introduced an extraneous root. When we evaluate NSolve[3 == h, y] we find that there is no upper limit $y$ for which our expression h is 3.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ There is InverseFunction, which can be used here. Plot[InverseFunction[ Sqrt[2 E Pi] (Erf[1/Sqrt[2]] - Erf[Sqrt[1/2 - 1/2 Log[#1]]]) &][ x], {x, 0, E}]. See e.g. Inverting a function in a certain region. $\endgroup$ – Artes Jun 24 '17 at 14:15

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.