Clear["Global`*"]
Rationalize equations to get exact solution and enable subsequent selection and control of desired precision.
eqns = {si1''[x] - 6/(270*54) (si1[x] + se1[x]) == 0,
si1''[x] - se1''[x] == -(6/(7000*4)) se1[x],
si2''[x] - 6/(270*54) se2[x] == 0,
si2''[x] - se2''[x] == -(6/(7000*4)) se2[x], si1'[0] == 0,
si1'[0] == se1'[0], si2'[1000] == se2'[1000],
si1'[1000 - a] - se1'[1000 - a] == si2'[1000 - a] - se2'[1000 - a],
se1'[1000 - a] == se2'[1000 - a], si1[1000 - a] == si2[1000 - a],
se1[1000 - a] == se2[1000 - a], si1[1000 - a] == 1/5};
sol = DSolve[eqns, {si1, si2, se1, se2}, x][[1]];
eqn2 = se2[1000] == 1/5 /. sol // Simplify // N[#, 20] &;
Use FindRoot[lhs == rhs, {x, x0, x1}]
to search for a solution using x0
and x1
as the first two values of x
, and avoid the use of derivatives.
sola = FindRoot[eqn2, {a, 5, 10}, WorkingPrecision -> 15]
{* {a -> 38.9567170435138} *)
Verifying that sola
satisfies eqn2
se2[1000] == 1/5 /. sol /. sola
(* True *)
EDIT Plot requested in comment
f[x_] := Piecewise[
{{se1[x], 0 < x < a}, {se2[x], a < x < 1000}}] /.
sol /. sola;
Plot[f[x], {x, 0, 1000},
PlotRange -> All,
Exclusions -> {x == a /. sola},
AxesLabel -> (Style[#, 12, Bold] &) /@ {"x", "f[x]"},
ImageSize -> 500,
Epilog -> Inset[
Plot[f[x], {x, 800, 1000},
Frame -> True, Axes -> False,
PlotRange -> {-2, 0.25},
FrameLabel -> (Style[#, 12, Bold] &) /@ {"x", "f[x]"}],
Scaled[{0.6, 0.45}], Automatic, 800]]