According to the suggestions from @AVK,
I built the problem in MATLAB(but I have no MATLAB to test)
I have read that example and try to adapt it to my case .
$$
\frac{y''}{(1+y'^{2})^{\frac{3}{2}}} -p - A(x-B)^2 =0
$$
given
$$
\begin{equation}
\begin{cases}
y(x_a)=YA \\
y(x_c)=YC \\
y(x_b)=YB
\end{cases}\,
\end{equation}
$$
where $ x_a \lt x_c \lt x_b$
Let $y_1=y,\quad y_2=y'$
$$
\begin{equation}
\begin{cases}
y_1'=y_2, \\
y_2'=(1+y_2^{2})^{\frac{3}{2}}\cdot (p + A(x-B)^2) =0
\end{cases}\,
\end{equation}
$$
function dydx = fcn(x,y,regin,p) % equation to solve
A = 0.001
B = 1.0e-3
dydx = zeros(2,1);
dydx = [y(2)
(1+y(2)^2)^(3/2)*(p+A*(x-B)^2)];
end
I apply the following BCs.
function res = bcfcn(ya,yb,p) % boundary conditions
YA = 0.0
YB = 5.0
YC = 3.0
res = [ya(1,1)-YA % y1(xa)=ya
ya(1,2)-YC % y1(xc)=yc Continuity
yb(1,1)-YC % y1(xc)=yc Continuity
ya(2,2)-yb(2,1) % y2(xc)=y2(xc) Continuity
yb(1,2)-YB]; % y1(xb)=yb
end
initialization
xc = 1.0;
xa = 0.0;
xb = 2.0
p = 0.0
xmesh = [0 0.25 0.5 0.75 xc xc 1.25 1.5 1.75 2];
yinit = [0.0; 0.0];
solinit = bvpinit(xmesh,yinit,p);
solve
sol = bvp5c(@fcn, @bcfcn, solinit);
fprintf('sol.parameters %7.3f.\n',...
sol.parameters);
%check solution
ypred = deval(sol,[xa,xc,xb])
fprintf("%7.3f",ypred(1,:))
I don't know if it is correct.
Because I have no MATLAB on hand, I just check it in mathworks online site.
I want to try a Fortran solver COLNEW to do similar work.
If someone has experience on this, please help me.
[ADD]
I also found a newer solver BVP_SOLVER
. Though it is easier to use, it only supports two-point BVPs and separated BCs, it is not convenient to use on my problem.
[Update]
Finally, I have solved the problem(MP-BVP with unknown parameters) using COLNEW, which is really a great solver.