As it has been noticed in the original question one can transform the independent variable $x \to t=\exp(-x)$. Then our differential equation transforms to $\;u''(t)=u(t)^3$ and the initial conditions transforms to $\;u(1)=1\;$ and $\;u'(1)=1$, where $u(t)=\tilde{y}(\exp(-x))=y(x)$. Physicists usually oversimplify notation as e.g. $\;y(x)= y(\exp(-x))=y(t)$, however we should carefully distinguish all the functions $u, \tilde{y}, y$. Derivation of the transformed equation is a simple excersise for users using version 13.0 and earlier.
The transformed equation can be integrated once multiplying it by $u'(t)$:
$$0=u''(t) - u(t)^3=u' u'' -u^3 u'=(\frac{1}{2} {u'}^2-\frac{1}{4}u^4+c)'=0 $$
where $c$ is a constant. Solution to this equation can be reformulated as integration of an elliptic integral see e.g. Solving 0=−λ ϕ(t)^3+μ^2 ϕ(t)+ϕ′′(t) and usually Mathematica solves such equations this way obtaining involved solutions in terms of inverse functions. We wouldn't like solving it this way and we have to play with further transforming it to another form which the system can recognize. Usually I prefer transforming to the canonical Weierstrass form (see e.g. 1, 2, 3, 4, ...) then we encounter problems with solving differential equations with given initial (or boundary) conditions see e.g. 5, nevertheless there are still appropriate tools one can harness e.g. 6. Such a procedure allows us to get exact solutions with a certain number of intermediate steps, reflecting various problematic issues when solving differential equations in terms of elliptic functions.
Nonetheless it appears that we can solve our initial value problem directly prescribing initial conditions
us[t_] = FullSimplify @ DSolveValue[{u''[t] - u[t]^3 == 0, u[1] == 1, u'[1] == 1},
u[t], t]
-(-1)^(1/4) JacobiSN[(-(1/2) + I/2) (-1 + t)
+ InverseJacobiSN[(-1)^(3/4), -1], -1]
This is a real function over a real domain:
Plot[ Flatten[{ReIm[-(-1)^(1/4) JacobiSN[(-(1/2) + I/2) (-1 + t) +
InverseJacobiSN[(-1)^(3/4), -1], -1]], t}],
{t, 0, 1.6}, Evaluated -> True, AspectRatio -> Automatic,
Epilog -> {Red, PointSize[0.02], Point[{1, 1}]}]
being an elliptic function (doubly periodic meromorphic function in the complex plane see e.g. 6, 7) however the solution to the oringinal equation is composed with an exponential function and so it isn't an elliptic function anymore:
ys[x_] = us[t] /. t -> Exp[-x]
it asymptotically goes at infinity to
us[0] // N // Chop
0.219982
Plot[ Flatten[{ ReIm[ys[x]], Exp[-x], us[0] // Chop}], {x, -1/2, 3},
Evaluated -> True, AspectRatio -> Automatic]
Edit
Another question arised in the comments, namely how we can find appropriate parameters in general solution found with DSolve
to be compatibile with exact solution to the initial value problem found above i.e. us[t]
? In general we need not play with the full symbolic power of the system but we would rather take a shortcut approach solving numerically appropriate equations finding parameters. This is an analogous problem to e.g. How to remove irrelevant terms (such as log
's) in the solution of differential equation?, however here instead of elementary transcendental functions as Log
we have to deal with higher transcendental functions as JacobiSN
what makes the problem more difficult.
Let's define the first general solution to $\;u''(t)=u(t)^3$:
u1[t_, c1_, c2_] =
u[t] /. First @ FullSimplify @ DSolve[u''[t] - u[t]^3 == 0, u[t], t]/.
{C[1] -> c1, C[2] -> c2} //Quiet
-((I 2^(1/4) JacobiSN[-(((1 - I) Sqrt[Sqrt[c1] (c2 + t)^2])/2^(
3/4)), -1])/Sqrt[(I/Sqrt[c1])])
Since we have two parameters we should compare u1
and us
for two different arguments providing non-degenerate system of equations choosing appropriate starting points in FindRoot
, e.g.
{c1c, c2c} = {c1, c2} /. FindRoot[{u1[1] == us[1], u1[1/2] == us[1/2]},
{{c1, 1}, {c2, 0}}] // Chop
{0.5, 0.311029}
now we can see that the both solutions coincide numerically:
Plot[{us[t], Re @ u1[t, c1c, c2c]}, {t, 0, 3/2},
PlotStyle -> {{Thick}, {Dashed, Green}}, PlotLegends -> "Expressions"]
A symbolic approach would involve searching for appropriate formulas in e.g. Entity["MathematicalFunction", "JacobiSN"]["Dataset"]
and show that the both functions are equal under specific conditions but that is a different story. Here we can simply identify c1
as 1/2
and comparing u1[t, 1/2, c2]
with us[t]}
we find also an exact formula for c2
:
c2 /. First @ Solve[ (-(1/2) + I/2) (-1) + InverseJacobiSN[(-1)^(3/4), -1]
== (-(1/2) + I/2) c2, c2]
-1 - (1 + I) InverseJacobiSN[(-1)^(3/4), -1]