I am trying to solve a system of two Euler equations with a constraint. I do not know the initial conditions and I thought to use ParametricNDSolve
to solve the equations and find the parameters that solve the constraint. Here is my code:
rs[r_] = (3/(4 Pi u[r]^2))^(1/3);
A = (Log[2] - 1)/(2 Pi^2);
b = 20.4562557;
rin = 10^-10;
L = 2.87 u[r]^(10/3) r^2 + 1/18 u'[r]^2 r^2 + (-3/4 (3/Pi)^(1/3) u[r]^(2/3) + A Log[b/rs[r] + b/rs[r]^2 + 1]) r^2 u[r]^2 - 1/(8 Pi) r^2 \[Phi]'[r]^2 + (u[r]^2 + 79 DiracDelta[r]) \[Phi][
r] r^2;
eqn1 = EulerEquations[L, u[r], r];
eqn2 = EulerEquations[L, \[Phi][r], r];
sol = ParametricNDSolve[{eqn1, eqn2, u[rin] == a, \[Phi][rin] == e,
u'[rin] == c, \[Phi]'[rin] == d}, {u, \[Phi]}, {r, rin, 1}, {a, e,
c, d}]
U[r_] := u[r] /. sol[[1]]
FindMinimum[Integrate[U[r]^2 r^2, {r, rin, 1}] == 79, {a, c,d,e}]
I get the errors:
"Too many parameters in {a,e,c,d} to be filled from {1/10000000000+Integrate
ImproperDump
newx}"The integrand r^2 \ParametricFunction[1,<<12>>[<<1>>],<<3>>,{NDSolve
base$22542,NDSolve
\ NDSolveParametricFunction[0,{ParametricNDSolve,Internal`Bag[<2>],None}\ ,<<6>>,{},All]}][r]^2 has evaluated to non-numerical values for all \ sampling points in the region with boundaries {{1/10000000000,1}}
What do they mean? How can I solve my system of equations?
u[r]
,\[Phi][r]
have a definition attached to them? $\endgroup$ClearAll["Global
*"]`, but nothing has changed $\endgroup$