You may be stuck with numerical solutions. The substitution $t = x+(\log s)/k$ changes the DE to a parameter-free one with a holonomic solution. The substitution puts the parameter dependence all in the argument, which seems a great improvement. But I can't get the DifferentialRoot
solution to evaluate except at machine precision, and it seems to oscillate wildly. Maybe NDSolve
with numeric k
and x
would work better for you.
\[Phi][x_, t_, k_] := (1/4)*Exp[k*(t - x)] - (1/4)*Exp[(-k)*(t - x)];
eq[x_, t_,
k_] = (1/(3*\[Phi][x, t, k]))*((D[a[t], t]*D[\[Phi][x, t, k], t])/
a[t] + D[\[Phi][x, t, k], {t, 2}]) + 2*(D[a[t], {t, 2}]/a[t]) -
D[\[Phi][x, t, k], {x, 2}];
eq2 = eq[x, t, k] // Together // Numerator;
sub = t == Log[s]/k + x;
newEQ = DSolveChangeVariables[
Inactive[DSolveValue][eq2 == 0, a[t], t], u, s, sub] //
Simplify[#, k > 0 && \[Xi] > 0 && s > 0,
TransformationFunctions -> {Automatic, PowerExpand}] &
Clear[asol];
asol[t_, k_, x_] =
Activate[newEQ] /. First@Solve[sub, s, Reals] //
Simplify[#, k > 0 && x \[Element] Reals && s > 0] &
I tried to find a ratio C[1]/C[2]
that would satisfy the initial condition, but the sign oscillates wildly. I'm not sure that the values can be trusted.
Block[{C = Through[{Cos, Sin}[-0.054774310`32]][[#]] &},
asol[0, 2, 1.`16]
]
Block[{C = Through[{Cos, Sin}[-0.054774309`32]][[#]] &},
asol[0, 2, 1.`16]
]
2.25921*10^21
-4.25624*10^22
The outputs are machine precision, despite the arbitrary precision inputs.
AsymptoticDSolveValue
also works, without the boundary condition and not with it. One can get the BC solution from the general series expansion, though:
aymptsol[t_, k_, x_] =
AsymptoticDSolveValue[{newEQ[[1]]},
u[s], {s, s /. First@Solve[sub, s, Reals] /. t -> 0, 3}] /.
First@Solve[sub, s, Reals] // Collect[
#, {C[1], C[2]},
Simplify[# // Expand,
k > 0 && x \[Element] Reals && s > 0] &] &;
0 == % /. t -> 0 // Simplify
aymptsol[t, k, x] /. First@Solve[%]
If all you need is the asymptotic expansion, I guess you're in luck. Otherwise, it looks like a very difficult DE to handle symbolically.