I'm facing a tricky problem. I need to solve a system of 6 differential equations numerically, but I don't have 6 IVP (initial value problem) conditions, instead I have 6 BVP (boundary valye problem) conditions (3 conditions at $x=0$ and 3 conditions at $x=l$, being $l$ the last point to compute, thus $0<x<l$).
So I need to convert the 3 boundary conditions at $x=l$ into 3 at $x=0$ (through the shooting method for example) so I have all 6 IVPs to solve my problem numerically through RK4. So far so good.
I have two problems to solve. The first has the following form:
\begin{cases} \frac{dT}{dx}&=f_1(g) &(1)\\ \frac{dV}{dx}&=f_2(e) &(2)\\ \frac{dM}{dx}&=f_3(V,g) &(3)\\ \frac{dK}{dx}&=f_4(x,M,T) &(4)\\ \frac{dg}{dx}&=f_5(x,T) &(5)\\ \frac{de}{dx}&=f_6(K) &(6)\\ \end{cases}
With the following BVPs:
\begin{cases} T(0)&=c_1 \\ T(l)&=0 \\ V(0)&=c_2 \\ V(l)&=0 \\ M(0)&=c_3 \\ M(l)&=0 \\ \end{cases}
Through the shooting method I need to find $K(0)$, $g(0)$ and $e(0)$. In this case I can trivially find $g(0)$ because (1) and (5) are linearly dependent. To find $K(0)$ and $e(0)$ I shoot, for example:
\begin{cases} K(0)=+1 \text{ and } e(0)=+1 \\ K(0)=+1 \text{ and } e(0)=-1 \\ K(0)=-1 \text{ and } e(0)=-1 \\ K(0)=-1 \text{ and } e(0)=+1 \\ \end{cases}
Then I record the final values for $V(l)$ and $M(l)$ for each case, make an approximating polynomial for each ($f_V=f(K,e)$ and $f_M=f(K,e)$ respectively), and solve the resulting system for $K$ and $e$:
\begin{cases} f_V(K,e)=0 \\ f_M(K,e)=0 \end{cases}
The resulting $K(0)$ and $e(0)$ give me fairly good values (if I use approximating polynomials of order 1 I have an error of $10^-8$, more than acceptable for what I need). Thus, my first problem is solved.
The second problem is the real issue. The system is now:
\begin{cases} \frac{dT}{dx}&=f_1(e,g)\\ \frac{dV}{dx}&=f_2(e,g) \\ \frac{dM}{dx}&=f_3(V,e,g) \\ \frac{dK}{dx}&=f_4(x,M,T) \\ \frac{dg}{dx}&=f_5(x,T) \\ \frac{de}{dx}&=f_6(K) \\ \end{cases}
Also, there are now hyperbolic tangents involved (I have $g(x)$ inside $tanh()$ for example). I can't find any of $K(0)$, $g(0)$ or $e(0)$ trivially because now all equations depend on the others. So, my initial idea was to use the same shooting methodology but creating polynomials with 3 variables ($K$, $g$ and $e$) instead of just $K$ and $e$ like I used before. This isn't producing viable results, even if I use higher orders of polynomials.
My question is: what can I do ? I don't mind changing methodologies or solving using other methods, I just need some directions so I can correctly solve this. I wholeheartedly welcome different perspectives on this. I'm using maxima, for what it's worth.
Also, I can determine the correct $K(0)$, $g(0)$ and $e(0)$ (through an external Maple file), and if I input those into my program I get correct results, so I know all the equations are correctly inputted.
Thank you !
EDIT2:
The system I'm aiming to solve is the following:
\begin{cases} \frac{dT(x)}{dx}&={{3339\,{\it g(x)}\,\tanh \left({{50000\,\sqrt{8427\,{\it g(x)}^2+30036 \,{\it e(x)}^2}}\over{163611}}\right)}\over{\sqrt{8427\,{\it g(x)}^2+ 30036\,{\it e(x)}^2}}}\\ \frac{dV(x)}{dx}&={{12600\,{\it e(x)}\,\tanh \left({{50000\,\sqrt{8427\,{\it g(x)}^2+ 30036\,{\it e(x)}^2}}\over{163611}}\right)}\over{\sqrt{8427\,{\it g(x)}^ 2+30036\,{\it e(x)}^2}}} \\ \frac{dM(x)}{dx}&={{5\,\sqrt{8427\,{\it g(x)}^2+30036\,{\it e(x)}^2}\,{\it V(x)}-10017\, {\it g(x)}\,\tanh \left({{50000\,\sqrt{8427\,{\it g(x)}^2+30036\, {\it e(x)}^2}}\over{163611}}\right)}\over{5\,\sqrt{8427\,{\it g(x)}^2+ 30036\,{\it e(x)}^2}}} \\ \frac{dK(x)}{dx}&=-{{60092431565\,x+15000000000\,{\it T(x)}+25000000000\,{\it M(x)}- 2410745228515}\over{48076923076923}} \\ \frac{dg(x)}{dx}&={{3281046763449\,x+1069000000000\,{\it T(x)}-156626689476919}\over{ 5250000000000000}} \\ \frac{de(x)}{dx}&={\it K(x)} \\ \end{cases}
Boundary conditions are:
\begin{cases} T(0)=200 \\ V(0)=-4.8073945252 \\ M(0)=-47.1403817188 \\ T(l)=0 \\ V(l)=0 \\ M(l)=0 \\ \end{cases}
Where $l=25mm.$