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.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityI 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.
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.
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$
ParametricPlot[{NIntegrate[1/Surd[2 t (1 - Log[t]), 2], {t, 1, y}], y}, {y, 1, E}]
$\endgroup$