I am new to mathematica and I am trying to solve the systems of ODE as shown below
Clear["Global`*"]
(*constants*)
phi1 = 1;
s = 0.5;
P = 1;
Cref = 1;
Q = 1;
lambda = 1;
(*the system of ode*)
ode = {x*a''[x] - 2*a'[x] - phi1^2*(1 + s)*phi[x]*a[x] *x == 0,
x*b''[x] - 2*b'[x] - phi1^2/P*phi[x]*a[x]*x == 0,
x*phi''[x] - 2*phi'[x] - s*phi1^2*Cref/Q/lambda*phi[x]*a[x]*x == 0};
bcs = {a'[0] == 0, a[1] == 0.9, b'[0] == 0, b[1] == 0.95,
phi'[0] == 0, phi[1] == (lambda - 0.6*Cref)/lambda};
(*ndsolve*)
{asol, bsol, phisol} =
NDSolveValue[{ode, bcs}, {a, b, phi}, {x, 0, 1}];
Method -> {"MethodOfLines",
"SpatialDiscretization" -> {"FiniteElement"}};
Plot[{asol[x], bsol[x], phisol[x]}, {x, 0, 1},
PlotLegends -> "Expressions"]
I would get error 'Power::infy' and 'Infinity::indet' when i am solving the system from x = 0 to 1. However, this can be overcome when i replace 0 with a close to 0 value. May i ask if there is other better solution for this?
Power::infy: Infinite expression 1/0. encountered.
Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered.