I'm trying to numerically solve a system of second order differentials equations that are connected only by boundary conditions. I can't figure out how to define the problem in mathematica.
The first equation:
$y_1''(x) = k_1*Sinh(y_1(x)) - c_1(x)$, is defined on $0<x\leq d$
The second equation:
$y_2''(x) = k_2*Sinh(y_2(x)) - c_2(x)$, is defined on $d<x<\infty$
Boundary conditions are:
$y_1'(0) = 0$
$y_2(\infty) = 0$
$y_1(d^-) = y_2(d^+)$
$\epsilon_1y_1'(x)|_{x=d^-} = \epsilon_2y_2'(x)|_{x=d^+}$
$k_1$, $k_2$, $\epsilon_1$, $\epsilon_2$, $c_1(x)$, $c_2(x)$ are given constants/functions. Can you please help to define and solve the system in mathematica ? I tried the following code, where put constant values for all parameters:
c1 = 1;
c2 = 1;
k1 = 1;
d = 1;
e1 = 1;
e2 = 1;
system = {Derivative[2][y1][x1] == k1*Sinh[y1[x1]] - c1,
Derivative[2][y2][x2] == k2*Sinh[y2[x2]] - c2, y2[Infinity] == 0,
Derivative[1][y1][0] == 0, y1[d] == y2[d], e1*Derivative[1][y1][d] ==
e2*Derivative[1][y2][d]}
s1 = NDSolve[system, {y1[x1], y2[x2]}, {x1, 0, d}, {x2, d, Infinity}]
However I get
NDSolve::allort: "The dependent variable y1[x1] should depend either on the temporal variable alone or on all independent variables."
Can't understand what can be the problem.
k2
. $\endgroup$ – bbgodfrey May 13 '17 at 14:01