# Boundary Value Problem

I have to solve this boundary value problem: $$\frac{\mathrm{d}e_{3x}}{\mathrm{d}l}=(M_0+F_{0z}x-F_{0x}z)e_{3z}$$ $$\frac{\mathrm{d}e_{3z}}{\mathrm{d}l}=-(M_0+F_{0z}x-F_{0x}z)e_{3x}$$ $$\frac{\mathrm{d}x}{\mathrm{d}l}=e_{3x}$$ $$\frac{\mathrm{d}z}{\mathrm{d}l}=e_{3z}$$

With conditions: $$x(0)=x(1)=z(0)=0$$ $$z(1)=1-d$$ $$e_{3x}(0)=0$$ $$e_{3z}(0)=e_{3z}(1)=1$$

$d$ is a parameter in range (0,2), everything else must be computed.

Is this possible in Wolfram Mathematica? The indices confused Mathematica, so I replaced x-related indices with $i$ and z-related indices with $k$. Here is my attempt (I'm trying to find configuration $x(l),z(l)$):

And here is the code:

eq1 = D[Subscript[e, i][l],
l] == (Subscript[M, 0] + Subscript[F, k] x[l] -
Subscript[F, i] z[l]) Subscript[e, k][l]
eq2 = D[Subscript[e, k][l],
l] == -(Subscript[M, 0] + Subscript[F, k] x[l] -
Subscript[F, i] z[l]) Subscript[e, i][l]
eq3 = D[x[l], l] == Subscript[e, i][l]
eq4 = D[z[l], l] == Subscript[e, k][l]

c1 = x[0] == x[1] == z[0] == 0
c2 = z[1] == 1 - d
c3 = Subscript[e, i][0] == 0
c4 = Subscript[e, k][0] == Subscript[e, k][1] == 1

d = 0.01

s = NDSolve[{eq1, eq2, eq3, eq4, c1, c2, c3, c4}, {x[l], z[l]}, {l, 0,
1}]

-
I was told that in Matlab this requires to state initial configuration and then use solution at $d(x)$ as initial configuration to solve at $d(x+\Delta x)$. Is this also necessary in Mathematica and if so, how to do it? –  Juris Jan 21 at 14:05
You should provide your code in text form such that those who would want to help you don't have to manually copy down your code. –  jVincent Jan 21 at 14:53
I added it now. Originally I used the picture not the code because all the Subscripts made it hard to read. –  Juris Jan 21 at 15:04
The variables M0,Fi,Fk seem undefined. –  xslittlegrass Apr 18 at 4:54
@xslittlegrass, they are to be found. There are 7 unknowns and 7 boundary conditions. –  Juris Apr 22 at 14:55