3
$\begingroup$

I’m trying to evaluate

y[t] = InverseFunction[ NIntegrate[Sqrt[2]/( -8+Exp[y]+2Exp[-y]), {y,0,t}]]

Some of the problems I’m facing, is that i’d like to get the integral’s result in terms of t as a definite integral.

Any help to get y[0], y[1] and y’[0] ?

$\endgroup$
3
$\begingroup$

Assuming the integral is not possible to evaluate symbolically, so that Roman's approach was not available, it is still possible to construct an interpolating function solution of the inverse. First, rewrite your relationship as follows:

eqn = y == Inactive[Integrate][Sqrt[2]/(-8+Exp[s]+2Exp[-s]),{s,0,t[y]}];
eqn //TeXForm

$y=\int _0^{t(y)}\frac{\sqrt{2}}{2 e^{-s}+e^s-8}ds$

where I renamed the integration variable to avoid confusion. Then, differentiating with respect to y produces an ODE:

ode = D[eqn, y];
ode //TeXForm

$1=\frac{\sqrt{2} t'(y)}{2 e^{-t(y)}+e^{t(y)}-8}$

For initial conditions, clearly t[0] == 0. So, we need to solve:

sol = NDSolveValue[{ode, t[0]==0}, t, {y, -1, 1}];

Visualization:

Plot[sol[y], {y, -1, 1}]

enter image description here

Comparison with the exact answer (as provided by Roman):

sol[0]
sol[1]
sol'[0]

0.

-1.33756

-3.53553

vs:

roman[y_] := Log[4-Sqrt[14] Tanh[Sqrt[7] y+ArcTanh[3/Sqrt[14]]]]

roman[0]
roman[1] //N
roman'[0] //N

0

-1.33756

-3.53553

$\endgroup$
8
$\begingroup$

No need to do numerical integration, you can do this one analytically.

Start with the integral:

Integrate[Sqrt[2]/(-8 + Exp[y] + 2 Exp[-y]), {y, 0, t}]
(* ConditionalExpression[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
     E^t == 4 || (-4 + E^t)^2 <= 0] *)

It turns out that this result is valid for $\ln(4-\sqrt{14})<t<\ln(4+\sqrt{14})$:

Plot[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
  {t, Log[4 - Sqrt[14]], Log[4 + Sqrt[14]]}]

enter image description here

Invert it:

Solve[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]) == y, t]

(expression that I simplify by hand to get rid of branches:)

t[y_] = Log[4 - Sqrt[14] Tanh[Sqrt[7] y + ArcTanh[3/Sqrt[14]]]];
Plot[t[y], {y, -1, 1}]

enter image description here

From this you get your points of interest:

t[0]
(* 0 *)

t[1]
(* Log[4 - Sqrt[14] Tanh[Sqrt[7] + ArcTanh[3/Sqrt[14]]]] *)

t'[0]
(* -5/Sqrt[2] *)
$\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.