y''[x]==y+z'[x]
z[x]^3=y'[x]+3
With boundary conditions of y[1]==2 and y[0]==3
Using NDSolve on these equations, Mathematica says the order of the
equations is 3 and it has only 2 initial conditions. But the order of
this system of equations is 2 as far as I see (since order is defined
as the highest derivative)
When I do try to put another boundary condition in like z[0]==0
Mathematica spits out that it cant solve for the derivatives and is
using a mass matrix method (error:ntdvmm) and then it says that it has
significant errors (error:berr) and will return the best solution
found.
Any help on this matter will be greatly appreciated.
Thanks
your equations are not a differential equation for
z[x] because
ode = {y''[x] == y[x] + z'[x],
z[x]^3 == y'[x] + 3};
ode /. Solve[D[#, x] & /@
Last[ode], z'[x]][[1]]
gives:
{Derivative[2][y][x] == y[x] + Derivative[2][y][x]/(3*z[x]^2),
z[x]^3 == 3 + Derivative[1][y][x]}
that does not include z'[x] any more and more over
z[x] is complete undetermined.
Setting
ode1 = ode /. Solve[D[#, x] & /@
Last[ode], z'[x]][[1]];
yodes= First /@ (ode1 /. Solve[Last[ode1], z[x]])
gives three possible equations for y[x] and
NDSolve[
{#, y[1] == 2 , y[0] == 3},
y[x], {x, 0, 1}] & /@ yodes
will solve it with some numerical error messages
because I'm not able to to take the right solution
for z[x]
Regards
Jens
z^3 = y' + 3 -> 3*z^2*z' = y''
Inserting in the first equation gives
3*z^2*z' = y + z'
or
z'=y/(3*z^2-1)
So you should solve the following two equations
(I) z'=y/(3*z^2-1)
(II) y'=z^3-3
with appropriate boundary conditions.
Best wishes
Torsten.