Is it possible at all to solve with NDSolve (or other built in function) a split boundary value problem with algebraic equations?
Please look at the following example:
s = NDSolve[
{
x'[t] == y[t] + x[t] y[t] + z[t],
z'[t] == 2*y[t],
2 x[t] + y[t] - z[t] == 1,
x[0] == 0,
z[0] == 0}
, {x, y, z}, {t, 0, 1}];
This example solves well, and outputs Interpolation Functions.
I compute the final value of variable z
:
In[50]:= z[1] /. s
Out[51]:= {0.694658}
When I try the same example with split conditions:
s1 = NDSolve[
{
x'[t] == y[t] + x[t] y[t] + z[t],
z'[t] == 2*y[t],
2 x[t] + y[t] - z[t] == 1,
x[0] == 0,
z[1] == 0.694658}
, {x, y, z}, {t, 0, 1}];
I get the following error:
NDSolve::bvdae: Differential-algebraic equations must be given as initial value problems.
I am trying to solve a complex problem with this structure, is there any way to tackle it in mathematica?
Edit: Unlike this Minimum Working Example, in the original problem I am trying to solve the variable y cannot be eliminated from the system