I have 2 coupled differential equations with an eigenvalue Ei and want to solve them
ϕ''[r] + (2/r) ϕ'[r] - mb^2 ϕ[r] + (Ei + g*A[r])^2 ϕ[r] == 0
A''[r] + (2/r) A'[r] - mv^2 A[r] - 2 g (Ei + g*A[r]) (ϕ[r])^2 == 0
where mb, mv and g are constants equal to 1. The boundary conditions of these equations are
ϕ[0] = 1, ϕ'[0] = 0, A[0] = 0, A'[0] = 0
Because of the singularity of r, we assume r = 1*10^-8. What I want to find is the maximum radius (r) when ϕ[rmax] = 0, ϕ'[rmax] = 0, A[rmax] = 0, A'[rmax] = 0.
I've with this
mb = mv = g = 1;
b = ParametricNDSolveValue[{ϕ''[r] + (2/r) ϕ'[r] - mb^2 ϕ[r] + (Ei + g A[r])^2 ϕ[r] == 0,
A''[r] + (2/r) A'[r] - mv^2 A[r] - 2 g (Ei + g A[r]) (ϕ[r])^2 == 0,
ϕ[0.00000001] == 1, ϕ'[0.00000001] == 0, A[0.00000001] == 0,
A'[0.00000001] == 0}, {ϕ, A},
{r, 0.00000001, 100}, {Ei}]
but it didn't work when I wanted to find Ei like this
val = Map[FindRoot[b[Ei][100], {Ei, #}] &, {1, 2, 3}]
and the maximum radius. How should I solve this issue ?
Also I want to plot ϕ and A vs r.



Ei?b[Ei]actually returns 2InterpolatingFunctionwhile you only have 1 unknown! If you replace the{ϕ, A}insideParametricNDSolvewithϕorA, you'll get a solution, whether the solution is correct or not is another story. BTW, you may want to try this package: http://library.wolfram.com/infocenter/Demos/4482/ – xzczd Apr 18 '15 at 04:11Eiwhere theϕand theϕ'when r (maximum radius) are equal to 0. So I think I can use findroot. – M. Fitrah Alfian R. S. Apr 21 '15 at 07:53ϕ[Ei] == 0andϕ'[Ei] == 0give two equations, use either of them insideFindRootorRootSearchwill give you a result. – xzczd Apr 21 '15 at 07:56FindRootlike what you've said in Mathematica? – M. Fitrah Alfian R. S. Apr 21 '15 at 09:02